From 56fb9d98e8e602753e85d28277f66a6da2de907f Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Tue, 22 Oct 2024 08:42:15 -0400 Subject: [PATCH 01/37] LEAF 4552 metadata field update optimizations --- .../update_records_notes_dh_fields.php | 321 ++++++++++-------- 1 file changed, 179 insertions(+), 142 deletions(-) diff --git a/scripts/leaf-scripts/update_records_notes_dh_fields.php b/scripts/leaf-scripts/update_records_notes_dh_fields.php index ad1abff47..cd48a7b3b 100644 --- a/scripts/leaf-scripts/update_records_notes_dh_fields.php +++ b/scripts/leaf-scripts/update_records_notes_dh_fields.php @@ -12,191 +12,228 @@ $log_file = fopen("batch_update_records_notes_dh_log.txt", "w") or die("unable to open file"); $time_start = date_create(); -$tables_to_update = ["notes", "records", "data_history"]; -$fields_to_update = array( - "notes" => "userMetadata", - "records" => "userMetadata", - "data_history" => "userDisplay", -); $db = new App\Leaf\Db(DIRECTORY_HOST, DIRECTORY_USER, DIRECTORY_PASS, 'national_leaf_launchpad'); -//get records of each portal and assoc orgchart -$q = "SELECT `portal_database`, `orgchart_database` FROM `sites` - WHERE `portal_database` IS NOT NULL AND `site_type`='portal' ORDER BY `orgchart_database`"; +//get records of each portal db. Break out vdr for data_history updates. +$q = "SELECT `portal_database` FROM `sites` WHERE `portal_database` IS NOT NULL AND " . + //"`portal_database` = 'Academy_Demo1' AND" . + "`site_type`='portal' ORDER BY id LIMIT 4000 OFFSET 0"; $portal_records = $db->query($q); $total_portals_count = count($portal_records); $processed_portals_count = 0; - $error_count = 0; -//used during update query to limit query -$caselimit = 2500; +//get org info for enabled users from national. +$orgchart_db = 'national_orgchart'; +$orgchart_time_start = date_create(); $empMap = array(); -$orgchart_db = null; -foreach($portal_records as $rec) { +function getOrgchartBatch(&$db, $batch_count = 0) { + $limit = 50000; //handles this size ok + $offset = $batch_count * $limit; - //get org info up front for each new orgchart db. reset and update empmap if changed - if(!isset($orgchart_db) || $orgchart_db !== $rec['orgchart_database']) { - $empMap = array(); - $orgchart_db = $rec['orgchart_database']; - $orgchart_time_start = date_create(); + $qEmployees = "SELECT `employee`.`empUID`, `userName`, `lastName`, `firstName`, `middleName`, `deleted`, `data` AS `email` FROM `employee` + JOIN `employee_data` ON `employee`.`empUID`=`employee_data`.`empUID` + WHERE `deleted`=0 AND `indicatorID`=6 ORDER BY `employee`.`empUID` LIMIT $limit OFFSET $offset"; - try { - //************ ORGCHART ************ */ - $db->query("USE `{$orgchart_db}`"); + return $db->query($qEmployees) ?? []; +} + +try { + $db->query("USE `{$orgchart_db}`"); + + $org_batch = 0; + while(count($resEmployees = getOrgchartBatch($db, $org_batch)) > 0) { + $org_batch += 1; + + foreach($resEmployees as $emp) { + $mapkey = strtoupper($emp['userName']); + $empMap[$mapkey] = array( + 'userDisplay' => $emp['firstName'] . " " . $emp['lastName'], + 'userMetadata' => json_encode( + array( + 'userName' => $emp['userName'], + 'firstName' => $emp['firstName'], + 'lastName' => $emp['lastName'], + 'middleName' => $emp['middleName'], + 'email' => $emp['email'] + ) + ), + ); + } + } + unset($resEmployees); + + $orgchart_time_end = date_create(); + $orgchart_time_diff = date_diff($orgchart_time_start, $orgchart_time_end); + + fwrite( + $log_file, + "\r\nOrgchart " . $orgchart_db . " map info took: " . $orgchart_time_diff->format('%i min, %S sec, %f mcr') . "\r\n" + ); + +} catch (Exception $e) { + fwrite( + $log_file, + "Caught Exception (orgchart connect): " . $orgchart_db . " " . $e->getMessage() . "\r\n" + ); + $portal_records = array(); +} - $qEmployees = "SELECT `employee`.`empUID`, `userName`, `lastName`, `firstName`, `middleName`, `deleted`, `data` AS `email` FROM `employee` - JOIN `employee_data` ON `employee`.`empUID`=`employee_data`.`empUID` - WHERE `indicatorID`=6"; - $resEmployees = $db->query($qEmployees) ?? []; - foreach($resEmployees as $emp) { - $mapkey = strtoupper($emp['userName']); - $empMap[$mapkey] = $emp; - } +$tables_to_update = [ + "notes", + "records", + // "data_history" +]; +$fields_to_update = array( + "notes" => "userMetadata", + "records" => "userMetadata", + "data_history" => "userDisplay", +); +$json_empty = json_encode( + array( + "userName" => "", + "firstName" => "", + "lastName" => "", + "middleName" => "", + "email" => "" + ) +); +$user_not_found_values = array( + "userMetadata" => $json_empty, + "userDisplay" => "", +); - $orgchart_time_end = date_create(); - $orgchart_time_diff = date_diff($orgchart_time_start, $orgchart_time_end); - fwrite( - $log_file, - "\r\nOrgchart " . $orgchart_db . " map info took: " . $orgchart_time_diff->format('%i min, %S sec, %f mcr') . "\r\n" - ); +//pull IDs to process. If the table is more than 20k this will be done in batches +function getUniqueIDBatch(&$db, $table_name, $field_name):array { + $getLimit = 20000; - } catch (Exception $e) { - fwrite( - $log_file, - "Caught Exception (orgchart connect): " . $orgchart_db . " " . $e->getMessage() . "\r\n" - ); - $error_count += 1; + $SQL = "SELECT `userID` FROM `$table_name` WHERE `$field_name` IS NULL LIMIT $getLimit"; + $records = $db->query($SQL) ?? []; + + //removing duplicates here since using DISTINCT complicates the query + $mapAdded = array(); + foreach ($records as $rec) { + $userID = strtoupper($rec['userID']); + if(!isset($mapAdded[$userID])) { + $mapAdded[$userID] = 1; } } + return array_keys($mapAdded); +} +foreach($portal_records as $rec) { $portal_db = $rec['portal_database']; - try { - //************ PORTAL ************ */ $db->query("USE `{$portal_db}`"); - $update_tracking = array( + + $batch_tracking = array( "notes" => 0, "records" => 0, "data_history" => 0, ); + $portal_time_start = date_create(); + fwrite( + $log_file, + "\r\nProcessing " . $portal_db + ); - /* loop through the tables to be updated */ - foreach ($tables_to_update as $table_name) { //NOTE: table loop start + foreach ($tables_to_update as $table_name) { $field_name = $fields_to_update[$table_name]; + $table_time_start = date_create(); + fwrite( + $log_file, + "\r\n" . $table_name . ": " + ); - try { - $usersQ = "SELECT DISTINCT `userID` FROM `$table_name` WHERE `$field_name` IS NULL"; - - $resUniqueIDs = $db->query($usersQ) ?? []; - $numIDs = count($resUniqueIDs); - - if($numIDs > 0) { - $portal_db = $rec['portal_database']; - $portal_time_start = date_create(); - - fwrite( - $log_file, - "\r\nUnique " . $table_name . " userID count for " . $portal_db . ": " . $numIDs . "\r\n" - ); - - $totalBatches = intdiv($numIDs, $caselimit); - foreach(range(0, $totalBatches) as $batchcount) { //this will include the last partial batch - $curr_ids_slice = array_slice($resUniqueIDs, $batchcount * $caselimit, $caselimit); - - //build and exec CASE statement for each batch - $sqlUpdateMetadata = "UPDATE `$table_name` - SET `$field_name` = CASE `userID` "; - - $metaVars = array(); - foreach ($curr_ids_slice as $idx => $userRec) { - $userInfo = $empMap[strtoupper($userRec['userID'])] ?? null; - /* If they are not in the orgchart info at all just don't do anything. If they are there but explicitly deleted - set empty metadata properties (info is not being used for inactive accounts since we don't want to assume accuracy) */ - if(isset($userInfo)) { - $isActive = $userInfo['deleted'] === 0; - - if($table_name === "data_history") { - $metadata = $isActive ? $userInfo['firstName'] . " " . $userInfo['lastName'] : ""; - } else { - $metadata = json_encode( - array( - 'userName' => $isActive ? $userInfo['userName'] : '', - 'firstName' => $isActive ? $userInfo['firstName'] : '', - 'lastName' => $isActive ? $userInfo['lastName'] : '', - 'middleName' => $isActive ? $userInfo['middleName'] : '', - 'email' => $isActive ? $userInfo['email'] : '' - ) - ); - } - - $metaVars[":user_" . $idx] = $userInfo['userName']; - $metaVars[":meta_" . $idx] = $metadata; - $sqlUpdateMetadata .= " WHEN :user_" . $idx . " THEN :meta_" . $idx; - } - } - - $sqlUpdateMetadata .= " END"; - $sqlUpdateMetadata .= " WHERE `$field_name` IS NULL"; - - try { - $db->prepared_query($sqlUpdateMetadata, $metaVars); - $update_tracking[$table_name] += 1; - - fwrite( - $log_file, - $table_name . " ... batch: " . $batchcount - ); - - } catch (Exception $e) { - fwrite( - $log_file, - "Caught Exception (update action_history usermetadata case batch): " . $e->getMessage() . "\r\n" - ); - $error_count += 1; - } + $id_batch = 0; + //simple array of upper case userID strings + while(count($resUniqueIDsBatch = getUniqueIDBatch($db, $table_name, $field_name)) > 0) { + $id_batch += 1; + + $case_batch = 0; + //records and notes usually do not have high numbers of rows per user. + //ideally just want to batch a number that will not typically hit the post cap below. + //(casing in batches of 100 didn't result in a different memory profile - # in and of itself does not appear to matter) + $case_limit = $table_name != 'data_history' ? 1000 : 500; + while(count($slice = array_slice($resUniqueIDsBatch, $case_batch * $case_limit, $case_limit))) { + $sqlUpdateMetadata = "UPDATE `$table_name` SET `$field_name` = CASE `userID` "; + $metaVars = array(); + $case_batch += 1; + foreach ($slice as $idx => $userID) { + //use mapped info if present, otherwise use empty values. + $userInfo = $empMap[$userID] ?? null; + $metaVars[":user_" . $idx] = $userID; + $metaVars[":meta_" . $idx] = isset($userInfo) ? + $userInfo[$field_name] : $user_not_found_values[$field_name]; + + $sqlUpdateMetadata .= " WHEN :user_" . $idx . " THEN :meta_" . $idx; + } + $sqlUpdateMetadata .= " END"; + + //Limit rows updates. + //A minority of portals have millions of table rows but only hundreds of unique users. + //records not updated due to the limit will be re-pulled by another batch of nulls. + $sqlUpdateMetadata .= " WHERE `$field_name` IS NULL LIMIT 25000;"; + + try { + $db->prepared_query($sqlUpdateMetadata, $metaVars); + $batch_tracking[$table_name] += 1; + + fwrite( + $log_file, + $id_batch . "(" . $case_batch . "," . count($slice) . "), " + ); + + } catch (Exception $e) { + fwrite( + $log_file, + "Caught Exception (update case batch): " . $e->getMessage() . "\r\n" + ); + $error_count += 1; } - - $portal_time_end = date_create(); - $portal_time_diff = date_diff($portal_time_start, $portal_time_end); - - fwrite( - $log_file, - "\r\nPortal " . $table_name . " update took: " . $portal_time_diff->format('%i min, %S sec, %f mcr') . "\r\n" - ); - - } - - } catch (Exception $e) { - fwrite( - $log_file, - "Caught Exception (query distinct ah userIDs): " . $e->getMessage() . "\r\n" - ); - $error_count += 1; - } + } //while remaining unprocessed unique IDs from ID batch + + } //while remaining un-updated ids in table + + $table_time_end = date_create(); + $table_time_diff = date_diff($table_time_start, $table_time_end); + + fwrite( + $log_file, + "(" . $table_time_diff->format('%H hr, %i min, %S sec, %f mcr'). ")" + ); + + } //table loop end + + $portal_time_end = date_create(); + $portal_time_diff = date_diff($portal_time_start, $portal_time_end); - } //NOTE: table loop end + fwrite( + $log_file, + "\r\nPortal update took: " . $portal_time_diff->format('%H hr, %i min, %S sec, %f mcr') . "\r\n" + ); $processed_portals_count += 1; - $update_details = "records: " . $update_tracking["records"] . ", notes: " . $update_tracking["notes"] . ", data_history: " . $update_tracking["data_history"]; + $update_details = "records: " . + $batch_tracking["records"] . ", notes: " . + $batch_tracking["notes"] . ", data_history: " . + $batch_tracking["data_history"]; + fwrite( $log_file, - "Portal " . $portal_db . " tables updated(1/0), " . $update_details . "\r\n" + "Portal " . $portal_db . " (" . $processed_portals_count . "): table batches, " . $update_details . "\r\n" ); - - - } catch (Exception $e) { fwrite( $log_file, - "Caught Exception (use portal connect): " . $e->getMessage() . "\r\n" + "Caught Exception (portal use): " . $portal_db . " " . $e->getMessage() . "\r\n" ); $error_count += 1; } From eeaa5ee92ed34dc5e6775eb7d7e1807c06686b11 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Wed, 23 Oct 2024 13:02:12 -0400 Subject: [PATCH 02/37] LEAF 4435 address sass method deprecation, adjust drop area size, color, grab icon --- LEAF-Automated-Tests | 2 +- app/libs/css/leaf.css | 2 +- .../vue-dest/form_editor/LEAF_FormEditor.css | 2 +- .../vue-dest/form_editor/LEAF_FormEditor.js | 2 +- .../LEAF_FormEditor.js.LICENSE.txt | 6 +++--- .../vue-dest/site_designer/LEAF_Designer.js | 2 +- .../LEAF_Designer.js.LICENSE.txt | 6 +++--- .../src/form_editor/LEAF_FormEditor.scss | 21 ++++++++++--------- docker/vue-app/src/sass/leaf.scss | 4 +++- 9 files changed, 25 insertions(+), 22 deletions(-) diff --git a/LEAF-Automated-Tests b/LEAF-Automated-Tests index 32f13e0a7..e14fa0952 160000 --- a/LEAF-Automated-Tests +++ b/LEAF-Automated-Tests @@ -1 +1 @@ -Subproject commit 32f13e0a7331fd9135dd398abdbe5272d3cdcd57 +Subproject commit e14fa09524c35ed4ae17c9edc25f2ecd91c073b7 diff --git a/app/libs/css/leaf.css b/app/libs/css/leaf.css index c3fa727a7..e6d2bb056 100644 --- a/app/libs/css/leaf.css +++ b/app/libs/css/leaf.css @@ -6,4 +6,4 @@ * Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) * Copyright 2024 Fonticons, Inc. - */:root,:host{--fa-style-family-classic: "Font Awesome 6 Free";--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:900;font-display:block;src:url(fonts/fontawesome/fa-solid-900.woff2) format("woff2"),url(fonts/fontawesome/fa-solid-900.ttf) format("truetype")}.fas,.fa-solid{font-weight:900}@font-face{font-family:"fa-solid";src:url(fonts/fontawesome/fa-solid-900.woff2) format("woff2"),url(fonts/fontawesome/fa-solid-900.woff) format("woff")}@font-face{font-family:"PublicSans-Thin";src:url(fonts/public-sans/PublicSans-Thin.woff2) format("woff2"),url(fonts/public-sans/PublicSans-Thin.woff) format("woff")}@font-face{font-family:"PublicSans-Light";src:url(fonts/public-sans/PublicSans-Light.woff2) format("woff2"),url(fonts/public-sans/PublicSans-Light.woff) format("woff")}@font-face{font-family:"PublicSans-Regular";src:url(fonts/public-sans/PublicSans-Regular.woff2) format("woff2"),url(fonts/public-sans/PublicSans-Regular.woff) format("woff")}@font-face{font-family:"PublicSans-Medium";src:url(fonts/public-sans/PublicSans-Medium.woff2) format("woff2"),url(fonts/public-sans/PublicSans-Medium.woff) format("woff")}@font-face{font-family:"PublicSans-Bold";src:url(fonts/public-sans/PublicSans-Bold.woff2) format("woff2"),url(fonts/public-sans/PublicSans-Bold.woff) format("woff")}@font-face{font-family:"Source Sans Pro Web";src:url(fonts/source-sans-pro/sourcesanspro-regular-webfont.woff2) format("woff2"),url(fonts/source-sans-pro/sourcesanspro-regular-webfont.woff) format("woff")}@font-face{font-family:"Source Sans Pro Web-Bold";src:url(fonts/source-sans-pro/sourcesanspro-bold-webfont.woff2) format("woff2"),url(fonts/source-sans-pro/sourcesanspro-bold-webfont.woff) format("woff")}.fas{font-family:"fa-solid"}html{box-sizing:border-box;line-height:1.15;font-family:"Source Sans Pro Web","Helvetica Neue",Helvetica,Arial,sans-serif}*,::after,::before{box-sizing:inherit}body{margin:0;background-color:#dcdee0;overflow-x:auto;overflow-y:auto;overscroll-behavior-y:none}h1,h2,h3,h4,h5,h6{font-family:"PublicSans-Bold",sans-serif;color:#3d4551}h1{margin:0rem .2rem .9rem 0rem}h2,h3{margin:.75rem 0}h3.navhead{font-family:"PublicSans-Medium",sans-serif;font-weight:normal;margin:0 0 1rem 0;font-size:1.2rem}p{margin:.7rem .2rem .7rem 0rem;margin-block-start:0}label{font-family:"PublicSans-Bold",sans-serif;font-size:.9rem}hr{border:1px solid #dfe1e2}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15}button:not(:disabled):focus,input:not(:disabled):focus,optgroup:not(:disabled):focus,select:not(:disabled):focus,textarea:not(:disabled):focus{outline:3px solid #2491ff}legend{color:inherit}#header.site-header{background-color:#252f3e;padding:0 .5em;height:4.5rem;box-shadow:0px 4px 6px rgba(0,0,0,.2);color:#fff}#header.site-header .usa-navbar{width:100%;height:100%;display:flex}#header.site-header .usa-navbar .usa-logo a{position:relative;height:100%;text-decoration:none}#header.site-header .usa-navbar .usa-logo a span.leaf-logo{display:flex;align-items:center;width:56px;height:100%;margin-right:.5rem}#header.site-header .usa-navbar .usa-logo a span.leaf-logo img{width:56px;height:56px}#header.site-header .usa-navbar .usa-logo a .leaf-site-title,#header.site-header .usa-navbar .usa-logo a .leaf-header-description{position:absolute;left:62px;font-family:"PublicSans-Bold",sans-serif;font-style:normal;white-space:nowrap;color:inherit;margin:0}#header.site-header .usa-navbar .usa-logo a .leaf-site-title{top:17%;font-size:1.2rem}#header.site-header .usa-navbar .usa-logo a .leaf-header-description{top:calc(17% + 1.2rem + 5px);font-size:1rem;font-family:"PublicSans-Regular",sans-serif;font-weight:normal !important}#header.site-header .usa-navbar .leaf-header-right{margin:auto .5rem 0 auto;font-family:"PublicSans-Regular",sans-serif;text-align:right;display:flex;width:fit-content;height:100%}#header.site-header .usa-navbar .leaf-header-right #nav{margin:auto 0 0 0;height:auto}#header.site-header .usa-navbar .leaf-header-right #nav li#toggleMenu{margin-bottom:12px}#header.site-header .usa-navbar .leaf-header-right #nav li#toggleMenu.js-open{margin-top:1.5rem;margin-bottom:0}#header.site-header .usa-navbar .leaf-header-right #nav li#toggleMenu i{text-align:center}.usa-banner__header.bg-orange-topbanner{background-color:#d04000}.usa-banner__header p.usa-banner__header-text{margin:0;padding:.25em;font-size:.75rem;letter-spacing:.02rem}.lf-alert{padding:.25em;background-color:#d00d2d;color:#f6f6f2;font-family:"PublicSans-Medium",sans-serif}.usa-sidenav{font-family:"PublicSans-Regular",sans-serif;font-size:.9rem}.usa-sidenav__item{width:14.5rem}.usa-header{line-height:1.5;z-index:300}.usa-button{cursor:pointer;padding:.75rem;width:auto;min-width:6rem;font-family:"PublicSans-Bold",sans-serif;font-size:1.06rem;font-weight:700;white-space:nowrap;text-decoration:none;text-align:center;line-height:.9;color:#fff;background-color:#005ea2;border-radius:4px;background-clip:padding-box;border:2px solid rgba(0,0,0,0)}.usa-button.usa-button--secondary{background-color:#d83933}.usa-button.usa-button--base{background-color:#71767a}.usa-button.usa-button--outline{color:#005ea2;box-shadow:0 0 0 2px #005ea2 inset;background-color:rgba(0,0,0,0)}.usa-button:hover,.usa-button:focus,.usa-button:active{border:2px solid #000}.usa-button a{text-decoration:none}table.usa-table{font-size:.9rem;line-height:1.5;border-collapse:collapse;border-spacing:0;color:#1b1b1b;margin:1.25rem 0}table.usa-table caption{font-family:"Source Sans Pro Web","Helvetica Neue",Arial,Helvetica,sans-serif;text-align:left}table.usa-table th,table.usa-table td{background-color:#fff;border:1px solid #1b1b1b;font-weight:400;padding:.5em 1em}table.usa-table th{font-weight:bold;background-color:#dfe1e2}table.usa-table.usa-table--borderless th,table.usa-table.usa-table--borderless td{border:0;border-bottom:1px solid #1b1b1b;background-color:rgba(0,0,0,0)}ul.usa-sidenav{margin:0;padding-left:0;line-height:1.3;border-bottom:1px solid #dfe1e2;list-style-type:none;font-family:"PublicSans-Regular",sans-serif;font-size:1rem}ul.usa-sidenav li.usa-sidenav__item{border-top:1px solid #dfe1e2}ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button){display:block;padding:.5em 1em;text-decoration:none}ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button):hover,ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button):focus,ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button):active{color:#005ea2 !important;background-color:#f0f0f0}ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button):not(.usa-current){color:#565c65}ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button).usa-current{position:relative;color:#005ea2;font-weight:700}ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button).usa-current::after{position:absolute;bottom:4px;top:4px;left:4px;width:4px;display:block;content:"";border-radius:4px;background-color:#005ea2}form.usa-form{max-width:320px;line-height:1.3}form.usa-form a,form.usa-form a:hover,form.usa-form a:focus,form.usa-form a:active,form.usa-form a:visited{color:#445}form.usa-form .usa-label{font-size:1.06rem}form.usa-form .usa-select{appearance:none;background:#fff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDUuODNMMTUuMTcgOWwxLjQxLTEuNDFMMTIgMyA3LjQxIDcuNTkgOC44MyA5IDEyIDUuODN6bTAgMTIuMzRMOC44MyAxNWwtMS40MSAxLjQxTDEyIDIxbDQuNTktNC41OUwxNS4xNyAxNSAxMiAxOC4xN3oiLz48L3N2Zz4=) no-repeat right .25rem center;background-size:1.25rem}.usa-label{display:block;max-width:30rem;margin-top:1.5rem;font-weight:400;font-family:"Source Sans Pro Web","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.9rem}.usa-input,.usa-input-group,.usa-range,.usa-select,.usa-textarea,.usa-combo-box__input,.usa-combo-box__list{display:block;color:#1b1b1b;margin-top:.25rem;padding:.5rem;width:100%;height:2.5rem;border:1px solid #565c65;font-size:1.06rem}.usa-input#siteType,.usa-input-group#siteType,.usa-range#siteType,.usa-select#siteType,.usa-textarea#siteType,.usa-combo-box__input#siteType,.usa-combo-box__list#siteType{margin-bottom:2rem}.usa-textarea{height:10rem}.grid-container{margin:0 auto;padding:1rem;max-width:1024px}.grid-container .grid-row{display:flex;flex-wrap:wrap}.site-button-outline-secondary{-webkit-box-shadow:inset 0 0 0 2px hsla(0,0%,100%,.7);box-shadow:inset 0 0 0 2px hsla(0,0%,100%,.7);background-color:rgba(0,0,0,0);color:hsla(0,0%,100%,.7);padding:.7rem 1rem;font-size:.9rem;font-family:"PublicSans-Medium",sans-serif}.site-button-outline-secondary:hover{background-color:rgba(0,0,0,0);color:#fff;box-shadow:inset 0 0 0 2px #fff;text-decoration:none !important}.leaf-btn-icon{margin-right:.5rem}.leaf-btn-small{padding:.5rem}.leaf-btn-med{padding:.7rem;font-size:.9rem}.leaf-side-btn{width:14.5rem;display:block;margin:1rem 0 .5rem 0}.leaf-btn-green{background-color:#008a17}.leaf-btn-green:hover,.leaf-btn-green :focus,.leaf-btn-green :active{background-color:rgb(0,122.7,20.45)}.leaf-dialog-loader{text-align:center}.ui-sortable-placeholder{border:2px dashed #a9aeb1 !important;visibility:visible !important;background-color:#dcdee0 !important;box-shadow:0px 0px 0px #a7a9aa !important}.ui-dialog .ui-dialog-title{margin:0;font-family:"PublicSans-Bold",sans-serif}.ui-dialog .ui-dialog-titlebar{padding:.4em .75em}.ui-dialog .ui-dialog-content{padding:.75em;min-width:325px;min-height:280px}.sidenav,.sidenav-right{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0px 1px 3px rgba(0,0,0,.2);max-width:16.5rem;align-self:flex-start}.sidenav:hidden{background:none;background-color:rgba(0,0,0,0);box-shadow:none}.sidenav:empty{background:none;background-color:rgba(0,0,0,0);box-shadow:none;min-height:1px}.sidenav-right:hidden{background:none;background-color:rgba(0,0,0,0);box-shadow:none}.sidenav-right:empty{background:none;background-color:rgba(0,0,0,0);box-shadow:none;min-height:1px}.leaf-show-opts{font-size:.9rem;margin-top:1.2rem;cursor:pointer}.leaf-uag-nav{min-width:16.5rem;margin:.6rem 1rem}.leaf-code-container{padding:8px;border-radius:4px;display:none;resize:both;overflow:auto;box-shadow:0 2px 6px #8e8e8e;background-color:#fff}.leaf-left-nav{flex:20%;margin:.6rem 1rem .6rem 1rem}.leaf-right-nav{flex:20%;margin:.6rem 1rem .6rem 1rem}.main-content{position:relative;flex:60%;margin:.6rem 1rem;min-height:27rem}.main-content>h2:first-child{margin-top:0}.leaf-center-content{display:flex;margin:.6rem auto;font-family:"PublicSans-Regular",sans-serif}.main-content-noRight{display:inline-block;position:relative;width:70%;margin:0 1rem 1rem 2rem;min-height:27rem}h3.groupHeaders,#groupList>h2,#groupList>h3{margin-bottom:.5rem}#groupList>div.leaf-displayFlexRow{margin-bottom:1.25rem}.leaf-bold{font-family:"PublicSans-Bold",sans-serif}.leaf-font-normal{font-family:"PublicSans-Regular",sans-serif}.leaf-textLeft{text-align:left}.leaf-cursor-pointer{cursor:pointer}.leaf-clear-both{clear:both}.leaf-clearBoth{clear:both}.leaf-float-right{float:right}.leaf-float-left{float:left}.leaf-display-block{display:block}.leaf-displayFlexRow{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:left;align-items:stretch}.leaf-position-relative{position:relative}.leaf-ul{list-style-type:none;margin:.5rem 0;padding-inline-start:5px}.leaf-ul li{margin:0;font-size:.7rem;line-height:1.2rem}.leaf-border-bottom{border-bottom:1px solid #dfe1e2 !important}.leaf-row-space{height:1rem;margin:.2rem 0;clear:both}.leaf-crumb-link{font-weight:normal;color:#005ea2;font-family:"PublicSans-Medium",sans-serif !important}.leaf-crumb-caret{font-size:1.1rem;margin:0 .4rem 0 .5rem;color:#0c60a0}.leaf-buttonBar{text-align:center;margin:1.5rem 0 0 0}.leaf-content-show{display:block}.leaf-content-hide{display:none}.leaf-grey-box{padding:1rem;background-color:#e6e6e6}.groupUser{display:none}.leaf-user-search{display:flex;flex-direction:column}.leaf-user-search p{margin:.3rem 0 0 0;font-size:.9rem}.leaf-user-search input.leaf-user-search-input{padding:.5rem;font-family:"PublicSans-Regular",sans-serif;margin:.2rem 0;flex:auto;min-width:0;border-radius:0;color:#1b1b1b;border:1px solid #1b1b1b;display:block}.leaf-no-results{display:none;height:auto;margin-top:.5rem;padding:.5rem;background-color:#f4e3db;border-left:6px solid #d54309}.leaf-no-results i{margin-right:.5rem;font-size:1.72rem;vertical-align:sub}.leaf-no-results p{margin:0}.edit-card{cursor:move}.leaf-sitemap-card{flex:0 1 30%;min-width:20rem;max-width:23rem;margin:.5rem 1rem .5rem 0;padding:1.3rem;box-shadow:0px 2px 3px #a7a9aa;border:1px solid #ccc;height:5.8rem;background-color:#fff;border-radius:5px;transition:box-shadow .4s ease;white-space:wrap}.leaf-sitemap-card:hover,.leaf-sitemap-card:focus{box-shadow:0px 12px 9px #949191}.active{background-color:#faf3d1}.leaf-sitemap-card h3{margin:0rem 0 .5rem 0;font-size:1.2rem}.leaf-sitemap-card h3 a{text-decoration:none;color:#252f3e;font-family:"PublicSans-Medium",sans-serif}.leaf-sitemap-card h3 a:hover{text-decoration:underline;color:#004b76}.leaf-sitemap-card p{margin:.2rem 0;font-size:.84rem;line-height:1rem;font-family:"PublicSans-Light",sans-serif;word-break:break-word;white-space:normal}.leaf-delete-card{color:#2672de;font-size:1rem;vertical-align:middle;float:right;margin:0rem;cursor:pointer;white-space:normal}.leaf-sitemap-alert{padding:.4rem;border-radius:4px;box-shadow:1px 1px 5px #aaa;font-size:.8rem;font-family:"PublicSans-Regular",sans-serif;background-color:#aeedb4;color:#137d1d;border:1px solid #41aa4b;margin:0 0 0 1.3rem}.leaf-sitemap-flex-container{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start}.leaf-sitemap-flex-container>div{width:33%;box-sizing:border-box}div.groupBlock>h2,div.groupBlockWhite>h2{font-weight:400}.leaf-admin-content{padding:1em;margin:0 auto;min-width:325px;max-width:1088px}.leaf-admin-button{color:#3d4551;display:inline-block;width:19.4rem;height:3.4rem;cursor:pointer;margin:.6rem .6rem;box-shadow:2px 2px 2px rgba(0,0,20,.2);border-radius:4px;padding:.5rem .5rem .4rem .1rem;text-decoration:none;transition:box-shadow .4s ease,background-color 1.4s ease}.leaf-admin-button:hover,.leaf-admin-button:focus,.leaf-admin-button:active{box-shadow:2px 2px 4px rgba(0,0,20,.4)}.leaf-admin-button.lf-trans-blue:hover{background-color:#cfe8ff}.leaf-admin-button.lf-trans-green:hover{background-color:#b7f5bd}.leaf-admin-button.lf-trans-orange:hover{background-color:#f1d5b4}.leaf-admin-button.lf-trans-yellow:hover{background-color:#f2e5a4}.leaf-admin-button .leaf-admin-btnicon{font-size:1.7rem;float:left;margin:.3rem .4rem;text-align:center}.leaf-admin-button .leaf-icn-narrow2{padding-left:.2rem}.leaf-admin-button .leaf-icn-narrow4{padding-left:.4rem}.leaf-admin-button .leaf-admin-btntitle{font-size:1rem;line-height:1.4rem;font-family:"PublicSans-Bold",sans-serif;display:block;margin-left:2.9rem}.leaf-admin-button .leaf-admin-btndesc{font-size:.8rem;display:block;margin-left:2.9rem}.leaf-footer{font-size:.7rem;font-family:"PublicSans-Thin",sans-serif;padding:0rem .6rem;border-top:1px solid #a9aeb1;width:calc(100% - 5rem);margin:1rem auto 0 auto;text-align:right;clear:both}.leaf-footer a{text-decoration:none;color:#565c65}.leaf-footer a:hover{text-decoration:underline}ul.leaf-progress-bar{list-style-type:none;margin:0;padding-inline-start:0}ul.leaf-progress-bar li{float:left;width:10rem;height:3rem;margin-right:1.6rem;position:relative}ul.leaf-progress-bar li span.right{width:0;height:0;position:absolute;display:block;top:0;right:-1.5rem}ul.leaf-progress-bar li span.left{width:0;height:0;position:absolute;display:block;top:0;left:0rem}ul.leaf-progress-bar li h6{font-size:.9rem;margin:1rem 0rem 0rem 2rem}ul.leaf-progress-bar li.current{background-color:#d9e8f6}ul.leaf-progress-bar li.current span.right{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #d9e8f6;border-bottom:1.5rem solid rgba(0,0,0,0)}ul.leaf-progress-bar li.current span.left{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #fff;border-bottom:1.5rem solid rgba(0,0,0,0)}ul.leaf-progress-bar li.next{background-color:#dfe1e2}ul.leaf-progress-bar li.next span.right{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #dfe1e2;border-bottom:1.5rem solid rgba(0,0,0,0)}ul.leaf-progress-bar li.next span.left{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #fff;border-bottom:1.5rem solid rgba(0,0,0,0)}ul.leaf-progress-bar li.complete{background-color:#b8d293}ul.leaf-progress-bar li.complete span.right{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #b8d293;border-bottom:1.5rem solid rgba(0,0,0,0)}ul.leaf-progress-bar li.complete span.left{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #fff;border-bottom:1.5rem solid rgba(0,0,0,0)}.leaf-width-1rem{width:1rem}.leaf-width-2rem{width:2rem}.leaf-width-3rem{width:3rem}.leaf-width-4rem{width:4rem}.leaf-width-5rem{width:5rem}.leaf-width-6rem{width:6rem}.leaf-width-7rem{width:7rem}.leaf-width-8rem{width:8rem}.leaf-width-9rem{width:9rem}.leaf-width-10rem{width:10rem}.leaf-width-11rem{width:11rem}.leaf-width-12rem{width:12rem}.leaf-width-13rem{width:13rem}.leaf-width-14rem{width:14rem}.leaf-width-24rem{width:24rem}.leaf-padAll1rem{padding:1rem}.leaf-marginAll-1rem{margin:1rem}.leaf-marginTop-qtrRem{margin-top:.25rem}.leaf-marginTop-halfRem{margin-top:.5rem}.leaf-marginTopBot-halfRem{margin-top:.5rem;margin-bottom:.5rem}.leaf-marginTop-1rem{margin-top:1rem}.leaf-marginTop-2rem{margin-top:2rem}.leaf-marginBot-1rem{margin-bottom:1rem}.leaf-marginBot-halfRem{margin-bottom:.5rem}.leaf-marginTopBot-1rem{margin-bottom:1rem;margin-top:1rem}.leaf-marginLeft-qtrRem{margin-left:.25rem}.leaf-marginLeft-halfRem{margin-left:.5rem}.leaf-marginLeft-1rem{margin-left:1rem}.leaf-width10pct{width:10%}.leaf-width20pct{width:20%}.leaf-width25pct{width:25%}.leaf-width30pct{width:30%}.leaf-width40pct{width:40%}.leaf-width50pct{width:50%}.leaf-width60pct{width:60%}.leaf-width70pct{width:70%}.leaf-width75pct{width:75%}.leaf-width80pct{width:80%}.leaf-width90pct{width:90%}.leaf-width100pct{width:100%}.leaf-font0-5rem{font-size:.5rem}.leaf-font0-6rem{font-size:.6rem}.leaf-font0-7rem{font-size:.7rem}.leaf-font0-8rem{font-size:.8rem}.leaf-font0-9rem{font-size:.9rem}.leaf-font1rem{font-size:1rem}a.leaf-user-link{text-decoration:none}a.leaf-user-link:hover{text-decoration:underline}a.leaf-group-link:hover{text-decoration:none}a.leaf-remove-button:hover{text-decoration:none}.loading-modal{display:none;position:fixed;height:100%;width:100%;top:0;bottom:0;background:rgba(96,96,96,.8)}#body.loading .loading-modal{display:block}.loading-image{margin:15% auto;height:248px;width:250px;border-radius:50px;background:url(assets/loading_spinner.083c03ba8b4973b81e64.gif) no-repeat}.load-text{margin:auto;text-align:center;padding-top:10%;color:#fff}.load-cancel{margin:auto;left:0;bottom:0;text-align:center;padding-top:63%;padding-left:5%}.load-cancel button{width:50%}.load-cancel .usa-button--outline:hover{background-color:red}@media(max-width: 30rem){.usa-button{width:100%}.leaf-center-content{flex-direction:column}.main-content{margin:1rem}.leaf-admin-button{width:99%}}@media(min-width: 1025px){.main-content{margin-left:2rem}.usa-form{max-width:24rem}.ui-dialog .ui-dialog-content{min-width:500px}.ui-dialog .ui-dialog-title{font-size:1.25rem}.leaf-dialog-content{min-height:300px;max-width:54rem;min-width:27rem}}.bg-red-10{background-color:#f8e1de}.bg-red-cool-20{background-color:#ecbec6}.bg-red-50{background-color:#d83933}.bg-orange-10{background-color:#f2e4d4}.bg-orange-10v{background-color:#fce2c5}.bg-orange-warm-10v{background-color:#ffe2d1}.bg-orange-20{background-color:#f3bf90}.bg-orange-40{background-color:#e66f0e}.bg-orange-50{background-color:#a86437}.bg-gold-5v{background-color:#fef0c8}.bg-gold-10{background-color:#f1e5cd}.bg-gold-10v{background-color:#ffe396}.bg-yellow-5{background-color:#faf3d1}.bg-yellow-5v{background-color:#fff5c2}.bg-yellow-10{background-color:#f5e6af}.bg-yellow-10v{background-color:#fee685}.bg-green-warm-5v{background-color:#f5fbc1}.bg-green-10{background-color:#dfeacd}.bg-green-cool-10{background-color:#dbebde}.bg-mint-cool-5v{background-color:#d5fbf3}.bg-mint-10{background-color:#c7efe2}.bg-mint-cool-10{background-color:#c4eeeb}.bg-mint-cool-10v{background-color:#7efbe1}.bg-cyan-10{background-color:#ccecf2}.bg-cyan-20{background-color:#99deea}.bg-cyan-10v{background-color:#a8f2ff}.bg-cyan-20v{background-color:#52daf2}.bg-blue-5v{background-color:#e8f5ff}.bg-blue-10{background-color:#d9e8f6}.bg-blue-20{background-color:#aacdec}.bg-blue-warm-10{background-color:#e1e7f1}.bg-blue-warm-20{background-color:#bbcae4}.bg-blue-warm-10v{background-color:#d4e5ff}.bg-blue-warm-20v{background-color:#adcdff}.bg-blue-10v{background-color:#cfe8ff}.bg-blue-20v{background-color:#a1d3ff}.bg-blue-cool-10{background-color:#dae9ee}.bg-blue-cool-20{background-color:#adcfdc}.bg-blue-cool-10v{background-color:#c3ebfa}.bg-blue-cool-20v{background-color:#97d4ea}.bg-blue-50{background-color:#2378c3}.bg-indigo-cool-10{background-color:#e1e6f9}.bg-indigo-warm-10v{background-color:#e4deff}.bg-indigo-10{background-color:#e5e4fa}.bg-violet-10{background-color:#ebe3f9}.bg-magenta-10{background-color:#f6e1e8}.bg-gray-10{background-color:#e6e6e6}.text-white{color:#fff}.primary{color:#005ea2}.secondary{color:#d83933}.text-red-10{color:#f8e1de}.text-red-50{color:#d83933 !important}.text-secondary-darker{color:#8b0a03 !important}.text-orange-10{color:#f2e4d4}.text-orange-10v{color:#fce2c5}.text-orange-warm-40{color:#e17141}.text-orange-warm-40v{color:#ff580a}.text-orange-50{color:#a86437}.text-gold-40v{color:#c2850c}.text-gold-10{color:#f1e5cd}.text-gold-50{color:#8e704f}.text-yellow-10{color:#f5e6af}.text-yellow-40{color:#a88f48}.text-yellow-40v{color:#b38c00}.text-yellow-50{color:#8a7237}.text-green-warm-5v{color:#f5fbc1}.text-green-10{color:#dfeacd}.text-green-50{color:#607f35}.text-green-cool-50{color:#4d8055}.text-mint-cool-50{color:#40807e}.text-mint-cool-50v{color:#008480}.text-mint-50{color:#2e8367}.text-cyan-50{color:#168092}.text-cyan-50v{color:#0081a1}.text-blue-50{color:#2378c3}.text-blue-50v{color:#0076d6}.text-blue-cool-50{color:#3a7d95}.text-blue-warm-50{color:#4a77b4}.text-blue-warm-50v{color:#2672de}.text-blue-cool-50v{color:#0d7ea2}.text-indigo-40{color:#8889db}.text-indigo-cool-50{color:#496fd8}.text-violet-50{color:#8168b3}.text-magenta-10{color:#f6e1e8}.text-gray-10{color:#e6e6e6}.leaf-nav-icon{float:right;margin:.2rem .3rem .2rem 0;color:#00bde3}.lev3>a>i.fa-angle-down{display:none}.leaf-nav-icon-space{float:left;margin:0}.leaf-user-menu-name{white-space:normal;word-break:break-all;font-family:"PublicSans-Medium",sans-serif}#nav ul,#nav li{margin:0;padding:0;border:0;list-style:none;box-sizing:border-box;padding-inline-start:0}#nav>ul>li{text-align:left;font-family:"PublicSans-Regular",sans-serif}#nav>ul>li>ul>li>ul>li>a:hover,#nav>ul>li>ul>li>ul>li>a:focus{background-color:#2070b3;font-family:"PublicSans-Bold",sans-serif}#nav .js-hideElement{display:none}#nav .js-showElement{display:block}html.no-js li:hover>a+ul,html.no-js li:focus>a+ul{display:block}@media screen and (max-width: 60rem){#nav ul{position:relative;z-index:9999}#nav>ul>li.leaf-mob-menu{width:12.8rem;padding:.2rem 0;margin-left:-10rem}#nav>ul>li:not(#toggleMenu)>a{text-decoration:none;color:#f0f0ec;margin:.2rem .5rem}a+ul{position:relative}a+ul:not(.js-hideElement){display:block}#nav>ul>li:not(#toggleMenu){background-color:#274863;font-size:.8rem;padding:.3rem 0}#nav>ul>li:not(#toggleMenu)>a>i{margin-right:.6rem}#nav>ul>li:not(#toggleMenu):not(.js-showElement){display:none}#toggleMenu{margin-bottom:1rem}#toggleMenu a{text-decoration:none}#toggleMenu .leaf-menu{cursor:pointer;color:#fff;background-color:#252f3e;font-size:11px;font-family:"PublicSans-Regular",sans-serif;border:1px outset #fff;border-radius:3px;padding:.2rem;text-align:center}#nav #toggleMenu.js-open{margin:2rem .5rem 0 0}#nav #toggleMenu.js-open .fa-times{display:block;color:#fff;font-size:1.25rem}#nav #toggleMenu.js-open .leaf-menu{display:none}#nav #toggleMenu.js-open a{display:block;text-decoration:none;margin-bottom:.8rem}#nav #toggleMenu:not(.js-open) .fa-times{display:none}#nav #toggleMenu:not(.js-open) .leaf-menu{display:block;color:#fff;text-decoration:none}span#toggleMenu-text{position:absolute;opacity:0}#nav>ul>li>ul{background-color:#1d5689;z-index:9999;margin:.3rem 0rem 0rem 0rem}.lev3>a>i.fa-angle-left{display:none}.lev3>a>i.fa-angle-down{display:block}#nav>ul>li>ul:not(.js-showElement){display:none}#nav>ul>li>ul>li{padding:.2rem .2rem;width:12rem}#nav>ul>li>ul>li>a{color:#f0f0ec;text-decoration:none;padding:.3rem .4rem .3rem .4rem}#nav>ul>li>ul>li>ul{width:100%;z-index:9999;background-color:#2070b3;margin:.2rem .4rem .2rem .4rem}#nav>ul>li>ul>li>ul>li{padding:.3rem 0}#nav>ul>li>ul>li>ul:not(.js-showElement){display:none}#nav>ul>li>ul>li>ul>li>a{background-color:#2070b3;color:#f0f0ec;padding:.2rem .2rem .2rem .4rem;text-decoration:none}html.no-js #nav:hover>ul>li:not(#toggleMenu),html.no-js #nav:focus>ul>li:not(#toggleMenu){display:block}html.no-js #nav:hover li:hover>a+ul,html.no-js #nav:hover li:focus>a+ul,html.no-js #nav:focus li:hover>a+ul,html.no-js #nav:focus li:focus>a+ul{display:block}}@media screen and (min-width: 961px){#nav ul{z-index:9999}#nav li{position:relative;margin-right:.9rem}#nav ul li a{text-decoration:none;display:block;padding:.4rem .7rem .4rem .7rem;color:#f0f0ec}a+ul{position:absolute}a+ul:not(.js-showElement){display:none}#nav>ul>li{position:relative;float:left;font-size:.8rem;margin-left:.2rem}.leaf-usericon{font-size:1.1rem;line-height:.9rem}#nav>ul>li>a{background-color:#252f3e}#nav>ul>li>a:hover,#nav>ul>li>a:focus,#nav>ul>li>a.js-openSubMenu{background-color:#274863;font-family:"PublicSans-Bold",sans-serif}#nav>ul>li:hover>a,#nav>ul>li:focus>a{background-color:#274863}#nav>ul>li:not(:last-child){border:0}#nav>ul>li:not(#toggleMenu):not(.js-showElement){display:inline-block}#nav #toggleMenu{display:none}#nav>ul>li>ul{background-color:#274863;left:-4rem;width:12rem;font-size:.8rem;box-shadow:-2px 4px 4px rgba(0,0,0,.2)}#nav>ul>li>ul.leaf-usernavmenu{left:-8rem}#nav>ul>li>ul>li{padding:.2rem;width:12rem}#nav>ul>li>ul>li>a{padding:.2rem}#nav>ul>li>ul>li:hover,#nav>ul>li>ul>li>a:hover,#nav>ul>li>ul>li>a:focus,#nav>ul>li>ul>li>a:focus-within{background-color:#2070b3;font-family:"PublicSans-Bold",sans-serif}#nav>ul>li>ul>li>ul{top:0;left:-12rem;width:12rem;font-family:"PublicSans-Regular",sans-serif;z-index:9999;box-shadow:-2px 2px 4px rgba(0,0,0,.2);background-color:#2070b3}#nav>ul>li>ul>li>ul>li>a{color:#f0f0ec;padding:.3rem;text-decoration:none;margin-left:.1rem}} + */:root,:host{--fa-style-family-classic: "Font Awesome 6 Free";--fa-font-solid: normal 900 1em/1 "Font Awesome 6 Free"}@font-face{font-family:"Font Awesome 6 Free";font-style:normal;font-weight:900;font-display:block;src:url(fonts/fontawesome/fa-solid-900.woff2) format("woff2"),url(fonts/fontawesome/fa-solid-900.ttf) format("truetype")}.fas,.fa-solid{font-weight:900}@font-face{font-family:"fa-solid";src:url(fonts/fontawesome/fa-solid-900.woff2) format("woff2"),url(fonts/fontawesome/fa-solid-900.woff) format("woff")}@font-face{font-family:"PublicSans-Thin";src:url(fonts/public-sans/PublicSans-Thin.woff2) format("woff2"),url(fonts/public-sans/PublicSans-Thin.woff) format("woff")}@font-face{font-family:"PublicSans-Light";src:url(fonts/public-sans/PublicSans-Light.woff2) format("woff2"),url(fonts/public-sans/PublicSans-Light.woff) format("woff")}@font-face{font-family:"PublicSans-Regular";src:url(fonts/public-sans/PublicSans-Regular.woff2) format("woff2"),url(fonts/public-sans/PublicSans-Regular.woff) format("woff")}@font-face{font-family:"PublicSans-Medium";src:url(fonts/public-sans/PublicSans-Medium.woff2) format("woff2"),url(fonts/public-sans/PublicSans-Medium.woff) format("woff")}@font-face{font-family:"PublicSans-Bold";src:url(fonts/public-sans/PublicSans-Bold.woff2) format("woff2"),url(fonts/public-sans/PublicSans-Bold.woff) format("woff")}@font-face{font-family:"Source Sans Pro Web";src:url(fonts/source-sans-pro/sourcesanspro-regular-webfont.woff2) format("woff2"),url(fonts/source-sans-pro/sourcesanspro-regular-webfont.woff) format("woff")}@font-face{font-family:"Source Sans Pro Web-Bold";src:url(fonts/source-sans-pro/sourcesanspro-bold-webfont.woff2) format("woff2"),url(fonts/source-sans-pro/sourcesanspro-bold-webfont.woff) format("woff")}.fas{font-family:"fa-solid"}html{box-sizing:border-box;line-height:1.15;font-family:"Source Sans Pro Web","Helvetica Neue",Helvetica,Arial,sans-serif}*,::after,::before{box-sizing:inherit}body{margin:0;background-color:#dcdee0;overflow-x:auto;overflow-y:auto;overscroll-behavior-y:none}h1,h2,h3,h4,h5,h6{font-family:"PublicSans-Bold",sans-serif;color:#3d4551}h1{margin:0rem .2rem .9rem 0rem}h2,h3{margin:.75rem 0}h3.navhead{font-family:"PublicSans-Medium",sans-serif;font-weight:normal;margin:0 0 1rem 0;font-size:1.2rem}p{margin:.7rem .2rem .7rem 0rem;margin-block-start:0}label{font-family:"PublicSans-Bold",sans-serif;font-size:.9rem}hr{border:1px solid #dfe1e2}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15}button:not(:disabled):focus,input:not(:disabled):focus,optgroup:not(:disabled):focus,select:not(:disabled):focus,textarea:not(:disabled):focus{outline:3px solid #2491ff}legend{color:inherit}#header.site-header{background-color:#252f3e;padding:0 .5em;height:4.5rem;box-shadow:0px 4px 6px rgba(0,0,0,.2);color:#fff}#header.site-header .usa-navbar{width:100%;height:100%;display:flex}#header.site-header .usa-navbar .usa-logo a{position:relative;height:100%;text-decoration:none}#header.site-header .usa-navbar .usa-logo a span.leaf-logo{display:flex;align-items:center;width:56px;height:100%;margin-right:.5rem}#header.site-header .usa-navbar .usa-logo a span.leaf-logo img{width:56px;height:56px}#header.site-header .usa-navbar .usa-logo a .leaf-site-title,#header.site-header .usa-navbar .usa-logo a .leaf-header-description{position:absolute;left:62px;font-family:"PublicSans-Bold",sans-serif;font-style:normal;white-space:nowrap;color:inherit;margin:0}#header.site-header .usa-navbar .usa-logo a .leaf-site-title{top:17%;font-size:1.2rem}#header.site-header .usa-navbar .usa-logo a .leaf-header-description{top:calc(17% + 1.2rem + 5px);font-size:1rem;font-family:"PublicSans-Regular",sans-serif;font-weight:normal !important}#header.site-header .usa-navbar .leaf-header-right{margin:auto .5rem 0 auto;font-family:"PublicSans-Regular",sans-serif;text-align:right;display:flex;width:fit-content;height:100%}#header.site-header .usa-navbar .leaf-header-right #nav{margin:auto 0 0 0;height:auto}#header.site-header .usa-navbar .leaf-header-right #nav li#toggleMenu{margin-bottom:12px}#header.site-header .usa-navbar .leaf-header-right #nav li#toggleMenu.js-open{margin-top:1.5rem;margin-bottom:0}#header.site-header .usa-navbar .leaf-header-right #nav li#toggleMenu i{text-align:center}.usa-banner__header.bg-orange-topbanner{background-color:#d04000}.usa-banner__header p.usa-banner__header-text{margin:0;padding:.25em;font-size:.75rem;letter-spacing:.02rem}.lf-alert{padding:.25em;background-color:#d00d2d;color:#f6f6f2;font-family:"PublicSans-Medium",sans-serif}.usa-sidenav{font-family:"PublicSans-Regular",sans-serif;font-size:.9rem}.usa-sidenav__item{width:14.5rem}.usa-header{line-height:1.5;z-index:300}.usa-button{cursor:pointer;padding:.75rem;width:auto;min-width:6rem;font-family:"PublicSans-Bold",sans-serif;font-size:1.06rem;font-weight:700;white-space:nowrap;text-decoration:none;text-align:center;line-height:.9;color:#fff;background-color:#005ea2;border-radius:4px;background-clip:padding-box;border:2px solid rgba(0,0,0,0)}.usa-button.usa-button--secondary{background-color:#d83933}.usa-button.usa-button--base{background-color:#71767a}.usa-button.usa-button--outline{color:#005ea2;box-shadow:0 0 0 2px #005ea2 inset;background-color:rgba(0,0,0,0)}.usa-button:hover,.usa-button:focus,.usa-button:active{border:2px solid #000}.usa-button a{text-decoration:none}table.usa-table{font-size:.9rem;line-height:1.5;border-collapse:collapse;border-spacing:0;color:#1b1b1b;margin:1.25rem 0}table.usa-table caption{font-family:"Source Sans Pro Web","Helvetica Neue",Arial,Helvetica,sans-serif;text-align:left}table.usa-table th,table.usa-table td{background-color:#fff;border:1px solid #1b1b1b;font-weight:400;padding:.5em 1em}table.usa-table th{font-weight:bold;background-color:#dfe1e2}table.usa-table.usa-table--borderless th,table.usa-table.usa-table--borderless td{border:0;border-bottom:1px solid #1b1b1b;background-color:rgba(0,0,0,0)}ul.usa-sidenav{margin:0;padding-left:0;line-height:1.3;border-bottom:1px solid #dfe1e2;list-style-type:none;font-family:"PublicSans-Regular",sans-serif;font-size:1rem}ul.usa-sidenav li.usa-sidenav__item{border-top:1px solid #dfe1e2}ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button){display:block;padding:.5em 1em;text-decoration:none}ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button):hover,ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button):focus,ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button):active{color:#005ea2 !important;background-color:#f0f0f0}ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button):not(.usa-current){color:#565c65}ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button).usa-current{position:relative;color:#005ea2;font-weight:700}ul.usa-sidenav li.usa-sidenav__item a:not(.usa-button).usa-current::after{position:absolute;bottom:4px;top:4px;left:4px;width:4px;display:block;content:"";border-radius:4px;background-color:#005ea2}form.usa-form{max-width:320px;line-height:1.3}form.usa-form a,form.usa-form a:hover,form.usa-form a:focus,form.usa-form a:active,form.usa-form a:visited{color:#445}form.usa-form .usa-label{font-size:1.06rem}form.usa-form .usa-select{appearance:none;background:#fff url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjI0Ij48cGF0aCBkPSJNMCAwaDI0djI0SDB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTEyIDUuODNMMTUuMTcgOWwxLjQxLTEuNDFMMTIgMyA3LjQxIDcuNTkgOC44MyA5IDEyIDUuODN6bTAgMTIuMzRMOC44MyAxNWwtMS40MSAxLjQxTDEyIDIxbDQuNTktNC41OUwxNS4xNyAxNSAxMiAxOC4xN3oiLz48L3N2Zz4=) no-repeat right .25rem center;background-size:1.25rem}.usa-label{display:block;max-width:30rem;margin-top:1.5rem;font-weight:400;font-family:"Source Sans Pro Web","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:.9rem}.usa-input,.usa-input-group,.usa-range,.usa-select,.usa-textarea,.usa-combo-box__input,.usa-combo-box__list{display:block;color:#1b1b1b;margin-top:.25rem;padding:.5rem;width:100%;height:2.5rem;border:1px solid #565c65;font-size:1.06rem}.usa-input#siteType,.usa-input-group#siteType,.usa-range#siteType,.usa-select#siteType,.usa-textarea#siteType,.usa-combo-box__input#siteType,.usa-combo-box__list#siteType{margin-bottom:2rem}.usa-textarea{height:10rem}.grid-container{margin:0 auto;padding:1rem;max-width:1024px}.grid-container .grid-row{display:flex;flex-wrap:wrap}.site-button-outline-secondary{-webkit-box-shadow:inset 0 0 0 2px hsla(0,0%,100%,.7);box-shadow:inset 0 0 0 2px hsla(0,0%,100%,.7);background-color:rgba(0,0,0,0);color:hsla(0,0%,100%,.7);padding:.7rem 1rem;font-size:.9rem;font-family:"PublicSans-Medium",sans-serif}.site-button-outline-secondary:hover{background-color:rgba(0,0,0,0);color:#fff;box-shadow:inset 0 0 0 2px #fff;text-decoration:none !important}.leaf-btn-icon{margin-right:.5rem}.leaf-btn-small{padding:.5rem}.leaf-btn-med{padding:.7rem;font-size:.9rem}.leaf-side-btn{width:14.5rem;display:block;margin:1rem 0 .5rem 0}.leaf-btn-green{background-color:#008a17}.leaf-btn-green:hover,.leaf-btn-green :focus,.leaf-btn-green :active{background-color:rgb(0,124.2,20.7)}.leaf-dialog-loader{text-align:center}.ui-sortable-placeholder{border:2px dashed #a9aeb1 !important;visibility:visible !important;background-color:#dcdee0 !important;box-shadow:0px 0px 0px #a7a9aa !important}.ui-dialog .ui-dialog-title{margin:0;font-family:"PublicSans-Bold",sans-serif}.ui-dialog .ui-dialog-titlebar{padding:.4em .75em}.ui-dialog .ui-dialog-content{padding:.75em;min-width:325px;min-height:280px}.sidenav,.sidenav-right{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0px 1px 3px rgba(0,0,0,.2);max-width:16.5rem;align-self:flex-start}.sidenav:hidden{background:none;background-color:rgba(0,0,0,0);box-shadow:none}.sidenav:empty{background:none;background-color:rgba(0,0,0,0);box-shadow:none;min-height:1px}.sidenav-right:hidden{background:none;background-color:rgba(0,0,0,0);box-shadow:none}.sidenav-right:empty{background:none;background-color:rgba(0,0,0,0);box-shadow:none;min-height:1px}.leaf-show-opts{font-size:.9rem;margin-top:1.2rem;cursor:pointer}.leaf-uag-nav{min-width:16.5rem;margin:.6rem 1rem}.leaf-code-container{padding:8px;border-radius:4px;display:none;resize:both;overflow:auto;box-shadow:0 2px 6px #8e8e8e;background-color:#fff}.leaf-left-nav{flex:20%;margin:.6rem 1rem .6rem 1rem}.leaf-right-nav{flex:20%;margin:.6rem 1rem .6rem 1rem}.main-content{position:relative;flex:60%;margin:.6rem 1rem;min-height:27rem}.main-content>h2:first-child{margin-top:0}.leaf-center-content{display:flex;margin:.6rem auto;font-family:"PublicSans-Regular",sans-serif}.main-content-noRight{display:inline-block;position:relative;width:70%;margin:0 1rem 1rem 2rem;min-height:27rem}h3.groupHeaders,#groupList>h2,#groupList>h3{margin-bottom:.5rem}#groupList>div.leaf-displayFlexRow{margin-bottom:1.25rem}.leaf-bold{font-family:"PublicSans-Bold",sans-serif}.leaf-font-normal{font-family:"PublicSans-Regular",sans-serif}.leaf-textLeft{text-align:left}.leaf-cursor-pointer{cursor:pointer}.leaf-clear-both{clear:both}.leaf-clearBoth{clear:both}.leaf-float-right{float:right}.leaf-float-left{float:left}.leaf-display-block{display:block}.leaf-displayFlexRow{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:left;align-items:stretch}.leaf-position-relative{position:relative}.leaf-ul{list-style-type:none;margin:.5rem 0;padding-inline-start:5px}.leaf-ul li{margin:0;font-size:.7rem;line-height:1.2rem}.leaf-border-bottom{border-bottom:1px solid #dfe1e2 !important}.leaf-row-space{height:1rem;margin:.2rem 0;clear:both}.leaf-crumb-link{font-weight:normal;color:#005ea2;font-family:"PublicSans-Medium",sans-serif !important}.leaf-crumb-caret{font-size:1.1rem;margin:0 .4rem 0 .5rem;color:#0c60a0}.leaf-buttonBar{text-align:center;margin:1.5rem 0 0 0}.leaf-content-show{display:block}.leaf-content-hide{display:none}.leaf-grey-box{padding:1rem;background-color:#e6e6e6}.groupUser{display:none}.leaf-user-search{display:flex;flex-direction:column}.leaf-user-search p{margin:.3rem 0 0 0;font-size:.9rem}.leaf-user-search input.leaf-user-search-input{padding:.5rem;font-family:"PublicSans-Regular",sans-serif;margin:.2rem 0;flex:auto;min-width:0;border-radius:0;color:#1b1b1b;border:1px solid #1b1b1b;display:block}.leaf-no-results{display:none;height:auto;margin-top:.5rem;padding:.5rem;background-color:#f4e3db;border-left:6px solid #d54309}.leaf-no-results i{margin-right:.5rem;font-size:1.72rem;vertical-align:sub}.leaf-no-results p{margin:0}.edit-card{cursor:move}.leaf-sitemap-card{flex:0 1 30%;min-width:20rem;max-width:23rem;margin:.5rem 1rem .5rem 0;padding:1.3rem;box-shadow:0px 2px 3px #a7a9aa;border:1px solid #ccc;height:5.8rem;background-color:#fff;border-radius:5px;transition:box-shadow .4s ease;white-space:wrap}.leaf-sitemap-card:hover,.leaf-sitemap-card:focus{box-shadow:0px 12px 9px #949191}.active{background-color:#faf3d1}.leaf-sitemap-card h3{margin:0rem 0 .5rem 0;font-size:1.2rem}.leaf-sitemap-card h3 a{text-decoration:none;color:#252f3e;font-family:"PublicSans-Medium",sans-serif}.leaf-sitemap-card h3 a:hover{text-decoration:underline;color:#004b76}.leaf-sitemap-card p{margin:.2rem 0;font-size:.84rem;line-height:1rem;font-family:"PublicSans-Light",sans-serif;word-break:break-word;white-space:normal}.leaf-delete-card{color:#2672de;font-size:1rem;vertical-align:middle;float:right;margin:0rem;cursor:pointer;white-space:normal}.leaf-sitemap-alert{padding:.4rem;border-radius:4px;box-shadow:1px 1px 5px #aaa;font-size:.8rem;font-family:"PublicSans-Regular",sans-serif;background-color:#aeedb4;color:#137d1d;border:1px solid #41aa4b;margin:0 0 0 1.3rem}.leaf-sitemap-flex-container{display:flex;flex-wrap:wrap;justify-content:center;align-items:flex-start}.leaf-sitemap-flex-container>div{width:33%;box-sizing:border-box}div.groupBlock>h2,div.groupBlockWhite>h2{font-weight:400}.leaf-admin-content{padding:1em;margin:0 auto;min-width:325px;max-width:1088px}.leaf-admin-button{color:#3d4551;display:inline-block;width:19.4rem;height:3.4rem;cursor:pointer;margin:.6rem .6rem;box-shadow:2px 2px 2px rgba(0,0,20,.2);border-radius:4px;padding:.5rem .5rem .4rem .1rem;text-decoration:none;transition:box-shadow .4s ease,background-color 1.4s ease}.leaf-admin-button:hover,.leaf-admin-button:focus,.leaf-admin-button:active{box-shadow:2px 2px 4px rgba(0,0,20,.4)}.leaf-admin-button.lf-trans-blue:hover{background-color:#cfe8ff}.leaf-admin-button.lf-trans-green:hover{background-color:#b7f5bd}.leaf-admin-button.lf-trans-orange:hover{background-color:#f1d5b4}.leaf-admin-button.lf-trans-yellow:hover{background-color:#f2e5a4}.leaf-admin-button .leaf-admin-btnicon{font-size:1.7rem;float:left;margin:.3rem .4rem;text-align:center}.leaf-admin-button .leaf-icn-narrow2{padding-left:.2rem}.leaf-admin-button .leaf-icn-narrow4{padding-left:.4rem}.leaf-admin-button .leaf-admin-btntitle{font-size:1rem;line-height:1.4rem;font-family:"PublicSans-Bold",sans-serif;display:block;margin-left:2.9rem}.leaf-admin-button .leaf-admin-btndesc{font-size:.8rem;display:block;margin-left:2.9rem}.leaf-footer{font-size:.7rem;font-family:"PublicSans-Thin",sans-serif;padding:0rem .6rem;border-top:1px solid #a9aeb1;width:calc(100% - 5rem);margin:1rem auto 0 auto;text-align:right;clear:both}.leaf-footer a{text-decoration:none;color:#565c65}.leaf-footer a:hover{text-decoration:underline}ul.leaf-progress-bar{list-style-type:none;margin:0;padding-inline-start:0}ul.leaf-progress-bar li{float:left;width:10rem;height:3rem;margin-right:1.6rem;position:relative}ul.leaf-progress-bar li span.right{width:0;height:0;position:absolute;display:block;top:0;right:-1.5rem}ul.leaf-progress-bar li span.left{width:0;height:0;position:absolute;display:block;top:0;left:0rem}ul.leaf-progress-bar li h6{font-size:.9rem;margin:1rem 0rem 0rem 2rem}ul.leaf-progress-bar li.current{background-color:#d9e8f6}ul.leaf-progress-bar li.current span.right{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #d9e8f6;border-bottom:1.5rem solid rgba(0,0,0,0)}ul.leaf-progress-bar li.current span.left{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #fff;border-bottom:1.5rem solid rgba(0,0,0,0)}ul.leaf-progress-bar li.next{background-color:#dfe1e2}ul.leaf-progress-bar li.next span.right{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #dfe1e2;border-bottom:1.5rem solid rgba(0,0,0,0)}ul.leaf-progress-bar li.next span.left{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #fff;border-bottom:1.5rem solid rgba(0,0,0,0)}ul.leaf-progress-bar li.complete{background-color:#b8d293}ul.leaf-progress-bar li.complete span.right{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #b8d293;border-bottom:1.5rem solid rgba(0,0,0,0)}ul.leaf-progress-bar li.complete span.left{border-top:1.5rem solid rgba(0,0,0,0);border-left:1.5rem solid #fff;border-bottom:1.5rem solid rgba(0,0,0,0)}.leaf-width-1rem{width:1rem}.leaf-width-2rem{width:2rem}.leaf-width-3rem{width:3rem}.leaf-width-4rem{width:4rem}.leaf-width-5rem{width:5rem}.leaf-width-6rem{width:6rem}.leaf-width-7rem{width:7rem}.leaf-width-8rem{width:8rem}.leaf-width-9rem{width:9rem}.leaf-width-10rem{width:10rem}.leaf-width-11rem{width:11rem}.leaf-width-12rem{width:12rem}.leaf-width-13rem{width:13rem}.leaf-width-14rem{width:14rem}.leaf-width-24rem{width:24rem}.leaf-padAll1rem{padding:1rem}.leaf-marginAll-1rem{margin:1rem}.leaf-marginTop-qtrRem{margin-top:.25rem}.leaf-marginTop-halfRem{margin-top:.5rem}.leaf-marginTopBot-halfRem{margin-top:.5rem;margin-bottom:.5rem}.leaf-marginTop-1rem{margin-top:1rem}.leaf-marginTop-2rem{margin-top:2rem}.leaf-marginBot-1rem{margin-bottom:1rem}.leaf-marginBot-halfRem{margin-bottom:.5rem}.leaf-marginTopBot-1rem{margin-bottom:1rem;margin-top:1rem}.leaf-marginLeft-qtrRem{margin-left:.25rem}.leaf-marginLeft-halfRem{margin-left:.5rem}.leaf-marginLeft-1rem{margin-left:1rem}.leaf-width10pct{width:10%}.leaf-width20pct{width:20%}.leaf-width25pct{width:25%}.leaf-width30pct{width:30%}.leaf-width40pct{width:40%}.leaf-width50pct{width:50%}.leaf-width60pct{width:60%}.leaf-width70pct{width:70%}.leaf-width75pct{width:75%}.leaf-width80pct{width:80%}.leaf-width90pct{width:90%}.leaf-width100pct{width:100%}.leaf-font0-5rem{font-size:.5rem}.leaf-font0-6rem{font-size:.6rem}.leaf-font0-7rem{font-size:.7rem}.leaf-font0-8rem{font-size:.8rem}.leaf-font0-9rem{font-size:.9rem}.leaf-font1rem{font-size:1rem}a.leaf-user-link{text-decoration:none}a.leaf-user-link:hover{text-decoration:underline}a.leaf-group-link:hover{text-decoration:none}a.leaf-remove-button:hover{text-decoration:none}.loading-modal{display:none;position:fixed;height:100%;width:100%;top:0;bottom:0;background:rgba(96,96,96,.8)}#body.loading .loading-modal{display:block}.loading-image{margin:15% auto;height:248px;width:250px;border-radius:50px;background:url(assets/loading_spinner.083c03ba8b4973b81e64.gif) no-repeat}.load-text{margin:auto;text-align:center;padding-top:10%;color:#fff}.load-cancel{margin:auto;left:0;bottom:0;text-align:center;padding-top:63%;padding-left:5%}.load-cancel button{width:50%}.load-cancel .usa-button--outline:hover{background-color:red}@media(max-width: 30rem){.usa-button{width:100%}.leaf-center-content{flex-direction:column}.main-content{margin:1rem}.leaf-admin-button{width:99%}}@media(min-width: 1025px){.main-content{margin-left:2rem}.usa-form{max-width:24rem}.ui-dialog .ui-dialog-content{min-width:500px}.ui-dialog .ui-dialog-title{font-size:1.25rem}.leaf-dialog-content{min-height:300px;max-width:54rem;min-width:27rem}}.bg-red-10{background-color:#f8e1de}.bg-red-cool-20{background-color:#ecbec6}.bg-red-50{background-color:#d83933}.bg-orange-10{background-color:#f2e4d4}.bg-orange-10v{background-color:#fce2c5}.bg-orange-warm-10v{background-color:#ffe2d1}.bg-orange-20{background-color:#f3bf90}.bg-orange-40{background-color:#e66f0e}.bg-orange-50{background-color:#a86437}.bg-gold-5v{background-color:#fef0c8}.bg-gold-10{background-color:#f1e5cd}.bg-gold-10v{background-color:#ffe396}.bg-yellow-5{background-color:#faf3d1}.bg-yellow-5v{background-color:#fff5c2}.bg-yellow-10{background-color:#f5e6af}.bg-yellow-10v{background-color:#fee685}.bg-green-warm-5v{background-color:#f5fbc1}.bg-green-10{background-color:#dfeacd}.bg-green-cool-10{background-color:#dbebde}.bg-mint-cool-5v{background-color:#d5fbf3}.bg-mint-10{background-color:#c7efe2}.bg-mint-cool-10{background-color:#c4eeeb}.bg-mint-cool-10v{background-color:#7efbe1}.bg-cyan-10{background-color:#ccecf2}.bg-cyan-20{background-color:#99deea}.bg-cyan-10v{background-color:#a8f2ff}.bg-cyan-20v{background-color:#52daf2}.bg-blue-5v{background-color:#e8f5ff}.bg-blue-10{background-color:#d9e8f6}.bg-blue-20{background-color:#aacdec}.bg-blue-warm-10{background-color:#e1e7f1}.bg-blue-warm-20{background-color:#bbcae4}.bg-blue-warm-10v{background-color:#d4e5ff}.bg-blue-warm-20v{background-color:#adcdff}.bg-blue-10v{background-color:#cfe8ff}.bg-blue-20v{background-color:#a1d3ff}.bg-blue-cool-10{background-color:#dae9ee}.bg-blue-cool-20{background-color:#adcfdc}.bg-blue-cool-10v{background-color:#c3ebfa}.bg-blue-cool-20v{background-color:#97d4ea}.bg-blue-50{background-color:#2378c3}.bg-indigo-cool-10{background-color:#e1e6f9}.bg-indigo-warm-10v{background-color:#e4deff}.bg-indigo-10{background-color:#e5e4fa}.bg-violet-10{background-color:#ebe3f9}.bg-magenta-10{background-color:#f6e1e8}.bg-gray-10{background-color:#e6e6e6}.text-white{color:#fff}.primary{color:#005ea2}.secondary{color:#d83933}.text-red-10{color:#f8e1de}.text-red-50{color:#d83933 !important}.text-secondary-darker{color:#8b0a03 !important}.text-orange-10{color:#f2e4d4}.text-orange-10v{color:#fce2c5}.text-orange-warm-40{color:#e17141}.text-orange-warm-40v{color:#ff580a}.text-orange-50{color:#a86437}.text-gold-40v{color:#c2850c}.text-gold-10{color:#f1e5cd}.text-gold-50{color:#8e704f}.text-yellow-10{color:#f5e6af}.text-yellow-40{color:#a88f48}.text-yellow-40v{color:#b38c00}.text-yellow-50{color:#8a7237}.text-green-warm-5v{color:#f5fbc1}.text-green-10{color:#dfeacd}.text-green-50{color:#607f35}.text-green-cool-50{color:#4d8055}.text-mint-cool-50{color:#40807e}.text-mint-cool-50v{color:#008480}.text-mint-50{color:#2e8367}.text-cyan-50{color:#168092}.text-cyan-50v{color:#0081a1}.text-blue-50{color:#2378c3}.text-blue-50v{color:#0076d6}.text-blue-cool-50{color:#3a7d95}.text-blue-warm-50{color:#4a77b4}.text-blue-warm-50v{color:#2672de}.text-blue-cool-50v{color:#0d7ea2}.text-indigo-40{color:#8889db}.text-indigo-cool-50{color:#496fd8}.text-violet-50{color:#8168b3}.text-magenta-10{color:#f6e1e8}.text-gray-10{color:#e6e6e6}.leaf-nav-icon{float:right;margin:.2rem .3rem .2rem 0;color:#00bde3}.lev3>a>i.fa-angle-down{display:none}.leaf-nav-icon-space{float:left;margin:0}.leaf-user-menu-name{white-space:normal;word-break:break-all;font-family:"PublicSans-Medium",sans-serif}#nav ul,#nav li{margin:0;padding:0;border:0;list-style:none;box-sizing:border-box;padding-inline-start:0}#nav>ul>li{text-align:left;font-family:"PublicSans-Regular",sans-serif}#nav>ul>li>ul>li>ul>li>a:hover,#nav>ul>li>ul>li>ul>li>a:focus{background-color:#2070b3;font-family:"PublicSans-Bold",sans-serif}#nav .js-hideElement{display:none}#nav .js-showElement{display:block}html.no-js li:hover>a+ul,html.no-js li:focus>a+ul{display:block}@media screen and (max-width: 60rem){#nav ul{position:relative;z-index:9999}#nav>ul>li.leaf-mob-menu{width:12.8rem;padding:.2rem 0;margin-left:-10rem}#nav>ul>li:not(#toggleMenu)>a{text-decoration:none;color:#f0f0ec;margin:.2rem .5rem}a+ul{position:relative}a+ul:not(.js-hideElement){display:block}#nav>ul>li:not(#toggleMenu){background-color:#274863;font-size:.8rem;padding:.3rem 0}#nav>ul>li:not(#toggleMenu)>a>i{margin-right:.6rem}#nav>ul>li:not(#toggleMenu):not(.js-showElement){display:none}#toggleMenu{margin-bottom:1rem}#toggleMenu a{text-decoration:none}#toggleMenu .leaf-menu{cursor:pointer;color:#fff;background-color:#252f3e;font-size:11px;font-family:"PublicSans-Regular",sans-serif;border:1px outset #fff;border-radius:3px;padding:.2rem;text-align:center}#nav #toggleMenu.js-open{margin:2rem .5rem 0 0}#nav #toggleMenu.js-open .fa-times{display:block;color:#fff;font-size:1.25rem}#nav #toggleMenu.js-open .leaf-menu{display:none}#nav #toggleMenu.js-open a{display:block;text-decoration:none;margin-bottom:.8rem}#nav #toggleMenu:not(.js-open) .fa-times{display:none}#nav #toggleMenu:not(.js-open) .leaf-menu{display:block;color:#fff;text-decoration:none}span#toggleMenu-text{position:absolute;opacity:0}#nav>ul>li>ul{background-color:#1d5689;z-index:9999;margin:.3rem 0rem 0rem 0rem}.lev3>a>i.fa-angle-left{display:none}.lev3>a>i.fa-angle-down{display:block}#nav>ul>li>ul:not(.js-showElement){display:none}#nav>ul>li>ul>li{padding:.2rem .2rem;width:12rem}#nav>ul>li>ul>li>a{color:#f0f0ec;text-decoration:none;padding:.3rem .4rem .3rem .4rem}#nav>ul>li>ul>li>ul{width:100%;z-index:9999;background-color:#2070b3;margin:.2rem .4rem .2rem .4rem}#nav>ul>li>ul>li>ul>li{padding:.3rem 0}#nav>ul>li>ul>li>ul:not(.js-showElement){display:none}#nav>ul>li>ul>li>ul>li>a{background-color:#2070b3;color:#f0f0ec;padding:.2rem .2rem .2rem .4rem;text-decoration:none}html.no-js #nav:hover>ul>li:not(#toggleMenu),html.no-js #nav:focus>ul>li:not(#toggleMenu){display:block}html.no-js #nav:hover li:hover>a+ul,html.no-js #nav:hover li:focus>a+ul,html.no-js #nav:focus li:hover>a+ul,html.no-js #nav:focus li:focus>a+ul{display:block}}@media screen and (min-width: 961px){#nav ul{z-index:9999}#nav li{position:relative;margin-right:.9rem}#nav ul li a{text-decoration:none;display:block;padding:.4rem .7rem .4rem .7rem;color:#f0f0ec}a+ul{position:absolute}a+ul:not(.js-showElement){display:none}#nav>ul>li{position:relative;float:left;font-size:.8rem;margin-left:.2rem}.leaf-usericon{font-size:1.1rem;line-height:.9rem}#nav>ul>li>a{background-color:#252f3e}#nav>ul>li>a:hover,#nav>ul>li>a:focus,#nav>ul>li>a.js-openSubMenu{background-color:#274863;font-family:"PublicSans-Bold",sans-serif}#nav>ul>li:hover>a,#nav>ul>li:focus>a{background-color:#274863}#nav>ul>li:not(:last-child){border:0}#nav>ul>li:not(#toggleMenu):not(.js-showElement){display:inline-block}#nav #toggleMenu{display:none}#nav>ul>li>ul{background-color:#274863;left:-4rem;width:12rem;font-size:.8rem;box-shadow:-2px 4px 4px rgba(0,0,0,.2)}#nav>ul>li>ul.leaf-usernavmenu{left:-8rem}#nav>ul>li>ul>li{padding:.2rem;width:12rem}#nav>ul>li>ul>li>a{padding:.2rem}#nav>ul>li>ul>li:hover,#nav>ul>li>ul>li>a:hover,#nav>ul>li>ul>li>a:focus,#nav>ul>li>ul>li>a:focus-within{background-color:#2070b3;font-family:"PublicSans-Bold",sans-serif}#nav>ul>li>ul>li>ul{top:0;left:-12rem;width:12rem;font-family:"PublicSans-Regular",sans-serif;z-index:9999;box-shadow:-2px 2px 4px rgba(0,0,0,.2);background-color:#2070b3}#nav>ul>li>ul>li>ul>li>a{color:#f0f0ec;padding:.3rem;text-decoration:none;margin-left:.1rem}} diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css index d7eabea35..ccc7d841a 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css @@ -1 +1 @@ -body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.15)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:8px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.375rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.5rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.5rem}#form_entry_and_preview ul[id^=base_drop_area] li button.drag_question_button{cursor:move;position:absolute;padding:0;border:1px solid #f2f2f6 !important;border-radius:4px 0 0 4px;width:1.5rem;height:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:move;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.6;font-size:20px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important;border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important;border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 10px 5px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,80.6862745098%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,80.6862745098%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} +body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgb(202.78,225.4843478261,255)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li button.drag_question_button{cursor:grab;position:absolute;padding:0;border:1px solid #f2f2f6 !important;border-radius:4px 0 0 4px;width:1.5rem;height:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.6;font-size:20px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important;border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important;border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.js b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.js index db010d675..73aadd76d 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.js +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.js @@ -1,2 +1,2 @@ /*! For license information please see LEAF_FormEditor.js.LICENSE.txt */ -(()=>{"use strict";var e,t,n={425:(e,t,n)=>{n.d(t,{EW:()=>pl,Ef:()=>ca,pM:()=>No,h:()=>hl,WQ:()=>ps,dY:()=>Bn,Gt:()=>ds,Kh:()=>$t,KR:()=>Yt,Gc:()=>Bt,IJ:()=>Zt,R1:()=>on,wB:()=>Ws});var o={};function r(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}n.r(o),n.d(o,{BaseTransition:()=>Co,BaseTransitionPropsValidators:()=>So,Comment:()=>mi,DeprecationTypes:()=>El,EffectScope:()=>he,ErrorCodes:()=>Tn,ErrorTypeStrings:()=>bl,Fragment:()=>hi,KeepAlive:()=>Xo,ReactiveEffect:()=>ye,Static:()=>gi,Suspense:()=>li,Teleport:()=>ho,Text:()=>fi,TrackOpTypes:()=>gn,Transition:()=>Ml,TransitionGroup:()=>Rc,TriggerOpTypes:()=>vn,VueElement:()=>Cc,assertNumber:()=>En,callWithAsyncErrorHandling:()=>An,callWithErrorHandling:()=>kn,camelize:()=>O,capitalize:()=>L,cloneVNode:()=>Pi,compatUtils:()=>wl,computed:()=>pl,createApp:()=>ca,createBlock:()=>Ti,createCommentVNode:()=>$i,createElementBlock:()=>Ei,createElementVNode:()=>Di,createHydrationRenderer:()=>Ds,createPropsRestProxy:()=>Gr,createRenderer:()=>Rs,createSSRApp:()=>aa,createSlots:()=>Tr,createStaticVNode:()=>Mi,createTextVNode:()=>Li,createVNode:()=>Oi,customRef:()=>an,defineAsyncComponent:()=>Go,defineComponent:()=>No,defineCustomElement:()=>Sc,defineEmits:()=>Lr,defineExpose:()=>Mr,defineModel:()=>Vr,defineOptions:()=>$r,defineProps:()=>Pr,defineSSRCustomElement:()=>_c,defineSlots:()=>Br,devtools:()=>Sl,effect:()=>Ne,effectScope:()=>fe,getCurrentInstance:()=>Gi,getCurrentScope:()=>me,getCurrentWatcher:()=>_n,getTransitionRawChildren:()=>Io,guardReactiveProps:()=>Fi,h:()=>hl,handleError:()=>In,hasInjectionContext:()=>hs,hydrate:()=>la,hydrateOnIdle:()=>Ho,hydrateOnInteraction:()=>Ko,hydrateOnMediaQuery:()=>Wo,hydrateOnVisible:()=>qo,initCustomFormatter:()=>fl,initDirectivesForSSR:()=>ha,inject:()=>ps,isMemoSame:()=>gl,isProxy:()=>Kt,isReactive:()=>Ht,isReadonly:()=>qt,isRef:()=>Xt,isRuntimeOnly:()=>il,isShallow:()=>Wt,isVNode:()=>ki,markRaw:()=>Gt,mergeDefaults:()=>Kr,mergeModels:()=>zr,mergeProps:()=>Ui,nextTick:()=>Bn,normalizeClass:()=>X,normalizeProps:()=>Y,normalizeStyle:()=>K,onActivated:()=>Zo,onBeforeMount:()=>lr,onBeforeUnmount:()=>dr,onBeforeUpdate:()=>ar,onDeactivated:()=>er,onErrorCaptured:()=>gr,onMounted:()=>cr,onRenderTracked:()=>mr,onRenderTriggered:()=>fr,onScopeDispose:()=>ge,onServerPrefetch:()=>hr,onUnmounted:()=>pr,onUpdated:()=>ur,onWatcherCleanup:()=>xn,openBlock:()=>bi,popScopeId:()=>eo,provide:()=>ds,proxyRefs:()=>ln,pushScopeId:()=>Zn,queuePostFlushCb:()=>Un,reactive:()=>$t,readonly:()=>Vt,ref:()=>Yt,registerRuntimeCompiler:()=>sl,render:()=>ia,renderList:()=>Er,renderSlot:()=>kr,resolveComponent:()=>br,resolveDirective:()=>xr,resolveDynamicComponent:()=>_r,resolveFilter:()=>Cl,resolveTransitionHooks:()=>Eo,setBlockTracking:()=>Ci,setDevtoolsHook:()=>_l,setTransitionHooks:()=>Ao,shallowReactive:()=>Bt,shallowReadonly:()=>jt,shallowRef:()=>Zt,ssrContextKey:()=>Vs,ssrUtils:()=>xl,stop:()=>Re,toDisplayString:()=>ce,toHandlerKey:()=>M,toHandlers:()=>Ir,toRaw:()=>zt,toRef:()=>hn,toRefs:()=>un,toValue:()=>rn,transformVNodeArgs:()=>Ii,triggerRef:()=>nn,unref:()=>on,useAttrs:()=>Hr,useCssModule:()=>Tc,useCssVars:()=>nc,useHost:()=>wc,useId:()=>Ro,useModel:()=>Js,useSSRContext:()=>js,useShadowRoot:()=>Ec,useSlots:()=>Ur,useTemplateRef:()=>Oo,useTransitionState:()=>yo,vModelCheckbox:()=>Vc,vModelDynamic:()=>zc,vModelRadio:()=>Uc,vModelSelect:()=>Hc,vModelText:()=>Bc,vShow:()=>Zl,version:()=>vl,warn:()=>yl,watch:()=>Ws,watchEffect:()=>Us,watchPostEffect:()=>Hs,watchSyncEffect:()=>qs,withAsyncContext:()=>Jr,withCtx:()=>no,withDefaults:()=>jr,withDirectives:()=>oo,withKeys:()=>ea,withMemo:()=>ml,withModifiers:()=>Yc,withScopeId:()=>to});const s={},i=[],l=()=>{},c=()=>!1,a=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),u=e=>e.startsWith("onUpdate:"),d=Object.assign,p=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},h=Object.prototype.hasOwnProperty,f=(e,t)=>h.call(e,t),m=Array.isArray,g=e=>"[object Map]"===E(e),v=e=>"[object Set]"===E(e),y=e=>"[object Date]"===E(e),b=e=>"function"==typeof e,S=e=>"string"==typeof e,_=e=>"symbol"==typeof e,x=e=>null!==e&&"object"==typeof e,C=e=>(x(e)||b(e))&&b(e.then)&&b(e.catch),w=Object.prototype.toString,E=e=>w.call(e),T=e=>E(e).slice(8,-1),k=e=>"[object Object]"===E(e),A=e=>S(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,I=r(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),N=r("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),R=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},D=/-(\w)/g,O=R((e=>e.replace(D,((e,t)=>t?t.toUpperCase():"")))),F=/\B([A-Z])/g,P=R((e=>e.replace(F,"-$1").toLowerCase())),L=R((e=>e.charAt(0).toUpperCase()+e.slice(1))),M=R((e=>e?`on${L(e)}`:"")),$=(e,t)=>!Object.is(e,t),B=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},j=e=>{const t=parseFloat(e);return isNaN(t)?e:t},U=e=>{const t=S(e)?Number(e):NaN;return isNaN(t)?e:t};let H;const q=()=>H||(H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{}),W=r("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function K(e){if(m(e)){const t={};for(let n=0;n{if(e){const n=e.split(G);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function X(e){let t="";if(S(e))t=e;else if(m(e))for(let n=0;nse(e,t)))}const le=e=>!(!e||!0!==e.__v_isRef),ce=e=>S(e)?e:null==e?"":m(e)||x(e)&&(e.toString===w||!b(e.toString))?le(e)?ce(e.value):JSON.stringify(e,ae,2):String(e),ae=(e,t)=>le(t)?ae(e,t.value):g(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[ue(t,o)+" =>"]=n,e)),{})}:v(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ue(e)))}:_(t)?ue(t):!x(t)||m(t)||k(t)?t:String(t),ue=(e,t="")=>{var n;return _(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let de,pe;class he{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=de,!e&&de&&(this.index=(de.scopes||(de.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0)return;let e;for(;be;){let t,n=be;for(;n;)n.flags&=-9,n=n.next;for(n=be,be=void 0;n;){if(1&n.flags)try{n.trigger()}catch(t){e||(e=t)}t=n.next,n.next=void 0,n=t}}if(e)throw e}function we(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ee(e){let t,n=e.depsTail,o=n;for(;o;){const e=o.prevDep;-1===o.version?(o===n&&(n=e),Ae(o),Ie(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=e}e.deps=t,e.depsTail=n}function Te(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(ke(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function ke(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===Me)return;e.globalVersion=Me;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Te(e))return void(e.flags&=-3);const n=pe,o=De;pe=e,De=!0;try{we(e);const n=e.fn(e._value);(0===t.version||$(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{pe=n,De=o,Ee(e),e.flags&=-3}}function Ae(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o),!n.subs&&n.computed){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ae(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function Ie(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function Ne(e,t){e.effect instanceof ye&&(e=e.effect.fn);const n=new ye(e);t&&d(n,t);try{n.run()}catch(e){throw n.stop(),e}const o=n.run.bind(n);return o.effect=n,o}function Re(e){e.effect.stop()}let De=!0;const Oe=[];function Fe(){Oe.push(De),De=!1}function Pe(){const e=Oe.pop();De=void 0===e||e}function Le(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=pe;pe=void 0;try{t()}finally{pe=e}}}let Me=0;class $e{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Be{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.target=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!pe||!De||pe===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==pe)t=this.activeLink=new $e(pe,this),pe.deps?(t.prevDep=pe.depsTail,pe.depsTail.nextDep=t,pe.depsTail=t):pe.deps=pe.depsTail=t,Ve(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=pe.depsTail,t.nextDep=void 0,pe.depsTail.nextDep=t,pe.depsTail=t,pe.deps===t&&(pe.deps=e)}return t}trigger(e){this.version++,Me++,this.notify(e)}notify(e){xe();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ce()}}}function Ve(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)Ve(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const je=new WeakMap,Ue=Symbol(""),He=Symbol(""),qe=Symbol("");function We(e,t,n){if(De&&pe){let t=je.get(e);t||je.set(e,t=new Map);let o=t.get(n);o||(t.set(n,o=new Be),o.target=e,o.map=t,o.key=n),o.track()}}function Ke(e,t,n,o,r,s){const i=je.get(e);if(!i)return void Me++;const l=e=>{e&&e.trigger()};if(xe(),"clear"===t)i.forEach(l);else{const r=m(e),s=r&&A(n);if(r&&"length"===n){const e=Number(o);i.forEach(((t,n)=>{("length"===n||n===qe||!_(n)&&n>=e)&&l(t)}))}else switch(void 0!==n&&l(i.get(n)),s&&l(i.get(qe)),t){case"add":r?s&&l(i.get("length")):(l(i.get(Ue)),g(e)&&l(i.get(He)));break;case"delete":r||(l(i.get(Ue)),g(e)&&l(i.get(He)));break;case"set":g(e)&&l(i.get(Ue))}}Ce()}function ze(e){const t=zt(e);return t===e?t:(We(t,0,qe),Wt(e)?t:t.map(Jt))}function Ge(e){return We(e=zt(e),0,qe),e}const Je={__proto__:null,[Symbol.iterator](){return Qe(this,Symbol.iterator,Jt)},concat(...e){return ze(this).concat(...e.map((e=>m(e)?ze(e):e)))},entries(){return Qe(this,"entries",(e=>(e[1]=Jt(e[1]),e)))},every(e,t){return Ye(this,"every",e,t,void 0,arguments)},filter(e,t){return Ye(this,"filter",e,t,(e=>e.map(Jt)),arguments)},find(e,t){return Ye(this,"find",e,t,Jt,arguments)},findIndex(e,t){return Ye(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ye(this,"findLast",e,t,Jt,arguments)},findLastIndex(e,t){return Ye(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ye(this,"forEach",e,t,void 0,arguments)},includes(...e){return et(this,"includes",e)},indexOf(...e){return et(this,"indexOf",e)},join(e){return ze(this).join(e)},lastIndexOf(...e){return et(this,"lastIndexOf",e)},map(e,t){return Ye(this,"map",e,t,void 0,arguments)},pop(){return tt(this,"pop")},push(...e){return tt(this,"push",e)},reduce(e,...t){return Ze(this,"reduce",e,t)},reduceRight(e,...t){return Ze(this,"reduceRight",e,t)},shift(){return tt(this,"shift")},some(e,t){return Ye(this,"some",e,t,void 0,arguments)},splice(...e){return tt(this,"splice",e)},toReversed(){return ze(this).toReversed()},toSorted(e){return ze(this).toSorted(e)},toSpliced(...e){return ze(this).toSpliced(...e)},unshift(...e){return tt(this,"unshift",e)},values(){return Qe(this,"values",Jt)}};function Qe(e,t,n){const o=Ge(e),r=o[t]();return o===e||Wt(e)||(r._next=r.next,r.next=()=>{const e=r._next();return e.value&&(e.value=n(e.value)),e}),r}const Xe=Array.prototype;function Ye(e,t,n,o,r,s){const i=Ge(e),l=i!==e&&!Wt(e),c=i[t];if(c!==Xe[t]){const t=c.apply(e,s);return l?Jt(t):t}let a=n;i!==e&&(l?a=function(t,o){return n.call(this,Jt(t),o,e)}:n.length>2&&(a=function(t,o){return n.call(this,t,o,e)}));const u=c.call(i,a,o);return l&&r?r(u):u}function Ze(e,t,n,o){const r=Ge(e);let s=n;return r!==e&&(Wt(e)?n.length>3&&(s=function(t,o,r){return n.call(this,t,o,r,e)}):s=function(t,o,r){return n.call(this,t,Jt(o),r,e)}),r[t](s,...o)}function et(e,t,n){const o=zt(e);We(o,0,qe);const r=o[t](...n);return-1!==r&&!1!==r||!Kt(n[0])?r:(n[0]=zt(n[0]),o[t](...n))}function tt(e,t,n=[]){Fe(),xe();const o=zt(e)[t].apply(e,n);return Ce(),Pe(),o}const nt=r("__proto__,__v_isRef,__isVue"),ot=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(_));function rt(e){_(e)||(e=String(e));const t=zt(this);return We(t,0,e),t.hasOwnProperty(e)}class st{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?Mt:Lt:r?Pt:Ft).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=m(e);if(!o){let e;if(s&&(e=Je[t]))return e;if("hasOwnProperty"===t)return rt}const i=Reflect.get(e,t,Xt(e)?e:n);return(_(t)?ot.has(t):nt(t))?i:(o||We(e,0,t),r?i:Xt(i)?s&&A(t)?i:i.value:x(i)?o?Vt(i):$t(i):i)}}class it extends st{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._isShallow){const t=qt(r);if(Wt(n)||qt(n)||(r=zt(r),n=zt(n)),!m(e)&&Xt(r)&&!Xt(n))return!t&&(r.value=n,!0)}const s=m(e)&&A(t)?Number(t)e,ht=e=>Reflect.getPrototypeOf(e);function ft(e,t,n=!1,o=!1){const r=zt(e=e.__v_raw),s=zt(t);n||($(t,s)&&We(r,0,t),We(r,0,s));const{has:i}=ht(r),l=o?pt:n?Qt:Jt;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function mt(e,t=!1){const n=this.__v_raw,o=zt(n),r=zt(e);return t||($(e,r)&&We(o,0,e),We(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function gt(e,t=!1){return e=e.__v_raw,!t&&We(zt(e),0,Ue),Reflect.get(e,"size",e)}function vt(e,t=!1){t||Wt(e)||qt(e)||(e=zt(e));const n=zt(this);return ht(n).has.call(n,e)||(n.add(e),Ke(n,"add",e,e)),this}function yt(e,t,n=!1){n||Wt(t)||qt(t)||(t=zt(t));const o=zt(this),{has:r,get:s}=ht(o);let i=r.call(o,e);i||(e=zt(e),i=r.call(o,e));const l=s.call(o,e);return o.set(e,t),i?$(t,l)&&Ke(o,"set",e,t):Ke(o,"add",e,t),this}function bt(e){const t=zt(this),{has:n,get:o}=ht(t);let r=n.call(t,e);r||(e=zt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&Ke(t,"delete",e,void 0),s}function St(){const e=zt(this),t=0!==e.size,n=e.clear();return t&&Ke(e,"clear",void 0,void 0),n}function _t(e,t){return function(n,o){const r=this,s=r.__v_raw,i=zt(s),l=t?pt:e?Qt:Jt;return!e&&We(i,0,Ue),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function xt(e,t,n){return function(...o){const r=this.__v_raw,s=zt(r),i=g(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?pt:t?Qt:Jt;return!t&&We(s,0,c?He:Ue),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function Ct(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function wt(){const e={get(e){return ft(this,e)},get size(){return gt(this)},has:mt,add:vt,set:yt,delete:bt,clear:St,forEach:_t(!1,!1)},t={get(e){return ft(this,e,!1,!0)},get size(){return gt(this)},has:mt,add(e){return vt.call(this,e,!0)},set(e,t){return yt.call(this,e,t,!0)},delete:bt,clear:St,forEach:_t(!1,!0)},n={get(e){return ft(this,e,!0)},get size(){return gt(this,!0)},has(e){return mt.call(this,e,!0)},add:Ct("add"),set:Ct("set"),delete:Ct("delete"),clear:Ct("clear"),forEach:_t(!0,!1)},o={get(e){return ft(this,e,!0,!0)},get size(){return gt(this,!0)},has(e){return mt.call(this,e,!0)},add:Ct("add"),set:Ct("set"),delete:Ct("delete"),clear:Ct("clear"),forEach:_t(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=xt(r,!1,!1),n[r]=xt(r,!0,!1),t[r]=xt(r,!1,!0),o[r]=xt(r,!0,!0)})),[e,n,t,o]}const[Et,Tt,kt,At]=wt();function It(e,t){const n=t?e?At:kt:e?Tt:Et;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(f(n,o)&&o in t?n:t,o,r)}const Nt={get:It(!1,!1)},Rt={get:It(!1,!0)},Dt={get:It(!0,!1)},Ot={get:It(!0,!0)},Ft=new WeakMap,Pt=new WeakMap,Lt=new WeakMap,Mt=new WeakMap;function $t(e){return qt(e)?e:Ut(e,!1,ct,Nt,Ft)}function Bt(e){return Ut(e,!1,ut,Rt,Pt)}function Vt(e){return Ut(e,!0,at,Dt,Lt)}function jt(e){return Ut(e,!0,dt,Ot,Mt)}function Ut(e,t,n,o,r){if(!x(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(T(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?o:n);return r.set(e,c),c}function Ht(e){return qt(e)?Ht(e.__v_raw):!(!e||!e.__v_isReactive)}function qt(e){return!(!e||!e.__v_isReadonly)}function Wt(e){return!(!e||!e.__v_isShallow)}function Kt(e){return!!e&&!!e.__v_raw}function zt(e){const t=e&&e.__v_raw;return t?zt(t):e}function Gt(e){return!f(e,"__v_skip")&&Object.isExtensible(e)&&V(e,"__v_skip",!0),e}const Jt=e=>x(e)?$t(e):e,Qt=e=>x(e)?Vt(e):e;function Xt(e){return!!e&&!0===e.__v_isRef}function Yt(e){return en(e,!1)}function Zt(e){return en(e,!0)}function en(e,t){return Xt(e)?e:new tn(e,t)}class tn{constructor(e,t){this.dep=new Be,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:zt(e),this._value=t?e:Jt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||Wt(e)||qt(e);e=n?e:zt(e),$(e,t)&&(this._rawValue=e,this._value=n?e:Jt(e),this.dep.trigger())}}function nn(e){e.dep&&e.dep.trigger()}function on(e){return Xt(e)?e.value:e}function rn(e){return b(e)?e():on(e)}const sn={get:(e,t,n)=>"__v_raw"===t?e:on(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Xt(r)&&!Xt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function ln(e){return Ht(e)?e:new Proxy(e,sn)}class cn{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Be,{get:n,set:o}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=o}get value(){return this._value=this._get()}set value(e){this._set(e)}}function an(e){return new cn(e)}function un(e){const t=m(e)?new Array(e.length):{};for(const n in e)t[n]=fn(e,n);return t}class dn{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){const n=je.get(e);return n&&n.get(t)}(zt(this._object),this._key)}}class pn{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function hn(e,t,n){return Xt(e)?e:b(e)?new pn(e):x(e)&&arguments.length>1?fn(e,t,n):Yt(e)}function fn(e,t,n){const o=e[t];return Xt(o)?o:new dn(e,t,n)}class mn{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Be(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Me-1,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags||pe===this))return _e(this),!0}get value(){const e=this.dep.track();return ke(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const gn={GET:"get",HAS:"has",ITERATE:"iterate"},vn={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},yn={},bn=new WeakMap;let Sn;function _n(){return Sn}function xn(e,t=!1,n=Sn){if(n){let t=bn.get(n);t||bn.set(n,t=[]),t.push(e)}}function Cn(e,t=1/0,n){if(t<=0||!x(e)||e.__v_skip)return e;if((n=n||new Set).has(e))return e;if(n.add(e),t--,Xt(e))Cn(e.value,t,n);else if(m(e))for(let o=0;o{Cn(e,t,n)}));else if(k(e)){for(const o in e)Cn(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&Cn(e[o],t,n)}return e}const wn=[];function En(e,t){}const Tn={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function kn(e,t,n,o){try{return o?e(...o):e()}catch(e){In(e,t,n)}}function An(e,t,n,o){if(b(e)){const r=kn(e,t,n,o);return r&&C(r)&&r.catch((e=>{In(e,t,n)})),r}if(m(e)){const r=[];for(let s=0;s=Wn(n)?Dn.push(e):Dn.splice(function(e){let t=Nn?On+1:0,n=Dn.length;for(;t>>1,r=Dn[o],s=Wn(r);sWn(e)-Wn(t)));if(Fn.length=0,Pn)return void Pn.push(...e);for(Pn=e,Ln=0;Lnnull==e.id?2&e.flags?-1:1/0:e.id;function Kn(e){Rn=!1,Nn=!0;try{for(On=0;Onno;function no(e,t=Qn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&Ci(-1);const r=Yn(t);let s;try{s=e(...n)}finally{Yn(r),o._d&&Ci(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function oo(e,t){if(null===Qn)return e;const n=ul(Qn),o=e.dirs||(e.dirs=[]);for(let e=0;ee.__isTeleport,lo=e=>e&&(e.disabled||""===e.disabled),co=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,ao=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,uo=(e,t)=>{const n=e&&e.to;return S(n)?t?t(n):null:n};function po(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,d=2===s;if(d&&o(i,t,n),(!d||lo(u))&&16&c)for(let e=0;e{16&y&&(r&&r.isCE&&(r.ce._teleportTarget=e),u(b,e,t,r,s,i,l,c))},p=()=>{const e=t.target=uo(t.props,f),n=mo(e,t,m,h);e&&("svg"!==i&&co(e)?i="svg":"mathml"!==i&&ao(e)&&(i="mathml"),v||(d(e,n),fo(t)))};v&&(d(n,a),fo(t)),(_=t.props)&&(_.defer||""===_.defer)?Ns(p,s):p()}else{t.el=e.el,t.targetStart=e.targetStart;const o=t.anchor=e.anchor,u=t.target=e.target,h=t.targetAnchor=e.targetAnchor,m=lo(e.props),g=m?n:u,y=m?o:h;if("svg"===i||co(u)?i="svg":("mathml"===i||ao(u))&&(i="mathml"),S?(p(e.dynamicChildren,S,g,r,s,i,l),Ms(e,t,!0)):c||d(e,t,g,y,r,s,i,l,!1),v)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):po(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=uo(t.props,f);e&&po(t,e,null,a,0)}else m&&po(t,u,h,a,1);fo(t)}var _},remove(e,t,n,{um:o,o:{remove:r}},s){const{shapeFlag:i,children:l,anchor:c,targetStart:a,targetAnchor:u,target:d,props:p}=e;if(d&&(r(a),r(u)),s&&r(c),16&i){const e=s||!lo(p);for(let r=0;r{e.isMounted=!0})),dr((()=>{e.isUnmounting=!0})),e}const bo=[Function,Array],So={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:bo,onEnter:bo,onAfterEnter:bo,onEnterCancelled:bo,onBeforeLeave:bo,onLeave:bo,onAfterLeave:bo,onLeaveCancelled:bo,onBeforeAppear:bo,onAppear:bo,onAfterAppear:bo,onAppearCancelled:bo},_o=e=>{const t=e.subTree;return t.component?_o(t.component):t};function xo(e){let t=e[0];if(e.length>1){let n=!1;for(const o of e)if(o.type!==mi){t=o,n=!0;break}}return t}const Co={name:"BaseTransition",props:So,setup(e,{slots:t}){const n=Gi(),o=yo();return()=>{const r=t.default&&Io(t.default(),!0);if(!r||!r.length)return;const s=xo(r),i=zt(e),{mode:l}=i;if(o.isLeaving)return To(s);const c=ko(s);if(!c)return To(s);let a=Eo(c,i,o,n,(e=>a=e));c.type!==mi&&Ao(c,a);const u=n.subTree,d=u&&ko(u);if(d&&d.type!==mi&&!Ai(c,d)&&_o(n).type!==mi){const e=Eo(d,i,o,n);if(Ao(d,e),"out-in"===l&&c.type!==mi)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave},To(s);"in-out"===l&&c.type!==mi&&(e.delayLeave=(e,t,n)=>{wo(o,d)[String(d.key)]=d,e[go]=()=>{t(),e[go]=void 0,delete a.delayedLeave},a.delayedLeave=n})}return s}}};function wo(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function Eo(e,t,n,o,r){const{appear:s,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:a,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:f,onLeaveCancelled:g,onBeforeAppear:v,onAppear:y,onAfterAppear:b,onAppearCancelled:S}=t,_=String(e.key),x=wo(n,e),C=(e,t)=>{e&&An(e,o,9,t)},w=(e,t)=>{const n=t[1];C(e,t),m(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},E={mode:i,persisted:l,beforeEnter(t){let o=c;if(!n.isMounted){if(!s)return;o=v||c}t[go]&&t[go](!0);const r=x[_];r&&Ai(e,r)&&r.el[go]&&r.el[go](),C(o,[t])},enter(e){let t=a,o=u,r=d;if(!n.isMounted){if(!s)return;t=y||a,o=b||u,r=S||d}let i=!1;const l=e[vo]=t=>{i||(i=!0,C(t?r:o,[e]),E.delayedLeave&&E.delayedLeave(),e[vo]=void 0)};t?w(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t[vo]&&t[vo](!0),n.isUnmounting)return o();C(p,[t]);let s=!1;const i=t[go]=n=>{s||(s=!0,o(),C(n?g:f,[t]),t[go]=void 0,x[r]===e&&delete x[r])};x[r]=e,h?w(h,[t,i]):i()},clone(e){const s=Eo(e,t,n,o,r);return r&&r(s),s}};return E}function To(e){if(Qo(e))return(e=Pi(e)).children=null,e}function ko(e){if(!Qo(e))return io(e.type)&&e.children?xo(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&b(n.default))return n.default()}}function Ao(e,t){6&e.shapeFlag&&e.component?(e.transition=t,Ao(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Io(e,t=!1,n){let o=[],r=0;for(let s=0;s1)for(let e=0;ed({name:e.name},t,{setup:e}))():e}function Ro(){const e=Gi();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function Do(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Oo(e){const t=Gi(),n=Zt(null);if(t){const o=t.refs===s?t.refs={}:t.refs;Object.defineProperty(o,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e})}return n}function Fo(e,t,n,o,r=!1){if(m(e))return void e.forEach(((e,s)=>Fo(e,t&&(m(t)?t[s]:t),n,o,r)));if(zo(o)&&!r)return;const i=4&o.shapeFlag?ul(o.component):o.el,l=r?null:i,{i:c,r:a}=e,u=t&&t.r,d=c.refs===s?c.refs={}:c.refs,h=c.setupState,g=zt(h),v=h===s?()=>!1:e=>f(g,e);if(null!=u&&u!==a&&(S(u)?(d[u]=null,v(u)&&(h[u]=null)):Xt(u)&&(u.value=null)),b(a))kn(a,c,12,[l,d]);else{const t=S(a),o=Xt(a);if(t||o){const s=()=>{if(e.f){const n=t?v(a)?h[a]:d[a]:a.value;r?m(n)&&p(n,i):m(n)?n.includes(i)||n.push(i):t?(d[a]=[i],v(a)&&(h[a]=d[a])):(a.value=[i],e.k&&(d[e.k]=a.value))}else t?(d[a]=l,v(a)&&(h[a]=l)):o&&(a.value=l,e.k&&(d[e.k]=l))};l?(s.id=-1,Ns(s,n)):s()}}}let Po=!1;const Lo=()=>{Po||(console.error("Hydration completed but contains mismatches."),Po=!0)},Mo=e=>{if(1===e.nodeType)return(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0},$o=e=>8===e.nodeType;function Bo(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:l,insert:c,createComment:u}}=e,d=(n,o,l,a,u,b=!1)=>{b=b||!!o.dynamicChildren;const S=$o(n)&&"["===n.data,_=()=>m(n,o,l,a,u,S),{type:x,ref:C,shapeFlag:w,patchFlag:E}=o;let T=n.nodeType;o.el=n,-2===E&&(b=!1,o.dynamicChildren=null);let k=null;switch(x){case fi:3!==T?""===o.children?(c(o.el=r(""),i(n),n),k=n):k=_():(n.data!==o.children&&(Lo(),n.data=o.children),k=s(n));break;case mi:y(n)?(k=s(n),v(o.el=n.content.firstChild,n,l)):k=8!==T||S?_():s(n);break;case gi:if(S&&(T=(n=s(n)).nodeType),1===T||3===T){k=n;const e=!o.children.length;for(let t=0;t{i=i||!!t.dynamicChildren;const{type:c,props:u,patchFlag:d,shapeFlag:p,dirs:f,transition:m}=t,g="input"===c||"option"===c;if(g||-1!==d){f&&ro(t,null,n,"created");let c,b=!1;if(y(e)){b=Ls(r,m)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;b&&m.beforeEnter(o),v(o,e,n),t.el=e=o}if(16&p&&(!u||!u.innerHTML&&!u.textContent)){let o=h(e.firstChild,t,e,n,r,s,i);for(;o;){Uo(e,1)||Lo();const t=o;o=o.nextSibling,l(t)}}else if(8&p){let n=t.children;"\n"!==n[0]||"PRE"!==e.tagName&&"TEXTAREA"!==e.tagName||(n=n.slice(1)),e.textContent!==n&&(Uo(e,0)||Lo(),e.textContent=t.children)}if(u)if(g||!i||48&d){const t=e.tagName.includes("-");for(const r in u)(g&&(r.endsWith("value")||"indeterminate"===r)||a(r)&&!I(r)||"."===r[0]||t)&&o(e,r,null,u[r],void 0,n)}else if(u.onClick)o(e,"onClick",null,u.onClick,void 0,n);else if(4&d&&Ht(u.style))for(const e in u.style)u.style[e];(c=u&&u.onVnodeBeforeMount)&&Hi(c,n,t),f&&ro(t,null,n,"beforeMount"),((c=u&&u.onVnodeMounted)||f||b)&&di((()=>{c&&Hi(c,n,t),b&&m.enter(e),f&&ro(t,null,n,"mounted")}),r)}return e.nextSibling},h=(e,t,o,i,l,a,u)=>{u=u||!!t.dynamicChildren;const p=t.children,h=p.length;for(let t=0;t{const{slotScopeIds:a}=t;a&&(r=r?r.concat(a):a);const d=i(e),p=h(s(e),t,d,n,o,r,l);return p&&$o(p)&&"]"===p.data?s(t.anchor=p):(Lo(),c(t.anchor=u("]"),d,p),p)},m=(e,t,o,r,c,a)=>{if(Uo(e.parentElement,1)||Lo(),t.el=null,a){const t=g(e);for(;;){const n=s(e);if(!n||n===t)break;l(n)}}const u=s(e),d=i(e);return l(e),n(null,t,d,u,o,r,Mo(d),c),u},g=(e,t="[",n="]")=>{let o=0;for(;e;)if((e=s(e))&&$o(e)&&(e.data===t&&o++,e.data===n)){if(0===o)return s(e);o--}return e},v=(e,t,n)=>{const o=t.parentNode;o&&o.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},y=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),qn(),void(t._vnode=e);d(t.firstChild,e,null,null,null),qn(),t._vnode=e},d]}const Vo="data-allow-mismatch",jo={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Uo(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(Vo);)e=e.parentElement;const n=e&&e.getAttribute(Vo);if(null==n)return!1;if(""===n)return!0;{const e=n.split(",");return!(0!==t||!e.includes("children"))||n.split(",").includes(jo[t])}}const Ho=(e=1e4)=>t=>{const n=requestIdleCallback(t,{timeout:e});return()=>cancelIdleCallback(n)},qo=e=>(t,n)=>{const o=new IntersectionObserver((e=>{for(const n of e)if(n.isIntersecting){o.disconnect(),t();break}}),e);return n((e=>{if(e instanceof Element)return function(e){const{top:t,left:n,bottom:o,right:r}=e.getBoundingClientRect(),{innerHeight:s,innerWidth:i}=window;return(t>0&&t0&&o0&&n0&&ro.disconnect()},Wo=e=>t=>{if(e){const n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},Ko=(e=[])=>(t,n)=>{S(e)&&(e=[e]);let o=!1;const r=e=>{o||(o=!0,s(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},s=()=>{n((t=>{for(const n of e)t.removeEventListener(n,r)}))};return n((t=>{for(const n of e)t.addEventListener(n,r,{once:!0})})),s},zo=e=>!!e.type.__asyncLoader;function Go(e){b(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,hydrate:s,timeout:i,suspensible:l=!0,onError:c}=e;let a,u=null,d=0;const p=()=>{let e;return u||(e=u=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),c)return new Promise(((t,n)=>{c(e,(()=>t((d++,u=null,p()))),(()=>n(e)),d+1)}));throw e})).then((t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),a=t,t))))};return No({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(e,t,n){const o=s?()=>{const o=s(n,(t=>function(e,t){if($o(e)&&"["===e.data){let n=1,o=e.nextSibling;for(;o;){if(1===o.nodeType){if(!1===t(o))break}else if($o(o))if("]"===o.data){if(0==--n)break}else"["===o.data&&n++;o=o.nextSibling}}else t(e)}(e,t)));o&&(t.bum||(t.bum=[])).push(o)}:n;a?o():p().then((()=>!t.isUnmounted&&o()))},get __asyncResolved(){return a},setup(){const e=zi;if(Do(e),a)return()=>Jo(a,e);const t=t=>{u=null,In(t,e,13,!o)};if(l&&e.suspense||nl)return p().then((t=>()=>Jo(t,e))).catch((e=>(t(e),()=>o?Oi(o,{error:e}):null)));const s=Yt(!1),c=Yt(),d=Yt(!!r);return r&&setTimeout((()=>{d.value=!1}),r),null!=i&&setTimeout((()=>{if(!s.value&&!c.value){const e=new Error(`Async component timed out after ${i}ms.`);t(e),c.value=e}}),i),p().then((()=>{s.value=!0,e.parent&&Qo(e.parent.vnode)&&e.parent.update()})).catch((e=>{t(e),c.value=e})),()=>s.value&&a?Jo(a,e):c.value&&o?Oi(o,{error:c.value}):n&&!d.value?Oi(n):void 0}})}function Jo(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=Oi(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const Qo=e=>e.type.__isKeepAlive,Xo={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Gi(),o=n.ctx;if(!o.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:d}}}=o,p=d("div");function h(e){or(e),u(e,n,l,!0)}function f(e){r.forEach(((t,n)=>{const o=dl(t.type);o&&!e(o)&&m(n)}))}function m(e){const t=r.get(e);!t||i&&Ai(t,i)?i&&or(i):h(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),Ns((()=>{s.isDeactivated=!1,s.a&&B(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Hi(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;Bs(t.m),Bs(t.a),a(e,p,null,1,l),Ns((()=>{t.da&&B(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Hi(n,t.parent,e),t.isDeactivated=!0}),l)},Ws((()=>[e.include,e.exclude]),(([e,t])=>{e&&f((t=>Yo(e,t))),t&&f((e=>!Yo(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&(si(n.subTree.type)?Ns((()=>{r.set(g,rr(n.subTree))}),n.subTree.suspense):r.set(g,rr(n.subTree)))};return cr(v),ur(v),dr((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=rr(t);if(e.type!==r.type||e.key!==r.key)h(e);else{or(r);const e=r.component.da;e&&Ns(e,o)}}))})),()=>{if(g=null,!t.default)return i=null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!ki(o)||!(4&o.shapeFlag||128&o.shapeFlag))return i=null,o;let l=rr(o);if(l.type===mi)return i=null,l;const c=l.type,a=dl(zo(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:d,max:p}=e;if(u&&(!a||!Yo(u,a))||d&&a&&Yo(d,a))return l.shapeFlag&=-257,i=l,o;const h=null==l.key?c:l.key,f=r.get(h);return l.el&&(l=Pi(l),128&o.shapeFlag&&(o.ssContent=l)),g=h,f?(l.el=f.el,l.component=f.component,l.transition&&Ao(l,l.transition),l.shapeFlag|=512,s.delete(h),s.add(h)):(s.add(h),p&&s.size>parseInt(p,10)&&m(s.values().next().value)),l.shapeFlag|=256,i=l,si(o.type)?o:l}}};function Yo(e,t){return m(e)?e.some((e=>Yo(e,t))):S(e)?e.split(",").includes(t):"[object RegExp]"===E(e)&&(e.lastIndex=0,e.test(t))}function Zo(e,t){tr(e,"a",t)}function er(e,t){tr(e,"da",t)}function tr(e,t,n=zi){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(sr(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Qo(e.parent.vnode)&&nr(o,t,n,e),e=e.parent}}function nr(e,t,n,o){const r=sr(t,e,o,!0);pr((()=>{p(o[t],r)}),n)}function or(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function rr(e){return 128&e.shapeFlag?e.ssContent:e}function sr(e,t,n=zi,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{Fe();const r=Xi(n),s=An(t,n,e,o);return r(),Pe(),s});return o?r.unshift(s):r.push(s),s}}const ir=e=>(t,n=zi)=>{nl&&"sp"!==e||sr(e,((...e)=>t(...e)),n)},lr=ir("bm"),cr=ir("m"),ar=ir("bu"),ur=ir("u"),dr=ir("bum"),pr=ir("um"),hr=ir("sp"),fr=ir("rtg"),mr=ir("rtc");function gr(e,t=zi){sr("ec",e,t)}const vr="components",yr="directives";function br(e,t){return Cr(vr,e,!0,t)||e}const Sr=Symbol.for("v-ndc");function _r(e){return S(e)?Cr(vr,e,!1)||e:e||Sr}function xr(e){return Cr(yr,e)}function Cr(e,t,n=!0,o=!1){const r=Qn||zi;if(r){const n=r.type;if(e===vr){const e=dl(n,!1);if(e&&(e===t||e===O(t)||e===L(O(t))))return n}const s=wr(r[e]||n[e],t)||wr(r.appContext[e],t);return!s&&o?n:s}}function wr(e,t){return e&&(e[t]||e[O(t)]||e[L(O(t))])}function Er(e,t,n,o){let r;const s=n&&n[o],i=m(e);if(i||S(e)){let n=!1;i&&Ht(e)&&(n=!Wt(e),e=Ge(e)),r=new Array(e.length);for(let o=0,i=e.length;ot(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e}function kr(e,t,n={},o,r){if(Qn.ce||Qn.parent&&zo(Qn.parent)&&Qn.parent.ce)return"default"!==t&&(n.name=t),bi(),Ti(hi,null,[Oi("slot",n,o&&o())],64);let s=e[t];s&&s._c&&(s._d=!1),bi();const i=s&&Ar(s(n)),l=Ti(hi,{key:(n.key||i&&i.key||`_${t}`)+(!i&&o?"_fb":"")},i||(o?o():[]),i&&1===e._?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function Ar(e){return e.some((e=>!ki(e)||e.type!==mi&&!(e.type===hi&&!Ar(e.children))))?e:null}function Ir(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:M(o)]=e[o];return n}const Nr=e=>e?Zi(e)?ul(e):Nr(e.parent):null,Rr=d(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Nr(e.parent),$root:e=>Nr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Zr(e),$forceUpdate:e=>e.f||(e.f=()=>{Vn(e.update)}),$nextTick:e=>e.n||(e.n=Bn.bind(e.proxy)),$watch:e=>zs.bind(e)}),Dr=(e,t)=>e!==s&&!e.__isScriptSetup&&f(e,t),Or={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:o,data:r,props:i,accessCache:l,type:c,appContext:a}=e;let u;if("$"!==t[0]){const c=l[t];if(void 0!==c)switch(c){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Dr(o,t))return l[t]=1,o[t];if(r!==s&&f(r,t))return l[t]=2,r[t];if((u=e.propsOptions[0])&&f(u,t))return l[t]=3,i[t];if(n!==s&&f(n,t))return l[t]=4,n[t];Qr&&(l[t]=0)}}const d=Rr[t];let p,h;return d?("$attrs"===t&&We(e.attrs,0,""),d(e)):(p=c.__cssModules)&&(p=p[t])?p:n!==s&&f(n,t)?(l[t]=4,n[t]):(h=a.config.globalProperties,f(h,t)?h[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;return Dr(r,t)?(r[t]=n,!0):o!==s&&f(o,t)?(o[t]=n,!0):!(f(e.props,t)||"$"===t[0]&&t.slice(1)in e||(i[t]=n,0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:i}},l){let c;return!!n[l]||e!==s&&f(e,l)||Dr(t,l)||(c=i[0])&&f(c,l)||f(o,l)||f(Rr,l)||f(r.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:f(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Fr=d({},Or,{get(e,t){if(t!==Symbol.unscopables)return Or.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!W(t)});function Pr(){return null}function Lr(){return null}function Mr(e){}function $r(e){}function Br(){return null}function Vr(){}function jr(e,t){return null}function Ur(){return qr().slots}function Hr(){return qr().attrs}function qr(){const e=Gi();return e.setupContext||(e.setupContext=al(e))}function Wr(e){return m(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function Kr(e,t){const n=Wr(e);for(const e in t){if(e.startsWith("__skip"))continue;let o=n[e];o?m(o)||b(o)?o=n[e]={type:o,default:t[e]}:o.default=t[e]:null===o&&(o=n[e]={default:t[e]}),o&&t[`__skip_${e}`]&&(o.skipFactory=!0)}return n}function zr(e,t){return e&&t?m(e)&&m(t)?e.concat(t):d({},Wr(e),Wr(t)):e||t}function Gr(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function Jr(e){const t=Gi();let n=e();return Yi(),C(n)&&(n=n.catch((e=>{throw Xi(t),e}))),[n,()=>Xi(t)]}let Qr=!0;function Xr(e,t,n){An(m(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Yr(e,t,n,o){let r=o.includes(".")?Gs(n,o):()=>n[o];if(S(e)){const n=t[e];b(n)&&Ws(r,n)}else if(b(e))Ws(r,e.bind(n));else if(x(e))if(m(e))e.forEach((e=>Yr(e,t,n,o)));else{const o=b(e.handler)?e.handler.bind(n):t[e.handler];b(o)&&Ws(r,o,e)}}function Zr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>es(c,e,i,!0))),es(c,t,i)):c=t,x(t)&&s.set(t,c),c}function es(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&es(e,s,n,!0),r&&r.forEach((t=>es(e,t,n,!0)));for(const r in t)if(o&&"expose"===r);else{const o=ts[r]||n&&n[r];e[r]=o?o(e[r],t[r]):t[r]}return e}const ts={data:ns,props:is,emits:is,methods:ss,computed:ss,beforeCreate:rs,created:rs,beforeMount:rs,mounted:rs,beforeUpdate:rs,updated:rs,beforeDestroy:rs,beforeUnmount:rs,destroyed:rs,unmounted:rs,activated:rs,deactivated:rs,errorCaptured:rs,serverPrefetch:rs,components:ss,directives:ss,watch:function(e,t){if(!e)return t;if(!t)return e;const n=d(Object.create(null),e);for(const o in t)n[o]=rs(e[o],t[o]);return n},provide:ns,inject:function(e,t){return ss(os(e),os(t))}};function ns(e,t){return t?e?function(){return d(b(e)?e.call(this,this):e,b(t)?t.call(this,this):t)}:t:e}function os(e){if(m(e)){const t={};for(let n=0;n(s.has(e)||(e&&b(e.install)?(s.add(e),e.install(c,...t)):b(e)&&(s.add(e),e(c,...t))),c),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),c),component:(e,t)=>t?(r.components[e]=t,c):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,c):r.directives[e],mount(s,i,a){if(!l){const u=c._ceVNode||Oi(n,o);return u.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),i&&t?t(u,s):e(u,s,a),l=!0,c._container=s,s.__vue_app__=c,ul(u.component)}},onUnmount(e){i.push(e)},unmount(){l&&(An(i,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,c),runWithContext(e){const t=us;us=c;try{return e()}finally{us=t}}};return c}}let us=null;function ds(e,t){if(zi){let n=zi.provides;const o=zi.parent&&zi.parent.provides;o===n&&(n=zi.provides=Object.create(o)),n[e]=t}}function ps(e,t,n=!1){const o=zi||Qn;if(o||us){const r=us?us._context.provides:o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&b(t)?t.call(o&&o.proxy):t}}function hs(){return!!(zi||Qn||us)}const fs={},ms=()=>Object.create(fs),gs=e=>Object.getPrototypeOf(e)===fs;function vs(e,t,n,o){const[r,i]=e.propsOptions;let l,c=!1;if(t)for(let s in t){if(I(s))continue;const a=t[s];let u;r&&f(r,u=O(s))?i&&i.includes(u)?(l||(l={}))[u]=a:n[u]=a:Zs(e.emitsOptions,s)||s in o&&a===o[s]||(o[s]=a,c=!0)}if(i){const t=zt(n),o=l||s;for(let s=0;s{u=!0;const[n,o]=Ss(e,t,!0);d(c,n),o&&a.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!l&&!u)return x(e)&&o.set(e,i),i;if(m(l))for(let e=0;e"_"===e[0]||"$stable"===e,Cs=e=>m(e)?e.map(Bi):[Bi(e)],ws=(e,t,n)=>{if(t._n)return t;const o=no(((...e)=>Cs(t(...e))),n);return o._c=!1,o},Es=(e,t,n)=>{const o=e._ctx;for(const n in e){if(xs(n))continue;const r=e[n];if(b(r))t[n]=ws(0,r,o);else if(null!=r){const e=Cs(r);t[n]=()=>e}}},Ts=(e,t)=>{const n=Cs(t);e.slots.default=()=>n},ks=(e,t,n)=>{for(const o in t)(n||"_"!==o)&&(e[o]=t[o])},As=(e,t,n)=>{const o=e.slots=ms();if(32&e.vnode.shapeFlag){const e=t._;e?(ks(o,t,n),n&&V(o,"_",e,!0)):Es(t,o)}else t&&Ts(e,t)},Is=(e,t,n)=>{const{vnode:o,slots:r}=e;let i=!0,l=s;if(32&o.shapeFlag){const e=t._;e?n&&1===e?i=!1:ks(r,t,n):(i=!t.$stable,Es(t,r)),l=t}else t&&(Ts(e,t),l={default:1});if(i)for(const e in r)xs(e)||null!=l[e]||delete r[e]},Ns=di;function Rs(e){return Os(e)}function Ds(e){return Os(e,Bo)}function Os(e,t){q().__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:c,createText:a,createComment:u,setText:d,setElementText:p,parentNode:h,nextSibling:m,setScopeId:g=l,insertStaticContent:v}=e,y=(e,t,n,o=null,r=null,s=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ai(e,t)&&(o=J(e),H(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:d}=t;switch(a){case fi:b(e,t,n,o);break;case mi:S(e,t,n,o);break;case gi:null==e&&_(t,n,o,i);break;case hi:N(e,t,n,o,r,s,i,l,c);break;default:1&d?x(e,t,n,o,r,s,i,l,c):6&d?R(e,t,n,o,r,s,i,l,c):(64&d||128&d)&&a.process(e,t,n,o,r,s,i,l,c,Y)}null!=u&&r&&Fo(u,e&&e.ref,s,t||e,!t)},b=(e,t,o,r)=>{if(null==e)n(t.el=a(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},S=(e,t,o,r)=>{null==e?n(t.el=u(t.children||""),o,r):t.el=e.el},_=(e,t,n,o)=>{[e.el,e.anchor]=v(e.children,t,n,o,e.el,e.anchor)},x=(e,t,n,o,r,s,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?C(t,n,o,r,s,i,l,c):T(e,t,r,s,i,l,c)},C=(e,t,o,s,i,l,a,u)=>{let d,h;const{props:f,shapeFlag:m,transition:g,dirs:v}=e;if(d=e.el=c(e.type,l,f&&f.is,f),8&m?p(d,e.children):16&m&&E(e.children,d,null,s,i,Fs(e,l),a,u),v&&ro(e,null,s,"created"),w(d,e,e.scopeId,a,s),f){for(const e in f)"value"===e||I(e)||r(d,e,null,f[e],l,s);"value"in f&&r(d,"value",null,f.value,l),(h=f.onVnodeBeforeMount)&&Hi(h,s,e)}v&&ro(e,null,s,"beforeMount");const y=Ls(i,g);y&&g.beforeEnter(d),n(d,t,o),((h=f&&f.onVnodeMounted)||y||v)&&Ns((()=>{h&&Hi(h,s,e),y&&g.enter(d),v&&ro(e,null,s,"mounted")}),i)},w=(e,t,n,o,r)=>{if(n&&g(e,n),o)for(let t=0;t{for(let a=c;a{const a=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:h}=t;u|=16&e.patchFlag;const f=e.props||s,m=t.props||s;let g;if(n&&Ps(n,!1),(g=m.onVnodeBeforeUpdate)&&Hi(g,n,t,e),h&&ro(t,e,n,"beforeUpdate"),n&&Ps(n,!0),(f.innerHTML&&null==m.innerHTML||f.textContent&&null==m.textContent)&&p(a,""),d?k(e.dynamicChildren,d,a,n,o,Fs(t,i),l):c||$(e,t,a,null,n,o,Fs(t,i),l,!1),u>0){if(16&u)A(a,f,m,n,i);else if(2&u&&f.class!==m.class&&r(a,"class",null,m.class,i),4&u&&r(a,"style",f.style,m.style,i),8&u){const e=t.dynamicProps;for(let t=0;t{g&&Hi(g,n,t,e),h&&ro(t,e,n,"updated")}),o)},k=(e,t,n,o,r,s,i)=>{for(let l=0;l{if(t!==n){if(t!==s)for(const s in t)I(s)||s in n||r(e,s,t[s],null,i,o);for(const s in n){if(I(s))continue;const l=n[s],c=t[s];l!==c&&"value"!==s&&r(e,s,c,l,i,o)}"value"in n&&r(e,"value",t.value,n.value,i)}},N=(e,t,o,r,s,i,l,c,u)=>{const d=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(n(d,o,r),n(p,o,r),E(t.children||[],o,p,s,i,l,c,u)):h>0&&64&h&&f&&e.dynamicChildren?(k(e.dynamicChildren,f,o,s,i,l,c),(null!=t.key||s&&t===s.subTree)&&Ms(e,t,!0)):$(e,t,o,p,s,i,l,c,u)},R=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):D(t,n,o,r,s,i,c):F(e,t,c)},D=(e,t,n,o,r,s,i)=>{const l=e.component=Ki(e,o,r);if(Qo(e)&&(l.ctx.renderer=Y),ol(l,!1,i),l.asyncDep){if(r&&r.registerDep(l,L,i),!e.el){const e=l.subTree=Oi(mi);S(null,e,t,n)}}else L(l,e,t,n,r,s,i)},F=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||oi(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?oi(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t{const l=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:c,vnode:a}=e;{const n=$s(e);if(n)return t&&(t.el=a.el,M(e,t,i)),void n.asyncDep.then((()=>{e.isUnmounted||l()}))}let u,d=t;Ps(e,!1),t?(t.el=a.el,M(e,t,i)):t=a,n&&B(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Hi(u,c,t,a),Ps(e,!0);const p=ei(e),f=e.subTree;e.subTree=p,y(f,p,h(f.el),J(f),e,r,s),t.el=p.el,null===d&&ri(e,p.el),o&&Ns(o,r),(u=t.props&&t.props.onVnodeUpdated)&&Ns((()=>Hi(u,c,t,a)),r)}else{let i;const{el:l,props:c}=t,{bm:a,m:u,parent:d,root:p,type:h}=e,f=zo(t);if(Ps(e,!1),a&&B(a),!f&&(i=c&&c.onVnodeBeforeMount)&&Hi(i,d,t),Ps(e,!0),l&&ee){const t=()=>{e.subTree=ei(e),ee(l,e.subTree,e,r,null)};f&&h.__asyncHydrate?h.__asyncHydrate(l,e,t):t()}else{p.ce&&p.ce._injectChildStyle(h);const i=e.subTree=ei(e);y(null,i,n,o,e,r,s),t.el=i.el}if(u&&Ns(u,r),!f&&(i=c&&c.onVnodeMounted)){const e=t;Ns((()=>Hi(i,d,e)),r)}(256&t.shapeFlag||d&&zo(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&Ns(e.a,r),e.isMounted=!0,t=n=o=null}};e.scope.on();const c=e.effect=new ye(l);e.scope.off();const a=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>Vn(u),Ps(e,!0),a()},M=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=zt(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;vs(e,t,r,s)&&(a=!0);for(const s in l)t&&(f(t,s)||(o=P(s))!==s&&f(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=ys(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&f(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o{const a=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:h,shapeFlag:f}=t;if(h>0){if(128&h)return void j(a,d,n,o,r,s,i,l,c);if(256&h)return void V(a,d,n,o,r,s,i,l,c)}8&f?(16&u&&G(a,r,s),d!==a&&p(n,d)):16&u?16&f?j(a,d,n,o,r,s,i,l,c):G(a,r,s,!0):(8&u&&p(n,""),16&f&&E(d,n,o,r,s,i,l,c))},V=(e,t,n,o,r,s,l,c,a)=>{t=t||i;const u=(e=e||i).length,d=t.length,p=Math.min(u,d);let h;for(h=0;hd?G(e,r,s,!0,!1,p):E(t,n,o,r,s,l,c,a,p)},j=(e,t,n,o,r,s,l,c,a)=>{let u=0;const d=t.length;let p=e.length-1,h=d-1;for(;u<=p&&u<=h;){const o=e[u],i=t[u]=a?Vi(t[u]):Bi(t[u]);if(!Ai(o,i))break;y(o,i,n,null,r,s,l,c,a),u++}for(;u<=p&&u<=h;){const o=e[p],i=t[h]=a?Vi(t[h]):Bi(t[h]);if(!Ai(o,i))break;y(o,i,n,null,r,s,l,c,a),p--,h--}if(u>p){if(u<=h){const e=h+1,i=eh)for(;u<=p;)H(e[u],r,s,!0),u++;else{const f=u,m=u,g=new Map;for(u=m;u<=h;u++){const e=t[u]=a?Vi(t[u]):Bi(t[u]);null!=e.key&&g.set(e.key,u)}let v,b=0;const S=h-m+1;let _=!1,x=0;const C=new Array(S);for(u=0;u=S){H(o,r,s,!0);continue}let i;if(null!=o.key)i=g.get(o.key);else for(v=m;v<=h;v++)if(0===C[v-m]&&Ai(o,t[v])){i=v;break}void 0===i?H(o,r,s,!0):(C[i-m]=u+1,i>=x?x=i:_=!0,y(o,t[i],n,null,r,s,l,c,a),b++)}const w=_?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o>1,e[n[l]]0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}(C):i;for(v=w.length-1,u=S-1;u>=0;u--){const e=m+u,i=t[e],p=e+1{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)U(e.component.subTree,t,o,r);else if(128&u)e.suspense.move(t,o,r);else if(64&u)l.move(e,t,o,Y);else if(l!==hi)if(l!==gi)if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(i),n(i,t,o),Ns((()=>c.enter(i)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,l=()=>n(i,t,o),a=()=>{e(i,(()=>{l(),s&&s()}))};r?r(i,l,a):a()}else n(i,t,o);else(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=m(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);else{n(i,t,o);for(let e=0;e{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:d,dirs:p,cacheIndex:h}=e;if(-2===d&&(r=!1),null!=l&&Fo(l,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&u)return void t.ctx.deactivate(e);const f=1&u&&p,m=!zo(e);let g;if(m&&(g=i&&i.onVnodeBeforeUnmount)&&Hi(g,t,e),6&u)z(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);f&&ro(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,Y,o):a&&!a.hasOnce&&(s!==hi||d>0&&64&d)?G(a,t,n,!1,!0):(s===hi&&384&d||!r&&16&u)&&G(c,t,n),o&&W(e)}(m&&(g=i&&i.onVnodeUnmounted)||f)&&Ns((()=>{g&&Hi(g,t,e),f&&ro(e,null,t,"unmounted")}),n)},W=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===hi)return void K(n,r);if(t===gi)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),o(e),e=n;o(t)})(e);const i=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,i);o?o(e.el,i,r):r()}else i()},K=(e,t)=>{let n;for(;e!==t;)n=m(e),o(e),e=n;o(t)},z=(e,t,n)=>{const{bum:o,scope:r,job:s,subTree:i,um:l,m:c,a}=e;Bs(c),Bs(a),o&&B(o),r.stop(),s&&(s.flags|=8,H(i,e,t,n)),l&&Ns(l,t),Ns((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},G=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i{if(6&e.shapeFlag)return J(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=m(e.anchor||e.el),n=t&&t[so];return n?m(n):t};let Q=!1;const X=(e,t,n)=>{null==e?t._vnode&&H(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,n),t._vnode=e,Q||(Q=!0,Hn(),qn(),Q=!1)},Y={p:y,um:H,m:U,r:W,mt:D,mc:E,pc:$,pbc:k,n:J,o:e};let Z,ee;return t&&([Z,ee]=t(Y)),{render:X,hydrate:Z,createApp:as(X,Z)}}function Fs({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Ps({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ls(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ms(e,t,n=!1){const o=e.children,r=t.children;if(m(o)&&m(r))for(let e=0;eps(Vs);function Us(e,t){return Ks(e,null,t)}function Hs(e,t){return Ks(e,null,{flush:"post"})}function qs(e,t){return Ks(e,null,{flush:"sync"})}function Ws(e,t,n){return Ks(e,t,n)}function Ks(e,t,n=s){const{immediate:o,deep:r,flush:i,once:c}=n,a=d({},n);let u;if(nl)if("sync"===i){const e=js();u=e.__watcherHandles||(e.__watcherHandles=[])}else{if(t&&!o){const e=()=>{};return e.stop=l,e.resume=l,e.pause=l,e}a.once=!0}const h=zi;a.call=(e,t,n)=>An(e,h,t,n);let f=!1;"post"===i?a.scheduler=e=>{Ns(e,h&&h.suspense)}:"sync"!==i&&(f=!0,a.scheduler=(e,t)=>{t?e():Vn(e)}),a.augmentJob=e=>{t&&(e.flags|=4),f&&(e.flags|=2,h&&(e.id=h.uid,e.i=h))};const g=function(e,t,n=s){const{immediate:o,deep:r,once:i,scheduler:c,augmentJob:a,call:u}=n,d=e=>r?e:Wt(e)||!1===r||0===r?Cn(e,1):Cn(e);let h,f,g,v,y=!1,S=!1;if(Xt(e)?(f=()=>e.value,y=Wt(e)):Ht(e)?(f=()=>d(e),y=!0):m(e)?(S=!0,y=e.some((e=>Ht(e)||Wt(e))),f=()=>e.map((e=>Xt(e)?e.value:Ht(e)?d(e):b(e)?u?u(e,2):e():void 0))):f=b(e)?t?u?()=>u(e,2):e:()=>{if(g){Fe();try{g()}finally{Pe()}}const t=Sn;Sn=h;try{return u?u(e,3,[v]):e(v)}finally{Sn=t}}:l,t&&r){const e=f,t=!0===r?1/0:r;f=()=>Cn(e(),t)}const _=me(),x=()=>{h.stop(),_&&p(_.effects,h)};if(i&&t){const e=t;t=(...t)=>{e(...t),x()}}let C=S?new Array(e.length).fill(yn):yn;const w=e=>{if(1&h.flags&&(h.dirty||e))if(t){const e=h.run();if(r||y||(S?e.some(((e,t)=>$(e,C[t]))):$(e,C))){g&&g();const n=Sn;Sn=h;try{const n=[e,C===yn?void 0:S&&C[0]===yn?[]:C,v];u?u(t,3,n):t(...n),C=e}finally{Sn=n}}}else h.run()};return a&&a(w),h=new ye(f),h.scheduler=c?()=>c(w,!1):w,v=e=>xn(e,!1,h),g=h.onStop=()=>{const e=bn.get(h);if(e){if(u)u(e,4);else for(const t of e)t();bn.delete(h)}},t?o?w(!0):C=h.run():c?c(w.bind(null,!0),!0):h.run(),x.pause=h.pause.bind(h),x.resume=h.resume.bind(h),x.stop=x,x}(e,t,a);return u&&u.push(g),g}function zs(e,t,n){const o=this.proxy,r=S(e)?e.includes(".")?Gs(o,e):()=>o[e]:e.bind(o,o);let s;b(t)?s=t:(s=t.handler,n=t);const i=Xi(this),l=Ks(r,s.bind(o),n);return i(),l}function Gs(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{let a,u,d=s;return qs((()=>{const n=e[t];$(a,n)&&(a=n,c())})),{get:()=>(l(),n.get?n.get(a):a),set(e){const l=n.set?n.set(e):e;if(!($(l,a)||d!==s&&$(e,d)))return;const p=o.vnode.props;p&&(t in p||r in p||i in p)&&(`onUpdate:${t}`in p||`onUpdate:${r}`in p||`onUpdate:${i}`in p)||(a=e,c()),o.emit(`update:${t}`,l),$(e,l)&&$(e,d)&&!$(l,u)&&c(),d=e,u=l}}}));return c[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?l||s:c,done:!1}:{done:!0}}},c}const Qs=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${O(t)}Modifiers`]||e[`${P(t)}Modifiers`];function Xs(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||s;let r=n;const i=t.startsWith("update:"),l=i&&Qs(o,t.slice(7));let c;l&&(l.trim&&(r=n.map((e=>S(e)?e.trim():e))),l.number&&(r=n.map(j)));let a=o[c=M(t)]||o[c=M(O(t))];!a&&i&&(a=o[c=M(P(t))]),a&&An(a,e,6,r);const u=o[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,An(u,e,6,r)}}function Ys(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},l=!1;if(!b(e)){const o=e=>{const n=Ys(e,t,!0);n&&(l=!0,d(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(m(s)?s.forEach((e=>i[e]=null)):d(i,s),x(e)&&o.set(e,i),i):(x(e)&&o.set(e,null),null)}function Zs(e,t){return!(!e||!a(t))&&(t=t.slice(2).replace(/Once$/,""),f(e,t[0].toLowerCase()+t.slice(1))||f(e,P(t))||f(e,t))}function ei(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[s],slots:i,attrs:l,emit:c,render:a,renderCache:d,props:p,data:h,setupState:f,ctx:m,inheritAttrs:g}=e,v=Yn(e);let y,b;try{if(4&n.shapeFlag){const e=r||o,t=e;y=Bi(a.call(t,e,d,p,f,h,m)),b=l}else{const e=t;y=Bi(e.length>1?e(p,{attrs:l,slots:i,emit:c}):e(p,null)),b=t.props?l:ti(l)}}catch(t){vi.length=0,In(t,e,1),y=Oi(mi)}let S=y;if(b&&!1!==g){const e=Object.keys(b),{shapeFlag:t}=S;e.length&&7&t&&(s&&e.some(u)&&(b=ni(b,s)),S=Pi(S,b,!1,!0))}return n.dirs&&(S=Pi(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&Ao(S,n.transition),y=S,Yn(v),y}const ti=e=>{let t;for(const n in e)("class"===n||"style"===n||a(n))&&((t||(t={}))[n]=e[n]);return t},ni=(e,t)=>{const n={};for(const o in e)u(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function oi(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;re.__isSuspense;let ii=0;const li={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){if(null==e)!function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,d=u("div"),p=e.suspense=ai(e,r,o,t,d,n,s,i,l,c);a(null,p.pendingBranch=e.ssContent,d,null,o,p,s,i),p.deps>0?(ci(e,"onPending"),ci(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),pi(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,o,r,s,i,l,c,a);else{if(s&&s.deps>0&&!e.suspense.isInFallback)return t.suspense=e.suspense,t.suspense.vnode=t,void(t.el=e.el);!function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:f,pendingBranch:m,isInFallback:g,isHydrating:v}=d;if(m)d.pendingBranch=p,Ai(p,m)?(c(m,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():g&&(v||(c(f,h,n,o,r,null,s,i,l),pi(d,h)))):(d.pendingId=ii++,v?(d.isHydrating=!1,d.activeBranch=m):a(m,r,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():(c(f,h,n,o,r,null,s,i,l),pi(d,h))):f&&Ai(p,f)?(c(f,p,n,o,r,d,s,i,l),d.resolve(!0)):(c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0&&d.resolve()));else if(f&&Ai(p,f))c(f,p,n,o,r,d,s,i,l),pi(d,p);else if(ci(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=ii++,c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0)d.resolve();else{const{timeout:e,pendingId:t}=d;e>0?setTimeout((()=>{d.pendingId===t&&d.fallback(h)}),e):0===e&&d.fallback(h)}}(e,t,n,o,r,i,l,c,a)}},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=ai(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);return 0===a.deps&&a.resolve(!1,!0),u},normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=ui(o?n.default:n),e.ssFallback=o?ui(n.fallback):Oi(mi)}};function ci(e,t){const n=e.props&&e.props[t];b(n)&&n()}function ai(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:d,m:p,um:h,n:f,o:{parentNode:m,remove:g}}=a;let v;const y=function(e){const t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);y&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const b=e.props?U(e.props.timeout):void 0,S=s,_={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:ii++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:r,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=_;let d=!1;_.isHydrating?_.isHydrating=!1:e||(d=r&&i.transition&&"out-in"===i.transition.mode,d&&(r.transition.afterLeave=()=>{l===_.pendingId&&(p(i,u,s===S?f(r):s,0),Un(c))}),r&&(m(r.el)===u&&(s=f(r)),h(r,a,_,!0)),d||p(i,u,s,0)),pi(_,i),_.pendingBranch=null,_.isInFallback=!1;let g=_.parent,b=!1;for(;g;){if(g.pendingBranch){g.effects.push(...c),b=!0;break}g=g.parent}b||d||Un(c),_.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),ci(o,"onResolve")},fallback(e){if(!_.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,namespace:s}=_;ci(t,"onFallback");const i=f(n),a=()=>{_.isInFallback&&(d(null,e,r,i,o,null,s,l,c),pi(_,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),_.isInFallback=!0,h(n,o,null,!0),u||a()},move(e,t,n){_.activeBranch&&p(_.activeBranch,e,t,n),_.container=e},next:()=>_.activeBranch&&f(_.activeBranch),registerDep(e,t,n){const o=!!_.pendingBranch;o&&_.deps++;const r=e.vnode.el;e.asyncDep.catch((t=>{In(t,e,0)})).then((s=>{if(e.isUnmounted||_.isUnmounted||_.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:l}=e;rl(e,s,!1),r&&(l.el=r);const c=!r&&e.subTree.el;t(e,l,m(r||e.subTree.el),r?null:f(e.subTree),_,i,n),c&&g(c),ri(e,l.el),o&&0==--_.deps&&_.resolve()}))},unmount(e,t){_.isUnmounted=!0,_.activeBranch&&h(_.activeBranch,n,e,t),_.pendingBranch&&h(_.pendingBranch,n,e,t)}};return _}function ui(e){let t;if(b(e)){const n=xi&&e._c;n&&(e._d=!1,bi()),e=e(),n&&(e._d=!0,t=yi,Si())}if(m(e)){const t=function(e){let t;for(let n=0;nt!==e))),e}function di(e,t){t&&t.pendingBranch?m(e)?t.effects.push(...e):t.effects.push(e):Un(e)}function pi(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,ri(o,r))}const hi=Symbol.for("v-fgt"),fi=Symbol.for("v-txt"),mi=Symbol.for("v-cmt"),gi=Symbol.for("v-stc"),vi=[];let yi=null;function bi(e=!1){vi.push(yi=e?null:[])}function Si(){vi.pop(),yi=vi[vi.length-1]||null}let _i,xi=1;function Ci(e){xi+=e,e<0&&yi&&(yi.hasOnce=!0)}function wi(e){return e.dynamicChildren=xi>0?yi||i:null,Si(),xi>0&&yi&&yi.push(e),e}function Ei(e,t,n,o,r,s){return wi(Di(e,t,n,o,r,s,!0))}function Ti(e,t,n,o,r){return wi(Oi(e,t,n,o,r,!0))}function ki(e){return!!e&&!0===e.__v_isVNode}function Ai(e,t){return e.type===t.type&&e.key===t.key}function Ii(e){_i=e}const Ni=({key:e})=>null!=e?e:null,Ri=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?S(e)||Xt(e)||b(e)?{i:Qn,r:e,k:t,f:!!n}:e:null);function Di(e,t=null,n=null,o=0,r=null,s=(e===hi?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Ni(t),ref:t&&Ri(t),scopeId:Xn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Qn};return l?(ji(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=S(n)?8:16),xi>0&&!i&&yi&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&yi.push(c),c}const Oi=function(e,t=null,n=null,o=0,r=null,s=!1){if(e&&e!==Sr||(e=mi),ki(e)){const o=Pi(e,t,!0);return n&&ji(o,n),xi>0&&!s&&yi&&(6&o.shapeFlag?yi[yi.indexOf(e)]=o:yi.push(o)),o.patchFlag=-2,o}if(i=e,b(i)&&"__vccOpts"in i&&(e=e.__vccOpts),t){t=Fi(t);let{class:e,style:n}=t;e&&!S(e)&&(t.class=X(e)),x(n)&&(Kt(n)&&!m(n)&&(n=d({},n)),t.style=K(n))}var i;return Di(e,t,n,o,r,S(e)?1:si(e)?128:io(e)?64:x(e)?4:b(e)?2:0,s,!0)};function Fi(e){return e?Kt(e)||gs(e)?d({},e):e:null}function Pi(e,t,n=!1,o=!1){const{props:r,ref:s,patchFlag:i,children:l,transition:c}=e,a=t?Ui(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Ni(a),ref:t&&t.ref?n&&s?m(s)?s.concat(Ri(t)):[s,Ri(t)]:Ri(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==hi?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Pi(e.ssContent),ssFallback:e.ssFallback&&Pi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&o&&Ao(u,c.clone(u)),u}function Li(e=" ",t=0){return Oi(fi,null,e,t)}function Mi(e,t){const n=Oi(gi,null,e);return n.staticCount=t,n}function $i(e="",t=!1){return t?(bi(),Ti(mi,null,e)):Oi(mi,null,e)}function Bi(e){return null==e||"boolean"==typeof e?Oi(mi):m(e)?Oi(hi,null,e.slice()):ki(e)?Vi(e):Oi(fi,null,String(e))}function Vi(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Pi(e)}function ji(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(m(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),ji(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||gs(t)?3===o&&Qn&&(1===Qn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Qn}}else b(t)?(t={default:t,_ctx:Qn},n=32):(t=String(t),64&o?(n=16,t=[Li(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ui(...e){const t={};for(let n=0;nzi||Qn;let Ji,Qi;{const e=q(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach((t=>t(e))):o[0](e)}};Ji=t("__VUE_INSTANCE_SETTERS__",(e=>zi=e)),Qi=t("__VUE_SSR_SETTERS__",(e=>nl=e))}const Xi=e=>{const t=zi;return Ji(e),e.scope.on(),()=>{e.scope.off(),Ji(t)}},Yi=()=>{zi&&zi.scope.off(),Ji(null)};function Zi(e){return 4&e.vnode.shapeFlag}let el,tl,nl=!1;function ol(e,t=!1,n=!1){t&&Qi(t);const{props:o,children:r}=e.vnode,s=Zi(e);!function(e,t,n,o=!1){const r={},s=ms();e.propsDefaults=Object.create(null),vs(e,t,r,s);for(const t in e.propsOptions[0])t in r||(r[t]=void 0);n?e.props=o?r:Bt(r):e.type.props?e.props=r:e.props=s,e.attrs=s}(e,o,s,t),As(e,r,n);const i=s?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Or);const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?al(e):null,r=Xi(e);Fe();const s=kn(o,e,0,[e.props,n]);if(Pe(),r(),C(s)){if(zo(e)||Do(e),s.then(Yi,Yi),t)return s.then((n=>{rl(e,n,t)})).catch((t=>{In(t,e,0)}));e.asyncDep=s}else rl(e,s,t)}else ll(e,t)}(e,t):void 0;return t&&Qi(!1),i}function rl(e,t,n){b(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:x(t)&&(e.setupState=ln(t)),ll(e,n)}function sl(e){el=e,tl=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Fr))}}const il=()=>!el;function ll(e,t,n){const o=e.type;if(!e.render){if(!t&&el&&!o.render){const t=o.template||Zr(e).template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,l=d(d({isCustomElement:n,delimiters:s},r),i);o.render=el(t,l)}}e.render=o.render||l,tl&&tl(e)}{const t=Xi(e);Fe();try{!function(e){const t=Zr(e),n=e.proxy,o=e.ctx;Qr=!1,t.beforeCreate&&Xr(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:c,provide:a,inject:u,created:d,beforeMount:p,mounted:h,beforeUpdate:f,updated:g,activated:v,deactivated:y,beforeDestroy:S,beforeUnmount:_,destroyed:C,unmounted:w,render:E,renderTracked:T,renderTriggered:k,errorCaptured:A,serverPrefetch:I,expose:N,inheritAttrs:R,components:D,directives:O,filters:F}=t;if(u&&function(e,t){m(e)&&(e=os(e));for(const n in e){const o=e[n];let r;r=x(o)?"default"in o?ps(o.from||n,o.default,!0):ps(o.from||n):ps(o),Xt(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(u,o),i)for(const e in i){const t=i[e];b(t)&&(o[e]=t.bind(n))}if(r){const t=r.call(n,n);x(t)&&(e.data=$t(t))}if(Qr=!0,s)for(const e in s){const t=s[e],r=b(t)?t.bind(n,n):b(t.get)?t.get.bind(n,n):l,i=!b(t)&&b(t.set)?t.set.bind(n):l,c=pl({get:r,set:i});Object.defineProperty(o,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(c)for(const e in c)Yr(c[e],o,n,e);if(a){const e=b(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{ds(t,e[t])}))}function P(e,t){m(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&Xr(d,e,"c"),P(lr,p),P(cr,h),P(ar,f),P(ur,g),P(Zo,v),P(er,y),P(gr,A),P(mr,T),P(fr,k),P(dr,_),P(pr,w),P(hr,I),m(N))if(N.length){const t=e.exposed||(e.exposed={});N.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});E&&e.render===l&&(e.render=E),null!=R&&(e.inheritAttrs=R),D&&(e.components=D),O&&(e.directives=O),I&&Do(e)}(e)}finally{Pe(),t()}}}const cl={get:(e,t)=>(We(e,0,""),e[t])};function al(e){return{attrs:new Proxy(e.attrs,cl),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function ul(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(ln(Gt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Rr?Rr[n](e):void 0,has:(e,t)=>t in e||t in Rr})):e.proxy}function dl(e,t=!0){return b(e)?e.displayName||e.name:e.name||t&&e.__name}const pl=(e,t)=>{const n=function(e,t,n=!1){let o,r;return b(e)?o=e:(o=e.get,r=e.set),new mn(o,r,n)}(e,0,nl);return n};function hl(e,t,n){const o=arguments.length;return 2===o?x(t)&&!m(t)?ki(t)?Oi(e,null,[t]):Oi(e,t):Oi(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&ki(n)&&(n=[n]),Oi(e,t,n))}function fl(){}function ml(e,t,n,o){const r=n[o];if(r&&gl(r,e))return r;const s=t();return s.memo=e.slice(),s.cacheIndex=o,n[o]=s}function gl(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&yi&&yi.push(e),!0}const vl="3.5.9",yl=l,bl={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"},Sl=zn,_l=function e(t,n){var o,r;zn=t,zn?(zn.enabled=!0,Gn.forEach((({event:e,args:t})=>zn.emit(e,...t))),Gn=[]):"undefined"!=typeof window&&window.HTMLElement&&!(null==(r=null==(o=window.navigator)?void 0:o.userAgent)?void 0:r.includes("jsdom"))?((n.__VUE_DEVTOOLS_HOOK_REPLAY__=n.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((t=>{e(t,n)})),setTimeout((()=>{zn||(n.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Jn=!0,Gn=[])}),3e3)):(Jn=!0,Gn=[])},xl={createComponentInstance:Ki,setupComponent:ol,renderComponentRoot:ei,setCurrentRenderingInstance:Yn,isVNode:ki,normalizeVNode:Bi,getComponentPublicInstance:ul,ensureValidVNode:Ar,pushWarningContext:function(e){wn.push(e)},popWarningContext:function(){wn.pop()}},Cl=null,wl=null,El=null;let Tl;const kl="undefined"!=typeof window&&window.trustedTypes;if(kl)try{Tl=kl.createPolicy("vue",{createHTML:e=>e})}catch(e){}const Al=Tl?e=>Tl.createHTML(e):e=>e,Il="undefined"!=typeof document?document:null,Nl=Il&&Il.createElement("template"),Rl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r="svg"===t?Il.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?Il.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?Il.createElement(e,{is:n}):Il.createElement(e);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>Il.createTextNode(e),createComment:e=>Il.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Il.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{Nl.innerHTML=Al("svg"===o?`${e}`:"mathml"===o?`${e}`:e);const r=Nl.content;if("svg"===o||"mathml"===o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Dl="transition",Ol="animation",Fl=Symbol("_vtc"),Pl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ll=d({},So,Pl),Ml=(e=>(e.displayName="Transition",e.props=Ll,e))(((e,{slots:t})=>hl(Co,Vl(e),t))),$l=(e,t=[])=>{m(e)?e.forEach((e=>e(...t))):e&&e(...t)},Bl=e=>!!e&&(m(e)?e.some((e=>e.length>1)):e.length>1);function Vl(e){const t={};for(const n in e)n in Pl||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:a=i,appearToClass:u=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(x(e))return[jl(e.enter),jl(e.leave)];{const t=jl(e);return[t,t]}}(r),g=m&&m[0],v=m&&m[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:S,onLeave:_,onLeaveCancelled:C,onBeforeAppear:w=y,onAppear:E=b,onAppearCancelled:T=S}=t,k=(e,t,n)=>{Hl(e,t?u:l),Hl(e,t?a:i),n&&n()},A=(e,t)=>{e._isLeaving=!1,Hl(e,p),Hl(e,f),Hl(e,h),t&&t()},I=e=>(t,n)=>{const r=e?E:b,i=()=>k(t,e,n);$l(r,[t,i]),ql((()=>{Hl(t,e?c:s),Ul(t,e?u:l),Bl(r)||Kl(t,o,g,i)}))};return d(t,{onBeforeEnter(e){$l(y,[e]),Ul(e,s),Ul(e,i)},onBeforeAppear(e){$l(w,[e]),Ul(e,c),Ul(e,a)},onEnter:I(!1),onAppear:I(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>A(e,t);Ul(e,p),Ul(e,h),Ql(),ql((()=>{e._isLeaving&&(Hl(e,p),Ul(e,f),Bl(_)||Kl(e,o,v,n))})),$l(_,[e,n])},onEnterCancelled(e){k(e,!1),$l(S,[e])},onAppearCancelled(e){k(e,!0),$l(T,[e])},onLeaveCancelled(e){A(e),$l(C,[e])}})}function jl(e){return U(e)}function Ul(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Fl]||(e[Fl]=new Set)).add(t)}function Hl(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Fl];n&&(n.delete(t),n.size||(e[Fl]=void 0))}function ql(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Wl=0;function Kl(e,t,n,o){const r=e._endId=++Wl,s=()=>{r===e._endId&&o()};if(null!=n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=zl(e,t);if(!i)return o();const a=i+"end";let u=0;const d=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&d()};setTimeout((()=>{u(n[e]||"").split(", "),r=o(`${Dl}Delay`),s=o(`${Dl}Duration`),i=Gl(r,s),l=o(`${Ol}Delay`),c=o(`${Ol}Duration`),a=Gl(l,c);let u=null,d=0,p=0;return t===Dl?i>0&&(u=Dl,d=i,p=s.length):t===Ol?a>0&&(u=Ol,d=a,p=c.length):(d=Math.max(i,a),u=d>0?i>a?Dl:Ol:null,p=u?u===Dl?s.length:c.length:0),{type:u,timeout:d,propCount:p,hasTransform:u===Dl&&/\b(transform|all)(,|$)/.test(o(`${Dl}Property`).toString())}}function Gl(e,t){for(;e.lengthJl(t)+Jl(e[n]))))}function Jl(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Ql(){return document.body.offsetHeight}const Xl=Symbol("_vod"),Yl=Symbol("_vsh"),Zl={beforeMount(e,{value:t},{transition:n}){e[Xl]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):ec(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),ec(e,!0),o.enter(e)):o.leave(e,(()=>{ec(e,!1)})):ec(e,t))},beforeUnmount(e,{value:t}){ec(e,t)}};function ec(e,t){e.style.display=t?e[Xl]:"none",e[Yl]=!t}const tc=Symbol("");function nc(e){const t=Gi();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>rc(e,n)))},o=()=>{const o=e(t.proxy);t.ce?rc(t.ce,o):oc(t.subTree,o),n(o)};lr((()=>{Hs(o)})),cr((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),pr((()=>e.disconnect()))}))}function oc(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{oc(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)rc(e.el,t);else if(e.type===hi)e.children.forEach((e=>oc(e,t)));else if(e.type===gi){let{el:n,anchor:o}=e;for(;n&&(rc(n,t),n!==o);)n=n.nextSibling}}function rc(e,t){if(1===e.nodeType){const n=e.style;let o="";for(const e in t)n.setProperty(`--${e}`,t[e]),o+=`--${e}: ${t[e]};`;n[tc]=o}}const sc=/(^|;)\s*display\s*:/,ic=/\s*!important$/;function lc(e,t,n){if(m(n))n.forEach((n=>lc(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=ac[t];if(n)return n;let o=O(t);if("filter"!==o&&o in e)return ac[t]=o;o=L(o);for(let n=0;nmc||(gc.then((()=>mc=0)),mc=Date.now()),yc=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,bc={};function Sc(e,t,n){const o=No(e,t);k(o)&&d(o,t);class r extends Cc{constructor(e){super(o,e,n)}}return r.def=o,r}const _c=(e,t)=>Sc(e,t,aa),xc="undefined"!=typeof HTMLElement?HTMLElement:class{};class Cc extends xc{constructor(e,t={},n=ca){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==ca?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof Cc){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then((()=>{this._pendingResolve=void 0,this._resolveDef()})):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,Bn((()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)}))}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:n,styles:o}=e;let r;if(n&&!m(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=U(this._props[e])),(r||(r=Object.create(null)))[O(e)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(o),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then((t=>e(this._def=t,!0))):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const t=this._instance&&this._instance.exposed;if(t)for(const e in t)f(this,e)||Object.defineProperty(this,e,{get:()=>on(t[e])})}_resolveProps(e){const{props:t}=e,n=m(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(const e of n.map(O))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const t=this.hasAttribute(e);let n=t?this.getAttribute(e):bc;const o=O(e);t&&this._numberProps&&this._numberProps[o]&&(n=U(n)),this._setProp(o,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!1){t!==this._props[e]&&(t===bc?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(P(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(P(e),t+""):t||this.removeAttribute(P(e))))}_update(){ia(this._createVNode(),this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const t=Oi(this._def,d(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,k(t[0])?d({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),P(e)!==e&&t(P(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}const n=this._nonce;for(let t=e.length-1;t>=0;t--){const o=document.createElement("style");n&&o.setAttribute("nonce",n),o.textContent=e[t],this.shadowRoot.prepend(o)}}_parseSlots(){const e=this._slots={};let t;for(;t=this.firstChild;){const n=1===t.nodeType&&t.getAttribute("slot")||"default";(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){const e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n(delete e.props.mode,e))({name:"TransitionGroup",props:d({},Ll,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Gi(),o=yo();let r,s;return ur((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode(),r=e[Fl];r&&r.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))})),n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(o);const{hasTransform:i}=zl(o);return s.removeChild(o),i}(r[0].el,n.vnode.el,t))return;r.forEach(Dc),r.forEach(Oc);const o=r.filter(Fc);Ql(),o.forEach((e=>{const n=e.el,o=n.style;Ul(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n[Ic]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n[Ic]=null,Hl(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=zt(e),l=Vl(i);let c=i.tag||hi;if(r=[],s)for(let e=0;e{const t=e.props["onUpdate:modelValue"]||!1;return m(t)?e=>B(t,e):t};function Lc(e){e.target.composing=!0}function Mc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const $c=Symbol("_assign"),Bc={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[$c]=Pc(r);const s=o||r.props&&"number"===r.props.type;pc(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=j(o)),e[$c](o)})),n&&pc(e,"change",(()=>{e.value=e.value.trim()})),t||(pc(e,"compositionstart",Lc),pc(e,"compositionend",Mc),pc(e,"change",Mc))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:s}},i){if(e[$c]=Pc(i),e.composing)return;const l=null==t?"":t;if((!s&&"number"!==e.type||/^0\d/.test(e.value)?e.value:j(e.value))!==l){if(document.activeElement===e&&"range"!==e.type){if(o&&t===n)return;if(r&&e.value.trim()===l)return}e.value=l}}},Vc={deep:!0,created(e,t,n){e[$c]=Pc(n),pc(e,"change",(()=>{const t=e._modelValue,n=Wc(e),o=e.checked,r=e[$c];if(m(t)){const e=ie(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(v(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(Kc(e,o))}))},mounted:jc,beforeUpdate(e,t,n){e[$c]=Pc(n),jc(e,t,n)}};function jc(e,{value:t},n){let o;e._modelValue=t,o=m(t)?ie(t,n.props.value)>-1:v(t)?t.has(n.props.value):se(t,Kc(e,!0)),e.checked!==o&&(e.checked=o)}const Uc={created(e,{value:t},n){e.checked=se(t,n.props.value),e[$c]=Pc(n),pc(e,"change",(()=>{e[$c](Wc(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e[$c]=Pc(o),t!==n&&(e.checked=se(t,o.props.value))}},Hc={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=v(t);pc(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?j(Wc(e)):Wc(e)));e[$c](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,Bn((()=>{e._assigning=!1}))})),e[$c]=Pc(o)},mounted(e,{value:t}){qc(e,t)},beforeUpdate(e,t,n){e[$c]=Pc(n)},updated(e,{value:t}){e._assigning||qc(e,t)}};function qc(e,t){const n=e.multiple,o=m(t);if(!n||o||v(t)){for(let r=0,s=e.options.length;rString(e)===String(i))):ie(t,i)>-1}else s.selected=t.has(i);else if(se(Wc(s),t))return void(e.selectedIndex!==r&&(e.selectedIndex=r))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Wc(e){return"_value"in e?e._value:e.value}function Kc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const zc={created(e,t,n){Jc(e,t,n,null,"created")},mounted(e,t,n){Jc(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Jc(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Jc(e,t,n,o,"updated")}};function Gc(e,t){switch(e){case"SELECT":return Hc;case"TEXTAREA":return Bc;default:switch(t){case"checkbox":return Vc;case"radio":return Uc;default:return Bc}}}function Jc(e,t,n,o,r){const s=Gc(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const Qc=["ctrl","shift","alt","meta"],Xc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Qc.some((n=>e[`${n}Key`]&&!t.includes(n)))},Yc=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=P(n.key);return t.some((e=>e===o||Zc[e]===o))?e(n):void 0})},ta=d({patchProp:(e,t,n,o,r,s)=>{const i="svg"===r;"class"===t?function(e,t,n){const o=e[Fl];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,i):"style"===t?function(e,t,n){const o=e.style,r=S(n);let s=!1;if(n&&!r){if(t)if(S(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&lc(o,t,"")}else for(const e in t)null==n[e]&&lc(o,e,"");for(const e in n)"display"===e&&(s=!0),lc(o,e,n[e])}else if(r){if(t!==n){const e=o[tc];e&&(n+=";"+e),o.cssText=n,s=sc.test(n)}}else t&&e.removeAttribute("style");Xl in e&&(e[Xl]=s?o.display:"",e[Yl]&&(o.display="none"))}(e,n,o):a(t)?u(t)||function(e,t,n,o,r=null){const s=e[hc]||(e[hc]={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(fc.test(e)){let n;for(t={};n=e.match(fc);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):P(e.slice(2)),t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();An(function(e,t){if(m(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=vc(),n}(o,r);pc(e,n,i,l)}else i&&(function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}(e,t,0,o,s):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&yc(t)&&b(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!yc(t)||!S(n))&&(t in e||!(!e._isVueCE||!/[A-Z]/.test(t)&&S(n)))}(e,t,o,i))?(function(e,t,n){if("innerHTML"===t||"textContent"===t)return void(null!=n&&(e[t]="innerHTML"===t?Al(n):n));const o=e.tagName;if("value"===t&&"PROGRESS"!==o&&!o.includes("-")){const r="OPTION"===o?e.getAttribute("value")||"":e.value,s=null==n?"checkbox"===e.type?"on":"":String(n);return r===s&&"_value"in e||(e.value=s),null==n&&e.removeAttribute(t),void(e._value=n)}let r=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=re(n):null==n&&"string"===o?(n="",r=!0):"number"===o&&(n=0,r=!0)}try{e[t]=n}catch(e){}r&&e.removeAttribute(t)}(e,t,o),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||dc(e,t,o,i,0,"value"!==t)):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),dc(e,t,o,i))}},Rl);let na,oa=!1;function ra(){return na||(na=Rs(ta))}function sa(){return na=oa?na:Ds(ta),oa=!0,na}const ia=(...e)=>{ra().render(...e)},la=(...e)=>{sa().hydrate(...e)},ca=(...e)=>{const t=ra().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=da(e);if(!o)return;const r=t._component;b(r)||r.render||r.template||(r.template=o.innerHTML),1===o.nodeType&&(o.textContent="");const s=n(o,!1,ua(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},aa=(...e)=>{const t=sa().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=da(e);if(t)return n(t,!0,ua(t))},t};function ua(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function da(e){return S(e)?document.querySelector(e):e}let pa=!1;const ha=()=>{pa||(pa=!0,Bc.getSSRProps=({value:e})=>({value:e}),Uc.getSSRProps=({value:e},t)=>{if(t.props&&se(t.props.value,e))return{checked:!0}},Vc.getSSRProps=({value:e},t)=>{if(m(e)){if(t.props&&ie(e,t.props.value)>-1)return{checked:!0}}else if(v(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},zc.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=Gc(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},Zl.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})},fa=Symbol(""),ma=Symbol(""),ga=Symbol(""),va=Symbol(""),ya=Symbol(""),ba=Symbol(""),Sa=Symbol(""),_a=Symbol(""),xa=Symbol(""),Ca=Symbol(""),wa=Symbol(""),Ea=Symbol(""),Ta=Symbol(""),ka=Symbol(""),Aa=Symbol(""),Ia=Symbol(""),Na=Symbol(""),Ra=Symbol(""),Da=Symbol(""),Oa=Symbol(""),Fa=Symbol(""),Pa=Symbol(""),La=Symbol(""),Ma=Symbol(""),$a=Symbol(""),Ba=Symbol(""),Va=Symbol(""),ja=Symbol(""),Ua=Symbol(""),Ha=Symbol(""),qa=Symbol(""),Wa=Symbol(""),Ka=Symbol(""),za=Symbol(""),Ga=Symbol(""),Ja=Symbol(""),Qa=Symbol(""),Xa=Symbol(""),Ya=Symbol(""),Za={[fa]:"Fragment",[ma]:"Teleport",[ga]:"Suspense",[va]:"KeepAlive",[ya]:"BaseTransition",[ba]:"openBlock",[Sa]:"createBlock",[_a]:"createElementBlock",[xa]:"createVNode",[Ca]:"createElementVNode",[wa]:"createCommentVNode",[Ea]:"createTextVNode",[Ta]:"createStaticVNode",[ka]:"resolveComponent",[Aa]:"resolveDynamicComponent",[Ia]:"resolveDirective",[Na]:"resolveFilter",[Ra]:"withDirectives",[Da]:"renderList",[Oa]:"renderSlot",[Fa]:"createSlots",[Pa]:"toDisplayString",[La]:"mergeProps",[Ma]:"normalizeClass",[$a]:"normalizeStyle",[Ba]:"normalizeProps",[Va]:"guardReactiveProps",[ja]:"toHandlers",[Ua]:"camelize",[Ha]:"capitalize",[qa]:"toHandlerKey",[Wa]:"setBlockTracking",[Ka]:"pushScopeId",[za]:"popScopeId",[Ga]:"withCtx",[Ja]:"unref",[Qa]:"isRef",[Xa]:"withMemo",[Ya]:"isMemoSame"},eu={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function tu(e,t,n,o,r,s,i,l=!1,c=!1,a=!1,u=eu){return e&&(l?(e.helper(ba),e.helper(du(e.inSSR,a))):e.helper(uu(e.inSSR,a)),i&&e.helper(Ra)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function nu(e,t=eu){return{type:17,loc:t,elements:e}}function ou(e,t=eu){return{type:15,loc:t,properties:e}}function ru(e,t){return{type:16,loc:eu,key:S(e)?su(e,!0):e,value:t}}function su(e,t=!1,n=eu,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function iu(e,t=eu){return{type:8,loc:t,children:e}}function lu(e,t=[],n=eu){return{type:14,loc:n,callee:e,arguments:t}}function cu(e,t=void 0,n=!1,o=!1,r=eu){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function au(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:eu}}function uu(e,t){return e||t?xa:Ca}function du(e,t){return e||t?Sa:_a}function pu(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(uu(o,e.isComponent)),t(ba),t(du(o,e.isComponent)))}const hu=new Uint8Array([123,123]),fu=new Uint8Array([125,125]);function mu(e){return e>=97&&e<=122||e>=65&&e<=90}function gu(e){return 32===e||10===e||9===e||12===e||13===e}function vu(e){return 47===e||62===e||gu(e)}function yu(e){const t=new Uint8Array(e.length);for(let n=0;n4===e.type&&e.isStatic;function ku(e){switch(e){case"Teleport":case"teleport":return ma;case"Suspense":case"suspense":return ga;case"KeepAlive":case"keep-alive":return va;case"BaseTransition":case"base-transition":return ya}}const Au=/^\d|[^\$\w\xA0-\uFFFF]/,Iu=e=>!Au.test(e),Nu=/[A-Za-z_$\xA0-\uFFFF]/,Ru=/[\.\?\w$\xA0-\uFFFF]/,Du=/\s+[.[]\s*|\s*[.[]\s+/g,Ou=e=>4===e.type?e.content:e.loc.source,Fu=e=>{const t=Ou(e).trim().replace(Du,(e=>e.trim()));let n=0,o=[],r=0,s=0,i=null;for(let e=0;e|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;function Lu(e,t,n=!1){for(let o=0;o4===e.key.type&&e.key.content===o))}return n}function zu(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}const Gu=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Ju={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:c,isPreTag:c,isIgnoreNewlineTag:c,isCustomElement:c,onError:Cu,onWarn:wu,comments:!1,prefixIdentifiers:!1};let Qu=Ju,Xu=null,Yu="",Zu=null,ed=null,td="",nd=-1,od=-1,rd=0,sd=!1,id=null;const ld=[],cd=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=hu,this.delimiterClose=fu,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=hu,this.delimiterClose=fu}getPos(e){let t=1,n=e+1;for(let o=this.newlines.length-1;o>=0;o--){const r=this.newlines[o];if(e>r){t=o+2,n=e-r;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?vu(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||gu(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart=e||(28===this.state?this.currentSequence===bu.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(ld,{onerr:Ad,ontext(e,t){hd(dd(e,t),e,t)},ontextentity(e,t,n){hd(e,t,n)},oninterpolation(e,t){if(sd)return hd(dd(e,t),e,t);let n=e+cd.delimiterOpen.length,o=t-cd.delimiterClose.length;for(;gu(Yu.charCodeAt(n));)n++;for(;gu(Yu.charCodeAt(o-1));)o--;let r=dd(n,o);r.includes("&")&&(r=Qu.decodeEntities(r,!1)),Cd({type:5,content:kd(r,!1,wd(n,o)),loc:wd(e,t)})},onopentagname(e,t){const n=dd(e,t);Zu={type:1,tag:n,ns:Qu.getNamespace(n,ld[0],Qu.ns),tagType:0,props:[],children:[],loc:wd(e-1,t),codegenNode:void 0}},onopentagend(e){pd(e)},onclosetag(e,t){const n=dd(e,t);if(!Qu.isVoidTag(n)){let o=!1;for(let e=0;e0&&Ad(24,ld[0].loc.start.offset);for(let n=0;n<=e;n++)fd(ld.shift(),t,n(7===e.type?e.rawName:e.name)===n))&&Ad(2,t)},onattribend(e,t){if(Zu&&ed){if(Ed(ed.loc,t),0!==e)if(td.includes("&")&&(td=Qu.decodeEntities(td,!0)),6===ed.type)"class"===ed.name&&(td=xd(td).trim()),1!==e||td||Ad(13,t),ed.value={type:2,content:td,loc:1===e?wd(nd,od):wd(nd-1,od+1)},cd.inSFCRoot&&"template"===Zu.tag&&"lang"===ed.name&&td&&"html"!==td&&cd.enterRCDATA(yu("{const r=t.start.offset+n;return kd(e,!1,wd(r,r+e.length),0,o?1:0)},l={source:i(s.trim(),n.indexOf(s,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(ud,"").trim();const a=r.indexOf(c),u=c.match(ad);if(u){c=c.replace(ad,"").trim();const e=u[1].trim();let t;if(e&&(t=n.indexOf(e,a+c.length),l.key=i(e,t,!0)),u[2]){const o=u[2].trim();o&&(l.index=i(o,n.indexOf(o,l.key?t+e.length:a+c.length),!0))}}return c&&(l.value=i(c,a,!0)),l}(ed.exp));let t=-1;"bind"===ed.name&&(t=ed.modifiers.findIndex((e=>"sync"===e.content)))>-1&&xu("COMPILER_V_BIND_SYNC",Qu,ed.loc,ed.rawName)&&(ed.name="model",ed.modifiers.splice(t,1))}7===ed.type&&"pre"===ed.name||Zu.props.push(ed)}td="",nd=od=-1},oncomment(e,t){Qu.comments&&Cd({type:3,content:dd(e,t),loc:wd(e-4,t+3)})},onend(){const e=Yu.length;for(let t=0;t64&&n<91||ku(e)||Qu.isBuiltInComponent&&Qu.isBuiltInComponent(e)||Qu.isNativeTag&&!Qu.isNativeTag(e))return!0;var n;for(let e=0;e6===e.type&&"inline-template"===e.name));n&&xu("COMPILER_INLINE_TEMPLATE",Qu,n.loc)&&e.children.length&&(n.value={type:2,content:dd(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function md(e,t){let n=e;for(;Yu.charCodeAt(n)!==t&&n>=0;)n--;return n}const gd=new Set(["if","else","else-if","for","slot"]);function vd({tag:e,props:t}){if("template"===e)for(let e=0;e0){if(e>=2){l.codegenNode.patchFlag=-1,i.push(l);continue}}else{const e=l.codegenNode;if(13===e.type){const t=e.patchFlag;if((void 0===t||512===t||1===t)&&Pd(l,n)>=2){const t=Ld(l);t&&(e.props=n.hoist(t))}e.dynamicProps&&(e.dynamicProps=n.hoist(e.dynamicProps))}}}else if(12===l.type&&(o?0:Dd(l,n))>=2){i.push(l);continue}if(1===l.type){const t=1===l.tagType;t&&n.scopes.vSlot++,Rd(l,e,n,!1,r),t&&n.scopes.vSlot--}else if(11===l.type)Rd(l,e,n,1===l.children.length,!0);else if(9===l.type)for(let t=0;te.key===t||e.key.content===t));return n&&n.value}}i.length&&n.transformHoist&&n.transformHoist(s,n,e)}function Dd(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const o=n.get(e);if(void 0!==o)return o;const r=e.codegenNode;if(13!==r.type)return 0;if(r.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0===r.patchFlag){let o=3;const s=Pd(e,t);if(0===s)return n.set(e,0),0;s1)for(let r=0;r`_${Za[k.helper(e)]}`,replaceNode(e){k.parent.children[k.childIndex]=k.currentNode=e},removeNode(e){const t=k.parent.children,n=e?t.indexOf(e):k.currentNode?k.childIndex:-1;e&&e!==k.currentNode?k.childIndex>n&&(k.childIndex--,k.onNodeRemoved()):(k.currentNode=null,k.onNodeRemoved()),k.parent.children.splice(n,1)},onNodeRemoved:l,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){S(e)&&(e=su(e)),k.hoists.push(e);const t=su(`_hoisted_${k.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){const n=function(e,t,n=!1){return{type:20,index:e,value:t,needPauseTracking:n,needArraySpread:!1,loc:eu}}(k.cached.length,e,t);return k.cached.push(n),n}};return k.filters=new Set,k}(e,t);$d(e,n),t.hoistStatic&&Id(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(Nd(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&pu(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;e.codegenNode=tu(t,n(fa),void 0,e.children,o,void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function $d(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let r=0;r{n--};for(;nt===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(Vu))return;const s=[];for(let i=0;i`${Za[e]}: _${Za[e]}`;function Ud(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("filter"===t?Na:"component"===t?ka:Ia);for(let n=0;n3||!1;t.push("["),n&&t.indent(),qd(e,t,n),n&&t.deindent(),t.push("]")}function qd(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;ie||"null"))}([s,i,l,f,a]),t),n(")"),d&&n(")"),u&&(n(", "),Wd(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=S(e.callee)?e.callee:o(e.callee);r&&n(Vd),n(s+"(",-2,e),qd(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",-2,e);const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let e=0;e "),(c||l)&&(n("{"),o()),i?(c&&n("return "),m(i)?Hd(i,t):Wd(i,t)):l&&Wd(l,t),(c||l)&&(r(),n("}")),a&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!Iu(n.content);e&&i("("),Kd(n,t),e&&i(")")}else i("("),Wd(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),Wd(o,t),t.indentLevel--,s&&a(),s||i(" "),i(": ");const u=19===r.type;u||t.indentLevel++,Wd(r,t),u||t.indentLevel--,s&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t,{needPauseTracking:l,needArraySpread:c}=e;c&&n("[...("),n(`_cache[${e.index}] || (`),l&&(r(),n(`${o(Wa)}(-1),`),i(),n("(")),n(`_cache[${e.index}] = `),Wd(e.value,t),l&&(n(`).cacheIndex = ${e.index},`),i(),n(`${o(Wa)}(1),`),i(),n(`_cache[${e.index}]`),s()),n(")"),c&&n(")]")}(e,t);break;case 21:qd(e.body,t,!0,!1)}}function Kd(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,-3,e)}function zd(e,t){for(let n=0;nfunction(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const o=t.exp?t.exp.loc:e.loc;n.onError(Eu(28,t.loc)),t.exp=su("true",!1,o)}if("if"===t.name){const r=Qd(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(Eu(30,e.loc)),n.removeNode();const r=Qd(e,t);i.branches.push(r);const s=o&&o(i,r,!1);$d(r,n),s&&s(),n.currentNode=null}else n.onError(Eu(30,e.loc));break}n.removeNode(i)}}}}(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=Xd(t,i,n);else{const o=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);o.alternate=Xd(t,i+e.branches.length-1,n)}}}))));function Qd(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Lu(e,"for")?e.children:[e],userKey:Mu(e,"key"),isTemplateIf:n}}function Xd(e,t,n){return e.condition?au(e.condition,Yd(e,t,n),lu(n.helper(wa),['""',"true"])):Yd(e,t,n)}function Yd(e,t,n){const{helper:o}=n,r=ru("key",su(`${t}`,!1,eu,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return Wu(e,r,n),e}{let t=64;return tu(n,o(fa),ou([r]),s,t,void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===Xa?l.arguments[1].returns:l;return 13===t.type&&pu(t,n),Wu(t,r,n),e}var l}const Zd=(e,t,n)=>{const{modifiers:o,loc:r}=e,s=e.arg;let{exp:i}=e;if(i&&4===i.type&&!i.content.trim()&&(i=void 0),!i){if(4!==s.type||!s.isStatic)return n.onError(Eu(52,s.loc)),{props:[ru(s,su("",!0,r))]};ep(e),i=e.exp}return 4!==s.type?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=`${s.content} || ""`),o.some((e=>"camel"===e.content))&&(4===s.type?s.isStatic?s.content=O(s.content):s.content=`${n.helperString(Ua)}(${s.content})`:(s.children.unshift(`${n.helperString(Ua)}(`),s.children.push(")"))),n.inSSR||(o.some((e=>"prop"===e.content))&&tp(s,"."),o.some((e=>"attr"===e.content))&&tp(s,"^")),{props:[ru(s,i)]}},ep=(e,t)=>{const n=e.arg,o=O(n.content);e.exp=su(o,!1,n.loc)},tp=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},np=Bd("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return function(e,t,n,o){if(!t.exp)return void n.onError(Eu(31,t.loc));const r=t.forParseResult;if(!r)return void n.onError(Eu(32,t.loc));op(r);const{addIdentifiers:s,removeIdentifiers:i,scopes:l}=n,{source:c,value:a,key:u,index:d}=r,p={type:11,loc:t.loc,source:c,valueAlias:a,keyAlias:u,objectIndexAlias:d,parseResult:r,children:ju(e)?e.children:[e]};n.replaceNode(p),l.vFor++;const h=o&&o(p);return()=>{l.vFor--,h&&h()}}(e,t,n,(t=>{const s=lu(o(Da),[t.source]),i=ju(e),l=Lu(e,"memo"),c=Mu(e,"key",!1,!0);c&&7===c.type&&!c.exp&&ep(c);const a=c&&(6===c.type?c.value?su(c.value.content,!0):void 0:c.exp),u=c&&a?ru("key",a):null,d=4===t.source.type&&t.source.constType>0,p=d?64:c?128:256;return t.codegenNode=tu(n,o(fa),void 0,s,p,void 0,void 0,!0,!d,!1,e.loc),()=>{let c;const{children:p}=t,h=1!==p.length||1!==p[0].type,f=Uu(e)?e:i&&1===e.children.length&&Uu(e.children[0])?e.children[0]:null;if(f?(c=f.codegenNode,i&&u&&Wu(c,u,n)):h?c=tu(n,o(fa),u?ou([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(c=p[0].codegenNode,i&&u&&Wu(c,u,n),c.isBlock!==!d&&(c.isBlock?(r(ba),r(du(n.inSSR,c.isComponent))):r(uu(n.inSSR,c.isComponent))),c.isBlock=!d,c.isBlock?(o(ba),o(du(n.inSSR,c.isComponent))):o(uu(n.inSSR,c.isComponent))),l){const e=cu(rp(t.parseResult,[su("_cached")]));e.body={type:21,body:[iu(["const _memo = (",l.exp,")"]),iu(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(Ya)}(_cached, _memo)) return _cached`]),iu(["const _item = ",c]),su("_item.memo = _memo"),su("return _item")],loc:eu},s.arguments.push(e,su("_cache"),su(String(n.cached.length))),n.cached.push(null)}else s.arguments.push(cu(rp(t.parseResult),c,!0))}}))}));function op(e,t){e.finalized||(e.finalized=!0)}function rp({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||su("_".repeat(t+1),!1)))}([e,t,n,...o])}const sp=su("undefined",!1),ip=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Lu(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},lp=(e,t,n,o)=>cu(e,n,!1,!0,n.length?n[0].loc:o);function cp(e,t,n=lp){t.helper(Ga);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=Lu(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!Tu(e)&&(l=!0),s.push(ru(e||su("default",!0),n(t,void 0,o,r)))}let a=!1,u=!1;const d=[],p=new Set;let h=0;for(let e=0;e{const s=n(e,void 0,o,r);return t.compatConfig&&(s.isNonScopedSlot=!0),ru("default",s)};a?d.length&&d.some((e=>dp(e)))&&(u?t.onError(Eu(39,d[0].loc)):s.push(e(void 0,d))):s.push(e(void 0,o))}const f=l?2:up(e.children)?3:1;let m=ou(s.concat(ru("_",su(f+"",!1))),r);return i.length&&(m=lu(t.helper(Fa),[m,nu(i)])),{slots:m,hasDynamicSlots:l}}function ap(e,t,n){const o=[ru("name",e),ru("fn",t)];return null!=n&&o.push(ru("key",su(String(n),!0))),ou(o)}function up(e){for(let t=0;tfunction(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?function(e,t,n=!1){let{tag:o}=e;const r=vp(o),s=Mu(e,"is",!1,!0);if(s)if(r||_u("COMPILER_IS_ON_ELEMENT",t)){let e;if(6===s.type?e=s.value&&su(s.value.content,!0):(e=s.exp,e||(e=su("is",!1,s.arg.loc))),e)return lu(t.helper(Aa),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=ku(o)||t.isBuiltInComponent(o);return i?(n||t.helper(i),i):(t.helper(ka),t.components.add(o),zu(o,"component"))}(e,t):`"${n}"`;const i=x(s)&&s.callee===Aa;let l,c,a,u,d,p=0,h=i||s===ma||s===ga||!r&&("svg"===n||"foreignObject"===n||"math"===n);if(o.length>0){const n=fp(e,t,void 0,r,i);l=n.props,p=n.patchFlag,u=n.dynamicPropNames;const o=n.directives;d=o&&o.length?nu(o.map((e=>function(e,t){const n=[],o=pp.get(e);o?n.push(t.helperString(o)):(t.helper(Ia),t.directives.add(e.name),n.push(zu(e.name,"directive")));const{loc:r}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=su("true",!1,r);n.push(ou(e.modifiers.map((e=>ru(e,t))),r))}return nu(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0)if(s===va&&(h=!0,p|=1024),r&&s!==ma&&s!==va){const{slots:n,hasDynamicSlots:o}=cp(e,t);c=n,o&&(p|=1024)}else if(1===e.children.length&&s!==ma){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===Dd(n,t)&&(p|=1),c=r||2===o?n:e.children}else c=e.children;u&&u.length&&(a=function(e){let t="[";for(let n=0,o=e.length;n0;let f=!1,m=0,g=!1,v=!1,y=!1,b=!1,S=!1,x=!1;const C=[],w=e=>{u.length&&(d.push(ou(mp(u),l)),u=[]),e&&d.push(e)},E=()=>{t.scopes.vFor>0&&u.push(ru(su("ref_for",!0),su("true")))},T=({key:e,value:n})=>{if(Tu(e)){const s=e.content,i=a(s);if(!i||o&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||I(s)||(b=!0),i&&I(s)&&(x=!0),i&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&Dd(n,t)>0)return;"ref"===s?g=!0:"class"===s?v=!0:"style"===s?y=!0:"key"===s||C.includes(s)||C.push(s),!o||"class"!==s&&"style"!==s||C.includes(s)||C.push(s)}else S=!0};for(let r=0;r"prop"===e.content))&&(m|=32);const x=t.directiveTransforms[n];if(x){const{props:n,needRuntime:o}=x(c,e,t);!s&&n.forEach(T),b&&r&&!Tu(r)?w(ou(n,l)):u.push(...n),o&&(p.push(c),_(o)&&pp.set(c,o))}else N(n)||(p.push(c),h&&(f=!0))}}let k;if(d.length?(w(),k=d.length>1?lu(t.helper(La),d,l):d[0]):u.length&&(k=ou(mp(u),l)),S?m|=16:(v&&!o&&(m|=2),y&&!o&&(m|=4),C.length&&(m|=8),b&&(m|=32)),f||0!==m&&32!==m||!(g||x||p.length>0)||(m|=512),!t.inSSR&&k)switch(k.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t{if(Uu(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=function(e,t){let n,o='"default"';const r=[];for(let t=0;t0){const{props:o,directives:s}=fp(e,t,r,!1,!1);n=o,s.length&&t.onError(Eu(36,s[0].loc))}return{slotName:o,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let l=2;s&&(i[2]=s,l=3),n.length&&(i[3]=cu([],n,!1,!1,o),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=lu(t.helper(Oa),i,o)}},bp=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let l;if(e.exp||s.length||n.onError(Eu(35,r)),4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),l=su(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?M(O(e)):`on:${e}`,!0,i.loc)}else l=iu([`${n.helperString(qa)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(qa)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=Fu(c),t=!(e||(e=>Pu.test(Ou(e)))(c)),n=c.content.includes(";");(t||a&&e)&&(c=iu([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[ru(l,c||su("() => {}",!1,r))]};return o&&(u=o(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},Sp=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e{if(1===e.type&&Lu(e,"once",!0)){if(_p.has(e)||t.inVOnce||t.inSSR)return;return _p.add(e),t.inVOnce=!0,t.helper(Wa),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},Cp=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return n.onError(Eu(41,e.loc)),wp();const s=o.loc.source.trim(),i=4===o.type?o.content:s,l=n.bindingMetadata[s];if("props"===l||"props-aliased"===l)return n.onError(Eu(44,o.loc)),wp();if(!i.trim()||!Fu(o))return n.onError(Eu(42,o.loc)),wp();const c=r||su("modelValue",!0),a=r?Tu(r)?`onUpdate:${O(r.content)}`:iu(['"onUpdate:" + ',r]):"onUpdate:modelValue";let u;u=iu([(n.isTS?"($event: any)":"$event")+" => ((",o,") = $event)"]);const d=[ru(c,e.exp),ru(a,u)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>e.content)).map((e=>(Iu(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?Tu(r)?`${r.content}Modifiers`:iu([r,' + "Modifiers"']):"modelModifiers";d.push(ru(n,su(`{ ${t} }`,!1,e.loc,2)))}return wp(d)};function wp(e=[]){return{props:e}}const Ep=/[\w).+\-_$\]]/,Tp=(e,t)=>{_u("COMPILER_FILTERS",t)&&(5===e.type?kp(e.content,t):1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&kp(e.exp,t)})))};function kp(e,t){if(4===e.type)Ap(e,t);else for(let n=0;n=0&&(e=n.charAt(t)," "===e);t--);e&&Ep.test(e)||(u=!0)}}else void 0===i?(f=s+1,i=n.slice(0,s).trim()):g();function g(){m.push(n.slice(f,s).trim()),f=s+1}if(void 0===i?i=n.slice(0,s).trim():0!==f&&g(),m.length){for(s=0;s{if(1===e.type){const n=Lu(e,"memo");if(!n||Np.has(e))return;return Np.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&pu(o,t),e.codegenNode=lu(t.helper(Xa),[n.exp,cu(void 0,o),"_cache",String(t.cached.length)]),t.cached.push(null))}}};function Dp(e,t={}){const n=t.onError||Cu,o="module"===t.mode;!0===t.prefixIdentifiers?n(Eu(47)):o&&n(Eu(48)),t.cacheHandlers&&n(Eu(49)),t.scopeId&&!o&&n(Eu(50));const r=d({},t,{prefixIdentifiers:!1}),s=S(e)?function(e,t){if(cd.reset(),Zu=null,ed=null,td="",nd=-1,od=-1,ld.length=0,Yu=e,Qu=d({},Ju),t){let e;for(e in t)null!=t[e]&&(Qu[e]=t[e])}cd.mode="html"===Qu.parseMode?1:"sfc"===Qu.parseMode?2:0,cd.inXML=1===Qu.ns||2===Qu.ns;const n=t&&t.delimiters;n&&(cd.delimiterOpen=yu(n[0]),cd.delimiterClose=yu(n[1]));const o=Xu=function(e,t=""){return{type:0,source:t,children:[],helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:eu}}(0,e);return cd.parse(Yu),o.loc=wd(0,e.length),o.children=bd(o.children),Xu=null,o}(e,r):e,[i,l]=[[xp,Jd,Rp,np,Tp,yp,hp,ip,Sp],{on:bp,bind:Zd,model:Cp}];return Md(s,d({},r,{nodeTransforms:[...i,...t.nodeTransforms||[]],directiveTransforms:d({},l,t.directiveTransforms||{})})),function(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){const h={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:a,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${Za[e]}`,push(e,t=-2,n){h.code+=e},indent(){f(++h.indentLevel)},deindent(e=!1){e?--h.indentLevel:f(--h.indentLevel)},newline(){f(h.indentLevel)}};function f(e){h.push("\n"+" ".repeat(e),0)}return h}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:c,scopeId:a,ssr:u}=n,d=Array.from(e.helpers),p=d.length>0,h=!s&&"module"!==o;if(function(e,t){const{ssr:n,prefixIdentifiers:o,push:r,newline:s,runtimeModuleName:i,runtimeGlobalName:l,ssrRuntimeModuleName:c}=t,a=l,u=Array.from(e.helpers);u.length>0&&(r(`const _Vue = ${a}\n`,-1),e.hoists.length)&&r(`const { ${[xa,Ca,wa,Ea,Ta].filter((e=>u.includes(e))).map(jd).join(", ")} } = _Vue\n`,-1),function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o}=t;o();for(let r=0;r0)&&c()),e.directives.length&&(Ud(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Ud(e.filters,"filter",n),c()),e.temps>0){r("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n",0),c()),u||r("return "),e.codegenNode?Wd(e.codegenNode,n):r("null"),h&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(s,r)}const Op=Symbol(""),Fp=Symbol(""),Pp=Symbol(""),Lp=Symbol(""),Mp=Symbol(""),$p=Symbol(""),Bp=Symbol(""),Vp=Symbol(""),jp=Symbol(""),Up=Symbol("");var Hp;let qp;Hp={[Op]:"vModelRadio",[Fp]:"vModelCheckbox",[Pp]:"vModelText",[Lp]:"vModelSelect",[Mp]:"vModelDynamic",[$p]:"withModifiers",[Bp]:"withKeys",[Vp]:"vShow",[jp]:"Transition",[Up]:"TransitionGroup"},Object.getOwnPropertySymbols(Hp).forEach((e=>{Za[e]=Hp[e]}));const Wp={parseMode:"html",isVoidTag:ne,isNativeTag:e=>Z(e)||ee(e)||te(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,t=!1){return qp||(qp=document.createElement("div")),t?(qp.innerHTML=`
`,qp.children[0].getAttribute("foo")):(qp.innerHTML=e,qp.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?jp:"TransitionGroup"===e||"transition-group"===e?Up:void 0,getNamespace(e,t,n){let o=t?t.ns:n;if(t&&2===o)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(o=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(o=0);else t&&1===o&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(o=0));if(0===o){if("svg"===e)return 1;if("math"===e)return 2}return o}},Kp=(e,t)=>{const n=Q(e);return su(JSON.stringify(n),!1,t,3)};function zp(e,t){return Eu(e,t)}const Gp=r("passive,once,capture"),Jp=r("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Qp=r("left,right"),Xp=r("onkeyup,onkeydown,onkeypress"),Yp=(e,t)=>Tu(e)&&"onclick"===e.content.toLowerCase()?su(t,!0):4!==e.type?iu(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Zp=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},eh=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:su("style",!0,t.loc),exp:Kp(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],th={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(zp(53,r)),t.children.length&&(n.onError(zp(54,r)),t.children.length=0),{props:[ru(su("innerHTML",!0,r),o||su("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(zp(55,r)),t.children.length&&(n.onError(zp(56,r)),t.children.length=0),{props:[ru(su("textContent",!0),o?Dd(o,n)>0?o:lu(n.helperString(Pa),[o],r):su("",!0))]}},model:(e,t,n)=>{const o=Cp(e,t,n);if(!o.props.length||1===t.tagType)return o;e.arg&&n.onError(zp(58,e.arg.loc));const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let i=Pp,l=!1;if("input"===r||s){const o=Mu(t,"type");if(o){if(7===o.type)i=Mp;else if(o.value)switch(o.value.content){case"radio":i=Op;break;case"checkbox":i=Fp;break;case"file":l=!0,n.onError(zp(59,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=Mp)}else"select"===r&&(i=Lp);l||(o.needRuntime=n.helper(i))}else n.onError(zp(57,e.loc));return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>bp(e,t,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n)=>{const o=[],r=[],s=[];for(let i=0;i{const{exp:o,loc:r}=e;return o||n.onError(zp(61,r)),{props:[],needRuntime:n.helper(Vp)}}},nh=Object.create(null);sl((function(e,t){if(!S(e)){if(!e.nodeType)return l;e=e.innerHTML}const n=function(e,t){return e+JSON.stringify(t,((e,t)=>"function"==typeof t?t.toString():t))}(e,t),r=nh[n];if(r)return r;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const s=d({hoistStatic:!0,onError:void 0,onWarn:l},t);s.isCustomElement||"undefined"==typeof customElements||(s.isCustomElement=e=>!!customElements.get(e));const{code:i}=function(e,t={}){return Dp(e,d({},Wp,t,{nodeTransforms:[Zp,...eh,...t.nodeTransforms||[]],directiveTransforms:d({},th,t.directiveTransforms||{}),transformHoist:null}))}(e,s),c=new Function("Vue",i)(o);return c._rc=!0,nh[n]=c}))}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return n[e](s,s.exports,r),s.exports}r.m=n,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>({245:"form-editor-view",776:"form-browser-view",951:"restore-fields-view"}[e]+".chunk.js"),r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="leaf_vue:",r.l=(n,o,s,i)=>{if(e[n])e[n].push(o);else{var l,c;if(void 0!==s)for(var a=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(h);var r=e[n];if(delete e[n],l.parentNode&&l.parentNode.removeChild(l),r&&r.forEach((e=>e(o))),t)return t(o)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),c&&document.head.appendChild(l)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={763:0};r.f.j=(t,n)=>{var o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var s=new Promise(((n,r)=>o=e[t]=[n,r]));n.push(o[2]=s);var i=r.p+r.u(t),l=new Error;r.l(i,(n=>{if(r.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var s=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+s+": "+i+")",l.name="ChunkLoadError",l.type=s,l.request=i,o[1](l)}}),"chunk-"+t,t)}};var t=(t,n)=>{var o,s,[i,l,c]=n,a=0;if(i.some((t=>0!==e[t]))){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);c&&c(r)}for(t&&t(n);ae.length)&&(t=e.length);for(var n=0,o=Array(t);n{{ message }}
'}},created:function(){var e=this;this.getEnabledCategories(),document.addEventListener("keydown",(function(t){"escape"===((null==t?void 0:t.key)||"").toLowerCase()&&!0===e.showFormDialog&&null===(t.target.closest(".CodeMirror")||null)&&e.closeFormDialog()}))},methods:{truncateText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length<=t?e:e.slice(0,t)+n},decodeAndStripHTML:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("div");return t.innerHTML=e,XSSHelpers.stripAllTags(t.innerText)},updateChosenAttributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"List Selection",o=document.querySelector("#".concat(e,"_chosen input.chosen-search-input")),r=document.querySelector("#".concat(e,"-chosen-search-results"));null!==o&&(o.setAttribute("role","combobox"),o.setAttribute("aria-labelledby",t)),null!==r&&(r.setAttribute("title",n),r.setAttribute("role","listbox"))},showLastUpdate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=(new Date).toLocaleString(),n=document.getElementById(e);null!==n&&(n.style.display="flex",n.innerText="last modified: ".concat(t),n.style.border="2px solid #20a0f0",setTimeout((function(){n.style.border="2px solid transparent"}),750))},setDefaultAjaxResponseMessage:function(){var e=this;$.ajax({type:"POST",url:"ajaxIndex.php?a=checkstatus",data:{CSRFToken},success:function(t){e.ajaxResponseMessage=t||""},error:function(e){return reject(e)}})},initializeOrgSelector:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"employee",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s="group"===(e=e.toLowerCase())?"group#":"#",i={};(i="group"===e?new groupSelector("".concat(n,"orgSel_").concat(t)):"position"===e?new positionSelector("".concat(n,"orgSel_").concat(t)):new employeeSelector("".concat(n,"orgSel_").concat(t))).apiPath="".concat(this.orgchartPath,"/api/"),i.rootPath="".concat(this.orgchartPath,"/"),i.basePath="".concat(this.orgchartPath,"/"),i.setSelectHandler((function(){var t=document.querySelector("#".concat(i.containerID," input.").concat(e,"SelectorInput"));null!==t&&(t.value="".concat(s)+i.selection)})),"function"==typeof r&&i.setResultHandler((function(){return r(i)})),i.initialize();var l=document.querySelector("#".concat(i.containerID," input.").concat(e,"SelectorInput"));""!==o&&null!==l&&(l.value="".concat(s)+o)},getEnabledCategories:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.appIsLoadingCategories=!0;try{fetch("".concat(this.APIroot,"formStack/categoryList/allWithStaples")).then((function(n){n.json().then((function(n){for(var o in e.allStapledFormCatIDs={},e.categories={},n)e.categories[n[o].categoryID]=n[o],n[o].stapledFormIDs.forEach((function(t){e.allStapledFormCatIDs[t]=void 0===e.allStapledFormCatIDs[t]?1:e.allStapledFormCatIDs[t]+1}));e.appIsLoadingCategories=!1,t&&!0===/^form_[0-9a-f]{5}$/i.test(t)&&e.$router.push({name:"category",query:{formID:t}})}))}))}catch(e){console.log("error getting categories",e)}},getSiteSettings:function(){var e=this;try{fetch("".concat(this.APIroot,"system/settings")).then((function(t){t.json().then((function(t){e.siteSettings=t,+(null==t?void 0:t.leafSecure)>=1&&e.getSecureFormsInfo()}))}))}catch(e){console.log("error getting site settings",e)}},fetchLEAFSRequests:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(t,n){var o=new LeafFormQuery;o.setRootURL("../"),o.addTerm("categoryID","=","leaf_secure"),!0===e?(o.addTerm("stepID","=","resolved"),o.join("recordResolutionData")):o.addTerm("stepID","!=","resolved"),o.onSuccess((function(e){return t(e)})),o.execute()}))},getSecureFormsInfo:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"form/indicator/list?x-filterData=timeAdded"),success:function(e){},error:function(e){return console.log(e)}}),this.fetchLEAFSRequests(!0)];Promise.all(t).then((function(t){var n=t[0],o=t[1];e.checkLeafSRequestStatus(n,o)})).catch((function(e){return console.log("an error has occurred",e)}))},checkLeafSRequestStatus:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=!1,r=0;for(var s in n)"approved"===n[s].recordResolutionData.lastStatus.toLowerCase()&&n[s].recordResolutionData.fulfillmentTime>r&&(r=n[s].recordResolutionData.fulfillmentTime);var i=new Date(1e3*parseInt(r));for(var l in t)if(new Date(t[l].timeAdded).getTime()>i.getTime()){o=!0;break}!0===o?(this.showCertificationStatus=!0,this.fetchLEAFSRequests(!1).then((function(t){if(0===Object.keys(t).length)e.secureStatusText="Forms have been modified.",e.secureBtnText="Please Recertify Your Site",e.secureBtnLink="../report.php?a=LEAF_start_leaf_secure_certification";else{var n=t[Object.keys(t)[0]].recordID;e.secureStatusText="Re-certification in progress.",e.secureBtnText="Check Certification Progress",e.secureBtnLink="../index.php?a=printview&recordID="+n}})).catch((function(e){return console.log("an error has occurred",e)}))):this.showCertificationStatus=!1},updateCategoriesProperty:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";void 0!==this.categories[e][t]&&(this.categories[e][t]=n)},updateStapledFormsInfo:function(){var e,t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";!0===(arguments.length>2&&void 0!==arguments[2]&&arguments[2])?(this.categories[o].stapledFormIDs=this.categories[o].stapledFormIDs.filter((function(e){return e!==n})),(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[n])>0?this.allStapledFormCatIDs[n]=this.allStapledFormCatIDs[n]-1:console.log("check staple calc")):(this.allStapledFormCatIDs[n]=void 0===this.allStapledFormCatIDs[n]?1:this.allStapledFormCatIDs[n]+1,this.categories[o].stapledFormIDs=Array.from(new Set([].concat(function(e){if(Array.isArray(e))return i(e)}(t=this.categories[o].stapledFormIDs)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[n]))))},addNewCategory:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.categories[e]=t},removeCategory:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";delete this.categories[e]},closeFormDialog:function(){this.showFormDialog=!1,this.dialogTitle="",this.dialogFormContent="",this.dialogButtonText={confirm:"Save",cancel:"Cancel"},this.formSaveFunction=null,this.dialogData=null},lastModalTab:function(e){if(!1===(null==e?void 0:e.shiftKey)){var t=document.getElementById("leaf-vue-dialog-close");null!==t&&(t.focus(),e.preventDefault())}},setCustomDialogTitle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogTitle=e},setFormDialogComponent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogFormContent=e},setDialogSaveFunction:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";"function"==typeof e&&(this.formSaveFunction=e)},checkRequiredData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=Object.keys((null==this?void 0:this.dialogData)||{});e.forEach((function(e){n.includes(e)||t.push(e)})),t.length>0&&console.warn("expected dialogData key was not found",t)},openConfirmDeleteFormDialog:function(){this.setCustomDialogTitle("

Delete this form

"),this.setFormDialogComponent("confirm-delete-dialog"),this.dialogButtonText={confirm:"Yes",cancel:"No"},this.showFormDialog=!0},openStapleFormsDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogData={mainFormID:e},this.setCustomDialogTitle("

Editing Stapled Forms

"),this.setFormDialogComponent("staple-form-dialog"),this.dialogButtonText={confirm:"Add",cancel:"Close"},this.showFormDialog=!0},openEditCollaboratorsDialog:function(){this.setCustomDialogTitle("

Customize Write Access

"),this.setFormDialogComponent("edit-collaborators-dialog"),this.dialogButtonText={confirm:"Add",cancel:"Close"},this.showFormDialog=!0},openIfThenDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Untitled",n=this.truncateText(this.decodeAndStripHTML(t),35);this.dialogData={indicatorID:e},this.dialogButtonText={confirm:"Save",cancel:"Close"},this.setCustomDialogTitle('

Conditions For '.concat(n," (").concat(e,")

")),this.setFormDialogComponent("conditions-editor-dialog"),this.showFormDialog=!0},openIndicatorEditingDialog:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e=null===t&&null===n?"

Adding new Section

":null===t?"

Adding question to ".concat(n,"

"):"

Editing indicatorID ".concat(t,"

"),this.dialogData={indicatorID:t,parentID:n,indicator:o},this.setCustomDialogTitle(e),this.setFormDialogComponent("indicator-editing-dialog"),this.showFormDialog=!0},openAdvancedOptionsDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.dialogData={indicatorID:e.indicatorID,html:(null==e?void 0:e.html)||"",htmlPrint:(null==e?void 0:e.htmlPrint)||""},this.setCustomDialogTitle("

Advanced Options for indicator ".concat(e.indicatorID,"

")),this.setFormDialogComponent("advanced-options-dialog"),this.showFormDialog=!0},openNewFormDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogData={parentID:e};var t=""===e?"

New Form

":"

New Internal Use Form

";this.setCustomDialogTitle(t),this.setFormDialogComponent("new-form-dialog"),this.showFormDialog=!0},openImportFormDialog:function(){this.setCustomDialogTitle("

Import Form

"),this.setFormDialogComponent("import-form-dialog"),this.dialogButtonText={confirm:"Import",cancel:"Close"},this.showFormDialog=!0},openFormHistoryDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogData={historyType:"form",historyID:e},this.setCustomDialogTitle("

Form History

"),this.setFormDialogComponent("history-dialog"),this.showFormDialog=!0}}},c="undefined"!=typeof document;function a(e){return"object"==typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}const u=Object.assign;function d(e,t){const n={};for(const o in t){const r=t[o];n[o]=h(r)?r.map(e):e(r)}return n}const p=()=>{},h=Array.isArray,f=/#/g,m=/&/g,g=/\//g,v=/=/g,y=/\?/g,b=/\+/g,S=/%5B/g,_=/%5D/g,x=/%5E/g,C=/%60/g,w=/%7B/g,E=/%7C/g,T=/%7D/g,k=/%20/g;function A(e){return encodeURI(""+e).replace(E,"|").replace(S,"[").replace(_,"]")}function I(e){return A(e).replace(b,"%2B").replace(k,"+").replace(f,"%23").replace(m,"%26").replace(C,"`").replace(w,"{").replace(T,"}").replace(x,"^")}function N(e){return null==e?"":function(e){return A(e).replace(f,"%23").replace(y,"%3F")}(e).replace(g,"%2F")}function R(e){try{return decodeURIComponent(""+e)}catch(e){}return""+e}const D=/\/$/;function O(e,t,n="/"){let o,r={},s="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(o=t.slice(0,c),s=t.slice(c+1,l>-1?l:t.length),r=e(s)),l>-1&&(o=o||t.slice(0,l),i=t.slice(l,t.length)),o=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];".."!==r&&"."!==r||o.push("");let s,i,l=n.length-1;for(s=0;s1&&l--}return n.slice(0,l).join("/")+"/"+o.slice(s).join("/")}(null!=o?o:t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:R(i)}}function F(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function P(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function L(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!M(e[n],t[n]))return!1;return!0}function M(e,t){return h(e)?B(e,t):h(t)?B(t,e):e===t}function B(e,t){return h(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}const V={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var j,U;!function(e){e.pop="pop",e.push="push"}(j||(j={})),function(e){e.back="back",e.forward="forward",e.unknown=""}(U||(U={}));const H=/^[^#]+#/;function q(e,t){return e.replace(H,"#")+t}const W=()=>({left:window.scrollX,top:window.scrollY});function K(e,t){return(history.state?history.state.position-t:-1)+e}const z=new Map;let G=()=>location.protocol+"//"+location.host;function J(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let t=r.includes(e.slice(s))?e.slice(s).length:1,n=r.slice(t);return"/"!==n[0]&&(n="/"+n),F(n,"")}return F(n,e)+o+r}function Q(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?W():null}}function X(e){return"string"==typeof e||"symbol"==typeof e}const Y=Symbol("");var Z;function ee(e,t){return u(new Error,{type:e,[Y]:!0},t)}function te(e,t){return e instanceof Error&&Y in e&&(null==t||!!(e.type&t))}!function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"}(Z||(Z={}));const ne="[^/]+?",oe={sensitive:!1,strict:!1,start:!0,end:!0},re=/[.+*?^${}()[\]/\\]/g;function se(e,t){let n=0;for(;nt.length?1===t.length&&80===t[0]?1:-1:0}function ie(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const ce={type:0,value:""},ae=/[a-zA-Z0-9_]/;function ue(e,t,n){const o=function(e,t){const n=u({},oe,t),o=[];let r=n.start?"^":"";const s=[];for(const t of e){const e=t.length?[]:[90];n.strict&&!t.length&&(r+="/");for(let o=0;o1&&("*"===l||"+"===l)&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:a,regexp:u,repeatable:"*"===l||"+"===l,optional:"*"===l||"?"===l})):t("Invalid state to consume buffer"),a="")}function p(){a+=l}for(;cu(e,t.meta)),{})}function ge(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function ve({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ye(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let e=0;ee&&I(e))):[o&&I(o)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))})):void 0!==o&&(t+=(t.length?"&":"")+n)}return t}function Se(e){const t={};for(const n in e){const o=e[n];void 0!==o&&(t[n]=h(o)?o.map((e=>null==e?null:""+e)):null==o?o:""+o)}return t}const _e=Symbol(""),xe=Symbol(""),Ce=Symbol(""),we=Symbol(""),Ee=Symbol("");function Te(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function ke(e,t,n,o,r,s=e=>e()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise(((l,c)=>{const a=e=>{var s;!1===e?c(ee(4,{from:n,to:t})):e instanceof Error?c(e):"string"==typeof(s=e)||s&&"object"==typeof s?c(ee(2,{from:t,to:e})):(i&&o.enterCallbacks[r]===i&&"function"==typeof e&&i.push(e),l())},u=s((()=>e.call(o&&o.instances[r],t,n,a)));let d=Promise.resolve(u);e.length<3&&(d=d.then(a)),d.catch((e=>c(e)))}))}function Ae(e,t,n,o,r=e=>e()){const s=[];for(const i of e)for(const e in i.components){let l=i.components[e];if("beforeRouteEnter"===t||i.instances[e])if(a(l)){const c=(l.__vccOpts||l)[t];c&&s.push(ke(c,n,o,i,e,r))}else{let c=l();s.push((()=>c.then((s=>{if(!s)throw new Error(`Couldn't resolve component "${e}" at "${i.path}"`);const l=(c=s).__esModule||"Module"===c[Symbol.toStringTag]||c.default&&a(c.default)?s.default:s;var c;i.mods[e]=s,i.components[e]=l;const u=(l.__vccOpts||l)[t];return u&&ke(u,n,o,i,e,r)()}))))}}return s}function Ie(e){const t=(0,s.WQ)(Ce),n=(0,s.WQ)(we),o=(0,s.EW)((()=>{const n=(0,s.R1)(e.to);return t.resolve(n)})),r=(0,s.EW)((()=>{const{matched:e}=o.value,{length:t}=e,r=e[t-1],s=n.matched;if(!r||!s.length)return-1;const i=s.findIndex(P.bind(null,r));if(i>-1)return i;const l=Re(e[t-2]);return t>1&&Re(r)===l&&s[s.length-1].path!==l?s.findIndex(P.bind(null,e[t-2])):i})),i=(0,s.EW)((()=>r.value>-1&&function(e,t){for(const n in t){const o=t[n],r=e[n];if("string"==typeof o){if(o!==r)return!1}else if(!h(r)||r.length!==o.length||o.some(((e,t)=>e!==r[t])))return!1}return!0}(n.params,o.value.params))),l=(0,s.EW)((()=>r.value>-1&&r.value===n.matched.length-1&&L(n.params,o.value.params)));return{route:o,href:(0,s.EW)((()=>o.value.href)),isActive:i,isExactActive:l,navigate:function(n={}){return function(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}(n)?t[(0,s.R1)(e.replace)?"replace":"push"]((0,s.R1)(e.to)).catch(p):Promise.resolve()}}}const Ne=(0,s.pM)({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ie,setup(e,{slots:t}){const n=(0,s.Kh)(Ie(e)),{options:o}=(0,s.WQ)(Ce),r=(0,s.EW)((()=>({[De(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[De(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const o=t.default&&t.default(n);return e.custom?o:(0,s.h)("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}});function Re(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const De=(e,t,n)=>null!=e?e:null!=t?t:n;function Oe(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const Fe=(0,s.pM)({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=(0,s.WQ)(Ee),r=(0,s.EW)((()=>e.route||o.value)),i=(0,s.WQ)(xe,0),l=(0,s.EW)((()=>{let e=(0,s.R1)(i);const{matched:t}=r.value;let n;for(;(n=t[e])&&!n.components;)e++;return e})),c=(0,s.EW)((()=>r.value.matched[l.value]));(0,s.Gt)(xe,(0,s.EW)((()=>l.value+1))),(0,s.Gt)(_e,c),(0,s.Gt)(Ee,r);const a=(0,s.KR)();return(0,s.wB)((()=>[a.value,c.value,e.name]),(([e,t,n],[o,r,s])=>{t&&(t.instances[n]=e,r&&r!==t&&e&&e===o&&(t.leaveGuards.size||(t.leaveGuards=r.leaveGuards),t.updateGuards.size||(t.updateGuards=r.updateGuards))),!e||!t||r&&P(t,r)&&o||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=r.value,i=e.name,l=c.value,d=l&&l.components[i];if(!d)return Oe(n.default,{Component:d,route:o});const p=l.props[i],h=p?!0===p?o.params:"function"==typeof p?p(o):p:null,f=(0,s.h)(d,u({},h,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(l.instances[i]=null)},ref:a}));return Oe(n.default,{Component:f,route:o})||f}}});var Pe,Le=[{path:"/",name:"browser",component:function(){return r.e(776).then(r.bind(r,223))}},{path:"/forms",name:"category",component:function(){return r.e(245).then(r.bind(r,211))}},{path:"/restore",name:"restore",component:function(){return r.e(951).then(r.bind(r,315))}}],Me=function(e){const t=function(e,t){const n=[],o=new Map;function r(e,n,o){const l=!o,c=pe(e);c.aliasOf=o&&o.record;const a=ge(t,e),d=[c];if("alias"in e){const t="string"==typeof e.alias?[e.alias]:e.alias;for(const e of t)d.push(pe(u({},c,{components:o?o.record.components:c.components,path:e,aliasOf:o?o.record:c})))}let h,f;for(const t of d){const{path:u}=t;if(n&&"/"!==u[0]){const e=n.record.path,o="/"===e[e.length-1]?"":"/";t.path=n.record.path+(u&&o+u)}if(h=ue(t,n,a),o?o.alias.push(h):(f=f||h,f!==h&&f.alias.push(h),l&&e.name&&!fe(h)&&s(e.name)),ve(h)&&i(h),c.children){const e=c.children;for(let t=0;t{s(f)}:p}function s(e){if(X(e)){const t=o.get(e);t&&(o.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(s),t.alias.forEach(s))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&o.delete(e.record.name),e.children.forEach(s),e.alias.forEach(s))}}function i(e){const t=function(e,t){let n=0,o=t.length;for(;n!==o;){const r=n+o>>1;ie(e,t[r])<0?o=r:n=r+1}const r=function(e){let t=e;for(;t=t.parent;)if(ve(t)&&0===ie(e,t))return t}(e);return r&&(o=t.lastIndexOf(r,o-1)),o}(e,n);n.splice(t,0,e),e.record.name&&!fe(e)&&o.set(e.record.name,e)}return t=ge({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>r(e))),{addRoute:r,resolve:function(e,t){let r,s,i,l={};if("name"in e&&e.name){if(r=o.get(e.name),!r)throw ee(1,{location:e});i=r.record.name,l=u(de(t.params,r.keys.filter((e=>!e.optional)).concat(r.parent?r.parent.keys.filter((e=>e.optional)):[]).map((e=>e.name))),e.params&&de(e.params,r.keys.map((e=>e.name)))),s=r.stringify(l)}else if(null!=e.path)s=e.path,r=n.find((e=>e.re.test(s))),r&&(l=r.parse(s),i=r.record.name);else{if(r=t.name?o.get(t.name):n.find((e=>e.re.test(t.path))),!r)throw ee(1,{location:e,currentLocation:t});i=r.record.name,l=u({},t.params,e.params),s=r.stringify(l)}const c=[];let a=r;for(;a;)c.unshift(a.record),a=a.parent;return{name:i,path:s,params:l,matched:c,meta:me(c)}},removeRoute:s,clearRoutes:function(){n.length=0,o.clear()},getRoutes:function(){return n},getRecordMatcher:function(e){return o.get(e)}}}(e.routes,e),n=e.parseQuery||ye,o=e.stringifyQuery||be,r=e.history,i=Te(),l=Te(),a=Te(),f=(0,s.IJ)(V);let m=V;c&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const g=d.bind(null,(e=>""+e)),v=d.bind(null,N),y=d.bind(null,R);function b(e,s){if(s=u({},s||f.value),"string"==typeof e){const o=O(n,e,s.path),i=t.resolve({path:o.path},s),l=r.createHref(o.fullPath);return u(o,i,{params:y(i.params),hash:R(o.hash),redirectedFrom:void 0,href:l})}let i;if(null!=e.path)i=u({},e,{path:O(n,e.path,s.path).path});else{const t=u({},e.params);for(const e in t)null==t[e]&&delete t[e];i=u({},e,{params:v(t)}),s.params=v(s.params)}const l=t.resolve(i,s),c=e.hash||"";l.params=g(y(l.params));const a=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,u({},e,{hash:(d=c,A(d).replace(w,"{").replace(T,"}").replace(x,"^")),path:l.path}));var d;const p=r.createHref(a);return u({fullPath:a,hash:c,query:o===be?Se(e.query):e.query||{}},l,{redirectedFrom:void 0,href:p})}function S(e){return"string"==typeof e?O(n,e,f.value.path):u({},e)}function _(e,t){if(m!==e)return ee(8,{from:t,to:e})}function C(e){return k(e)}function E(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let o="function"==typeof n?n(e):n;return"string"==typeof o&&(o=o.includes("?")||o.includes("#")?o=S(o):{path:o},o.params={}),u({query:e.query,hash:e.hash,params:null!=o.path?{}:e.params},o)}}function k(e,t){const n=m=b(e),r=f.value,s=e.state,i=e.force,l=!0===e.replace,c=E(n);if(c)return k(u(S(c),{state:"object"==typeof c?u({},s,c.state):s,force:i,replace:l}),t||n);const a=n;let d;return a.redirectedFrom=t,!i&&function(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&P(t.matched[o],n.matched[r])&&L(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,r,n)&&(d=ee(16,{to:a,from:r}),Q(r,r,!0,!1)),(d?Promise.resolve(d):F(a,r)).catch((e=>te(e)?te(e,2)?e:J(e):G(e,a,r))).then((e=>{if(e){if(te(e,2))return k(u({replace:l},S(e.to),{state:"object"==typeof e.to?u({},s,e.to.state):s,force:i}),t||a)}else e=$(a,r,!0,l,s);return M(a,r,e),e}))}function I(e,t){const n=_(e,t);return n?Promise.reject(n):Promise.resolve()}function D(e){const t=ne.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function F(e,t){let n;const[o,r,s]=function(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;iP(e,s)))?o.push(s):n.push(s));const l=e.matched[i];l&&(t.matched.find((e=>P(e,l)))||r.push(l))}return[n,o,r]}(e,t);n=Ae(o.reverse(),"beforeRouteLeave",e,t);for(const r of o)r.leaveGuards.forEach((o=>{n.push(ke(o,e,t))}));const c=I.bind(null,e,t);return n.push(c),re(n).then((()=>{n=[];for(const o of i.list())n.push(ke(o,e,t));return n.push(c),re(n)})).then((()=>{n=Ae(r,"beforeRouteUpdate",e,t);for(const o of r)o.updateGuards.forEach((o=>{n.push(ke(o,e,t))}));return n.push(c),re(n)})).then((()=>{n=[];for(const o of s)if(o.beforeEnter)if(h(o.beforeEnter))for(const r of o.beforeEnter)n.push(ke(r,e,t));else n.push(ke(o.beforeEnter,e,t));return n.push(c),re(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=Ae(s,"beforeRouteEnter",e,t,D),n.push(c),re(n)))).then((()=>{n=[];for(const o of l.list())n.push(ke(o,e,t));return n.push(c),re(n)})).catch((e=>te(e,8)?e:Promise.reject(e)))}function M(e,t,n){a.list().forEach((o=>D((()=>o(e,t,n)))))}function $(e,t,n,o,s){const i=_(e,t);if(i)return i;const l=t===V,a=c?history.state:{};n&&(o||l?r.replace(e.fullPath,u({scroll:l&&a&&a.scroll},s)):r.push(e.fullPath,s)),f.value=e,Q(e,t,n,l),J()}let B;let U,H=Te(),q=Te();function G(e,t,n){J(e);const o=q.list();return o.length?o.forEach((o=>o(e,t,n))):console.error(e),Promise.reject(e)}function J(e){return U||(U=!e,B||(B=r.listen(((e,t,n)=>{if(!oe.listening)return;const o=b(e),s=E(o);if(s)return void k(u(s,{replace:!0}),o).catch(p);m=o;const i=f.value;var l,a;c&&(l=K(i.fullPath,n.delta),a=W(),z.set(l,a)),F(o,i).catch((e=>te(e,12)?e:te(e,2)?(k(e.to,o).then((e=>{te(e,20)&&!n.delta&&n.type===j.pop&&r.go(-1,!1)})).catch(p),Promise.reject()):(n.delta&&r.go(-n.delta,!1),G(e,o,i)))).then((e=>{(e=e||$(o,i,!1))&&(n.delta&&!te(e,8)?r.go(-n.delta,!1):n.type===j.pop&&te(e,20)&&r.go(-1,!1)),M(o,i,e)})).catch(p)}))),H.list().forEach((([t,n])=>e?n(e):t())),H.reset()),e}function Q(t,n,o,r){const{scrollBehavior:i}=e;if(!c||!i)return Promise.resolve();const l=!o&&function(e){const t=z.get(e);return z.delete(e),t}(K(t.fullPath,0))||(r||!o)&&history.state&&history.state.scroll||null;return(0,s.dY)().then((()=>i(t,n,l))).then((e=>e&&function(e){let t;if("el"in e){const n=e.el,o="string"==typeof n&&n.startsWith("#"),r="string"==typeof n?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=function(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}(e))).catch((e=>G(e,t,n)))}const Y=e=>r.go(e);let Z;const ne=new Set,oe={currentRoute:f,listening:!0,addRoute:function(e,n){let o,r;return X(e)?(o=t.getRecordMatcher(e),r=n):r=e,t.addRoute(r,o)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},clearRoutes:t.clearRoutes,hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:b,options:e,push:C,replace:function(e){return C(u(S(e),{replace:!0}))},go:Y,back:()=>Y(-1),forward:()=>Y(1),beforeEach:i.add,beforeResolve:l.add,afterEach:a.add,onError:q.add,isReady:function(){return U&&f.value!==V?Promise.resolve():new Promise(((e,t)=>{H.add([e,t])}))},install(e){e.component("RouterLink",Ne),e.component("RouterView",Fe),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>(0,s.R1)(f)}),c&&!Z&&f.value===V&&(Z=!0,C(r.location).catch((e=>{})));const t={};for(const e in V)Object.defineProperty(t,e,{get:()=>f.value[e],enumerable:!0});e.provide(Ce,this),e.provide(we,(0,s.Gc)(t)),e.provide(Ee,f);const n=e.unmount;ne.add(e),e.unmount=function(){ne.delete(e),ne.size<1&&(m=V,B&&B(),B=null,f.value=V,Z=!1,U=!1),n()}}};function re(e){return e.reduce(((e,t)=>e.then((()=>D(t)))),Promise.resolve())}return oe}({history:((Pe=location.host?Pe||location.pathname+location.search:"").includes("#")||(Pe+="#"),function(e){const t=function(e){const{history:t,location:n}=window,o={value:J(e,n)},r={value:t.state};function s(o,s,i){const l=e.indexOf("#"),c=l>-1?(n.host&&document.querySelector("base")?e:e.slice(l))+o:G()+e+o;try{t[i?"replaceState":"pushState"](s,"",c),r.value=s}catch(e){console.error(e),n[i?"replace":"assign"](c)}}return r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:o,state:r,push:function(e,n){const i=u({},r.value,t.state,{forward:e,scroll:W()});s(i.current,i,!0),s(e,u({},Q(o.value,e,null),{position:i.position+1},n),!1),o.value=e},replace:function(e,n){s(e,u({},t.state,Q(r.value.back,e,r.value.forward,!0),n,{position:r.value.position}),!0),o.value=e}}}(e=function(e){if(!e)if(c){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(D,"")}(e)),n=function(e,t,n,o){let r=[],s=[],i=null;const l=({state:s})=>{const l=J(e,location),c=n.value,a=t.value;let u=0;if(s){if(n.value=l,t.value=s,i&&i===c)return void(i=null);u=a?s.position-a.position:0}else o(l);r.forEach((e=>{e(n.value,c,{delta:u,type:j.pop,direction:u?u>0?U.forward:U.back:U.unknown})}))};function c(){const{history:e}=window;e.state&&e.replaceState(u({},e.state,{scroll:W()}),"")}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:function(){i=n.value},listen:function(e){r.push(e);const t=()=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)};return s.push(t),t},destroy:function(){for(const e of s)e();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}}}(e,t.state,t.location,t.replace),o=u({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:q.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}(Pe)),routes:Le});Me.beforeEach((function(e){if("/bodyarea"===e.path)return!1}));const $e=Me;var Be=(0,s.Ef)(l);Be.use($e),Be.mount("#vue-formeditor-app")})(); \ No newline at end of file +(()=>{"use strict";var e,t,n={425:(e,t,n)=>{n.d(t,{EW:()=>Zi,Ef:()=>Qc,pM:()=>mo,h:()=>el,WQ:()=>Zr,dY:()=>wn,Gt:()=>Yr,Kh:()=>Et,KR:()=>Bt,Gc:()=>Tt,IJ:()=>Vt,R1:()=>qt,wB:()=>Ds});var o={};function r(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}n.r(o),n.d(o,{BaseTransition:()=>lo,BaseTransitionPropsValidators:()=>ro,Comment:()=>ni,DeprecationTypes:()=>pl,EffectScope:()=>he,ErrorCodes:()=>hn,ErrorTypeStrings:()=>il,Fragment:()=>ei,KeepAlive:()=>$o,ReactiveEffect:()=>ye,Static:()=>oi,Suspense:()=>Gs,Teleport:()=>Xn,Text:()=>ti,TrackOpTypes:()=>nn,Transition:()=>wl,TransitionGroup:()=>bc,TriggerOpTypes:()=>on,VueElement:()=>dc,assertNumber:()=>pn,callWithAsyncErrorHandling:()=>mn,callWithErrorHandling:()=>fn,camelize:()=>O,capitalize:()=>L,cloneVNode:()=>xi,compatUtils:()=>dl,computed:()=>Zi,createApp:()=>Qc,createBlock:()=>hi,createCommentVNode:()=>Ei,createElementBlock:()=>pi,createElementVNode:()=>bi,createHydrationRenderer:()=>bs,createPropsRestProxy:()=>Pr,createRenderer:()=>ys,createSSRApp:()=>Xc,createSlots:()=>hr,createStaticVNode:()=>wi,createTextVNode:()=>Ci,createVNode:()=>Si,customRef:()=>Jt,defineAsyncComponent:()=>Po,defineComponent:()=>mo,defineCustomElement:()=>cc,defineEmits:()=>Cr,defineExpose:()=>wr,defineModel:()=>kr,defineOptions:()=>Er,defineProps:()=>xr,defineSSRCustomElement:()=>ac,defineSlots:()=>Tr,devtools:()=>ll,effect:()=>Re,effectScope:()=>fe,getCurrentInstance:()=>Pi,getCurrentScope:()=>me,getCurrentWatcher:()=>cn,getTransitionRawChildren:()=>fo,guardReactiveProps:()=>_i,h:()=>el,handleError:()=>gn,hasInjectionContext:()=>es,hydrate:()=>Jc,hydrateOnIdle:()=>No,hydrateOnInteraction:()=>Oo,hydrateOnMediaQuery:()=>Do,hydrateOnVisible:()=>Ro,initCustomFormatter:()=>tl,initDirectivesForSSR:()=>ta,inject:()=>Zr,isMemoSame:()=>ol,isProxy:()=>Ot,isReactive:()=>Nt,isReadonly:()=>Rt,isRef:()=>$t,isRuntimeOnly:()=>zi,isShallow:()=>Dt,isVNode:()=>fi,markRaw:()=>Pt,mergeDefaults:()=>Or,mergeModels:()=>Fr,mergeProps:()=>Ii,nextTick:()=>wn,normalizeClass:()=>X,normalizeProps:()=>Y,normalizeStyle:()=>K,onActivated:()=>Vo,onBeforeMount:()=>Go,onBeforeUnmount:()=>Yo,onBeforeUpdate:()=>Qo,onDeactivated:()=>jo,onErrorCaptured:()=>or,onMounted:()=>Jo,onRenderTracked:()=>nr,onRenderTriggered:()=>tr,onScopeDispose:()=>ge,onServerPrefetch:()=>er,onUnmounted:()=>Zo,onUpdated:()=>Xo,onWatcherCleanup:()=>an,openBlock:()=>ii,popScopeId:()=>Bn,provide:()=>Yr,proxyRefs:()=>zt,pushScopeId:()=>$n,queuePostFlushCb:()=>kn,reactive:()=>Et,readonly:()=>kt,ref:()=>Bt,registerRuntimeCompiler:()=>Ki,render:()=>Gc,renderList:()=>pr,renderSlot:()=>fr,resolveComponent:()=>ir,resolveDirective:()=>ar,resolveDynamicComponent:()=>cr,resolveFilter:()=>ul,resolveTransitionHooks:()=>ao,setBlockTracking:()=>ui,setDevtoolsHook:()=>cl,setTransitionHooks:()=>ho,shallowReactive:()=>Tt,shallowReadonly:()=>At,shallowRef:()=>Vt,ssrContextKey:()=>ks,ssrUtils:()=>al,stop:()=>De,toDisplayString:()=>ce,toHandlerKey:()=>M,toHandlers:()=>gr,toRaw:()=>Ft,toRef:()=>Zt,toRefs:()=>Qt,toValue:()=>Wt,transformVNodeArgs:()=>gi,triggerRef:()=>Ht,unref:()=>qt,useAttrs:()=>Nr,useCssModule:()=>fc,useCssVars:()=>Hl,useHost:()=>pc,useId:()=>go,useModel:()=>Ls,useSSRContext:()=>As,useShadowRoot:()=>hc,useSlots:()=>Ir,useTemplateRef:()=>yo,useTransitionState:()=>no,vModelCheckbox:()=>Ac,vModelDynamic:()=>Pc,vModelRadio:()=>Nc,vModelSelect:()=>Rc,vModelText:()=>kc,vShow:()=>Vl,version:()=>rl,warn:()=>sl,watch:()=>Ds,watchEffect:()=>Is,watchPostEffect:()=>Ns,watchSyncEffect:()=>Rs,withAsyncContext:()=>Lr,withCtx:()=>jn,withDefaults:()=>Ar,withDirectives:()=>Un,withKeys:()=>Uc,withMemo:()=>nl,withModifiers:()=>Vc,withScopeId:()=>Vn});const s={},i=[],l=()=>{},c=()=>!1,a=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),u=e=>e.startsWith("onUpdate:"),d=Object.assign,p=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},h=Object.prototype.hasOwnProperty,f=(e,t)=>h.call(e,t),m=Array.isArray,g=e=>"[object Map]"===E(e),v=e=>"[object Set]"===E(e),y=e=>"[object Date]"===E(e),b=e=>"function"==typeof e,S=e=>"string"==typeof e,_=e=>"symbol"==typeof e,x=e=>null!==e&&"object"==typeof e,C=e=>(x(e)||b(e))&&b(e.then)&&b(e.catch),w=Object.prototype.toString,E=e=>w.call(e),T=e=>E(e).slice(8,-1),k=e=>"[object Object]"===E(e),A=e=>S(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,I=r(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),N=r("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),R=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},D=/-(\w)/g,O=R((e=>e.replace(D,((e,t)=>t?t.toUpperCase():"")))),F=/\B([A-Z])/g,P=R((e=>e.replace(F,"-$1").toLowerCase())),L=R((e=>e.charAt(0).toUpperCase()+e.slice(1))),M=R((e=>e?`on${L(e)}`:"")),$=(e,t)=>!Object.is(e,t),B=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},j=e=>{const t=parseFloat(e);return isNaN(t)?e:t},U=e=>{const t=S(e)?Number(e):NaN;return isNaN(t)?e:t};let H;const q=()=>H||(H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:{}),W=r("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function K(e){if(m(e)){const t={};for(let n=0;n{if(e){const n=e.split(G);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function X(e){let t="";if(S(e))t=e;else if(m(e))for(let n=0;nse(e,t)))}const le=e=>!(!e||!0!==e.__v_isRef),ce=e=>S(e)?e:null==e?"":m(e)||x(e)&&(e.toString===w||!b(e.toString))?le(e)?ce(e.value):JSON.stringify(e,ae,2):String(e),ae=(e,t)=>le(t)?ae(e,t.value):g(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[ue(t,o)+" =>"]=n,e)),{})}:v(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ue(e)))}:_(t)?ue(t):!x(t)||m(t)||k(t)?t:String(t),ue=(e,t="")=>{var n;return _(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let de,pe;class he{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=de,!e&&de&&(this.index=(de.scopes||(de.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0)return;if(Se){let e=Se;for(Se=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;be;){let t=be;for(be=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function Ee(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Te(e){let t,n=e.depsTail,o=n;for(;o;){const e=o.prevDep;-1===o.version?(o===n&&(n=e),Ie(o),Ne(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=e}e.deps=t,e.depsTail=n}function ke(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ae(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ae(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===$e)return;e.globalVersion=$e;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ke(e))return void(e.flags&=-3);const n=pe,o=Oe;pe=e,Oe=!0;try{Ee(e);const n=e.fn(e._value);(0===t.version||$(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{pe=n,Oe=o,Te(e),e.flags&=-3}}function Ie(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ie(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function Ne(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function Re(e,t){e.effect instanceof ye&&(e=e.effect.fn);const n=new ye(e);t&&d(n,t);try{n.run()}catch(e){throw n.stop(),e}const o=n.run.bind(n);return o.effect=n,o}function De(e){e.effect.stop()}let Oe=!0;const Fe=[];function Pe(){Fe.push(Oe),Oe=!1}function Le(){const e=Fe.pop();Oe=void 0===e||e}function Me(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=pe;pe=void 0;try{t()}finally{pe=e}}}let $e=0;class Be{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Ve{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!pe||!Oe||pe===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==pe)t=this.activeLink=new Be(pe,this),pe.deps?(t.prevDep=pe.depsTail,pe.depsTail.nextDep=t,pe.depsTail=t):pe.deps=pe.depsTail=t,je(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=pe.depsTail,t.nextDep=void 0,pe.depsTail.nextDep=t,pe.depsTail=t,pe.deps===t&&(pe.deps=e)}return t}trigger(e){this.version++,$e++,this.notify(e)}notify(e){Ce();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{we()}}}function je(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)je(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ue=new WeakMap,He=Symbol(""),qe=Symbol(""),We=Symbol("");function Ke(e,t,n){if(Oe&&pe){let t=Ue.get(e);t||Ue.set(e,t=new Map);let o=t.get(n);o||(t.set(n,o=new Ve),o.map=t,o.key=n),o.track()}}function ze(e,t,n,o,r,s){const i=Ue.get(e);if(!i)return void $e++;const l=e=>{e&&e.trigger()};if(Ce(),"clear"===t)i.forEach(l);else{const r=m(e),s=r&&A(n);if(r&&"length"===n){const e=Number(o);i.forEach(((t,n)=>{("length"===n||n===We||!_(n)&&n>=e)&&l(t)}))}else switch((void 0!==n||i.has(void 0))&&l(i.get(n)),s&&l(i.get(We)),t){case"add":r?s&&l(i.get("length")):(l(i.get(He)),g(e)&&l(i.get(qe)));break;case"delete":r||(l(i.get(He)),g(e)&&l(i.get(qe)));break;case"set":g(e)&&l(i.get(He))}}we()}function Ge(e){const t=Ft(e);return t===e?t:(Ke(t,0,We),Dt(e)?t:t.map(Lt))}function Je(e){return Ke(e=Ft(e),0,We),e}const Qe={__proto__:null,[Symbol.iterator](){return Xe(this,Symbol.iterator,Lt)},concat(...e){return Ge(this).concat(...e.map((e=>m(e)?Ge(e):e)))},entries(){return Xe(this,"entries",(e=>(e[1]=Lt(e[1]),e)))},every(e,t){return Ze(this,"every",e,t,void 0,arguments)},filter(e,t){return Ze(this,"filter",e,t,(e=>e.map(Lt)),arguments)},find(e,t){return Ze(this,"find",e,t,Lt,arguments)},findIndex(e,t){return Ze(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ze(this,"findLast",e,t,Lt,arguments)},findLastIndex(e,t){return Ze(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ze(this,"forEach",e,t,void 0,arguments)},includes(...e){return tt(this,"includes",e)},indexOf(...e){return tt(this,"indexOf",e)},join(e){return Ge(this).join(e)},lastIndexOf(...e){return tt(this,"lastIndexOf",e)},map(e,t){return Ze(this,"map",e,t,void 0,arguments)},pop(){return nt(this,"pop")},push(...e){return nt(this,"push",e)},reduce(e,...t){return et(this,"reduce",e,t)},reduceRight(e,...t){return et(this,"reduceRight",e,t)},shift(){return nt(this,"shift")},some(e,t){return Ze(this,"some",e,t,void 0,arguments)},splice(...e){return nt(this,"splice",e)},toReversed(){return Ge(this).toReversed()},toSorted(e){return Ge(this).toSorted(e)},toSpliced(...e){return Ge(this).toSpliced(...e)},unshift(...e){return nt(this,"unshift",e)},values(){return Xe(this,"values",Lt)}};function Xe(e,t,n){const o=Je(e),r=o[t]();return o===e||Dt(e)||(r._next=r.next,r.next=()=>{const e=r._next();return e.value&&(e.value=n(e.value)),e}),r}const Ye=Array.prototype;function Ze(e,t,n,o,r,s){const i=Je(e),l=i!==e&&!Dt(e),c=i[t];if(c!==Ye[t]){const t=c.apply(e,s);return l?Lt(t):t}let a=n;i!==e&&(l?a=function(t,o){return n.call(this,Lt(t),o,e)}:n.length>2&&(a=function(t,o){return n.call(this,t,o,e)}));const u=c.call(i,a,o);return l&&r?r(u):u}function et(e,t,n,o){const r=Je(e);let s=n;return r!==e&&(Dt(e)?n.length>3&&(s=function(t,o,r){return n.call(this,t,o,r,e)}):s=function(t,o,r){return n.call(this,t,Lt(o),r,e)}),r[t](s,...o)}function tt(e,t,n){const o=Ft(e);Ke(o,0,We);const r=o[t](...n);return-1!==r&&!1!==r||!Ot(n[0])?r:(n[0]=Ft(n[0]),o[t](...n))}function nt(e,t,n=[]){Pe(),Ce();const o=Ft(e)[t].apply(e,n);return we(),Le(),o}const ot=r("__proto__,__v_isRef,__isVue"),rt=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(_));function st(e){_(e)||(e=String(e));const t=Ft(this);return Ke(t,0,e),t.hasOwnProperty(e)}class it{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?wt:Ct:r?xt:_t).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=m(e);if(!o){let e;if(s&&(e=Qe[t]))return e;if("hasOwnProperty"===t)return st}const i=Reflect.get(e,t,$t(e)?e:n);return(_(t)?rt.has(t):ot(t))?i:(o||Ke(e,0,t),r?i:$t(i)?s&&A(t)?i:i.value:x(i)?o?kt(i):Et(i):i)}}class lt extends it{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._isShallow){const t=Rt(r);if(Dt(n)||Rt(n)||(r=Ft(r),n=Ft(n)),!m(e)&&$t(r)&&!$t(n))return!t&&(r.value=n,!0)}const s=m(e)&&A(t)?Number(t)e,ft=e=>Reflect.getPrototypeOf(e);function mt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function gt(e,t){const n=function(e,t){const n={get(n){const o=this.__v_raw,r=Ft(o),s=Ft(n);e||($(n,s)&&Ke(r,0,n),Ke(r,0,s));const{has:i}=ft(r),l=t?ht:e?Mt:Lt;return i.call(r,n)?l(o.get(n)):i.call(r,s)?l(o.get(s)):void(o!==r&&o.get(n))},get size(){const t=this.__v_raw;return!e&&Ke(Ft(t),0,He),Reflect.get(t,"size",t)},has(t){const n=this.__v_raw,o=Ft(n),r=Ft(t);return e||($(t,r)&&Ke(o,0,t),Ke(o,0,r)),t===r?n.has(t):n.has(t)||n.has(r)},forEach(n,o){const r=this,s=r.__v_raw,i=Ft(s),l=t?ht:e?Mt:Lt;return!e&&Ke(i,0,He),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}};return d(n,e?{add:mt("add"),set:mt("set"),delete:mt("delete"),clear:mt("clear")}:{add(e){t||Dt(e)||Rt(e)||(e=Ft(e));const n=Ft(this);return ft(n).has.call(n,e)||(n.add(e),ze(n,"add",e,e)),this},set(e,n){t||Dt(n)||Rt(n)||(n=Ft(n));const o=Ft(this),{has:r,get:s}=ft(o);let i=r.call(o,e);i||(e=Ft(e),i=r.call(o,e));const l=s.call(o,e);return o.set(e,n),i?$(n,l)&&ze(o,"set",e,n):ze(o,"add",e,n),this},delete(e){const t=Ft(this),{has:n,get:o}=ft(t);let r=n.call(t,e);r||(e=Ft(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&ze(t,"delete",e,void 0),s},clear(){const e=Ft(this),t=0!==e.size,n=e.clear();return t&&ze(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach((o=>{n[o]=function(e,t,n){return function(...o){const r=this.__v_raw,s=Ft(r),i=g(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?ht:t?Mt:Lt;return!t&&Ke(s,0,c?qe:He),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}(o,e,t)})),n}(e,t);return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(f(n,o)&&o in t?n:t,o,r)}const vt={get:gt(!1,!1)},yt={get:gt(!1,!0)},bt={get:gt(!0,!1)},St={get:gt(!0,!0)},_t=new WeakMap,xt=new WeakMap,Ct=new WeakMap,wt=new WeakMap;function Et(e){return Rt(e)?e:It(e,!1,at,vt,_t)}function Tt(e){return It(e,!1,dt,yt,xt)}function kt(e){return It(e,!0,ut,bt,Ct)}function At(e){return It(e,!0,pt,St,wt)}function It(e,t,n,o,r){if(!x(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(T(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?o:n);return r.set(e,c),c}function Nt(e){return Rt(e)?Nt(e.__v_raw):!(!e||!e.__v_isReactive)}function Rt(e){return!(!e||!e.__v_isReadonly)}function Dt(e){return!(!e||!e.__v_isShallow)}function Ot(e){return!!e&&!!e.__v_raw}function Ft(e){const t=e&&e.__v_raw;return t?Ft(t):e}function Pt(e){return!f(e,"__v_skip")&&Object.isExtensible(e)&&V(e,"__v_skip",!0),e}const Lt=e=>x(e)?Et(e):e,Mt=e=>x(e)?kt(e):e;function $t(e){return!!e&&!0===e.__v_isRef}function Bt(e){return jt(e,!1)}function Vt(e){return jt(e,!0)}function jt(e,t){return $t(e)?e:new Ut(e,t)}class Ut{constructor(e,t){this.dep=new Ve,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Ft(e),this._value=t?e:Lt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||Dt(e)||Rt(e);e=n?e:Ft(e),$(e,t)&&(this._rawValue=e,this._value=n?e:Lt(e),this.dep.trigger())}}function Ht(e){e.dep&&e.dep.trigger()}function qt(e){return $t(e)?e.value:e}function Wt(e){return b(e)?e():qt(e)}const Kt={get:(e,t,n)=>"__v_raw"===t?e:qt(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return $t(r)&&!$t(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function zt(e){return Nt(e)?e:new Proxy(e,Kt)}class Gt{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Ve,{get:n,set:o}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=o}get value(){return this._value=this._get()}set value(e){this._set(e)}}function Jt(e){return new Gt(e)}function Qt(e){const t=m(e)?new Array(e.length):{};for(const n in e)t[n]=en(e,n);return t}class Xt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){const n=Ue.get(e);return n&&n.get(t)}(Ft(this._object),this._key)}}class Yt{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Zt(e,t,n){return $t(e)?e:b(e)?new Yt(e):x(e)&&arguments.length>1?en(e,t,n):Bt(e)}function en(e,t,n){const o=e[t];return $t(o)?o:new Xt(e,t,n)}class tn{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Ve(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=$e-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags||pe===this))return xe(this,!0),!0}get value(){const e=this.dep.track();return Ae(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const nn={GET:"get",HAS:"has",ITERATE:"iterate"},on={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},rn={},sn=new WeakMap;let ln;function cn(){return ln}function an(e,t=!1,n=ln){if(n){let t=sn.get(n);t||sn.set(n,t=[]),t.push(e)}}function un(e,t=1/0,n){if(t<=0||!x(e)||e.__v_skip)return e;if((n=n||new Set).has(e))return e;if(n.add(e),t--,$t(e))un(e.value,t,n);else if(m(e))for(let o=0;o{un(e,t,n)}));else if(k(e)){for(const o in e)un(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&un(e[o],t,n)}return e}const dn=[];function pn(e,t){}const hn={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function fn(e,t,n,o){try{return o?e(...o):e()}catch(e){gn(e,t,n)}}function mn(e,t,n,o){if(b(e)){const r=fn(e,t,n,o);return r&&C(r)&&r.catch((e=>{gn(e,t,n)})),r}if(m(e)){const r=[];for(let s=0;s=Nn(n)?vn.push(e):vn.splice(function(e){let t=yn+1,n=vn.length;for(;t>>1,r=vn[o],s=Nn(r);sNn(e)-Nn(t)));if(bn.length=0,Sn)return void Sn.push(...e);for(Sn=e,_n=0;_nnull==e.id?2&e.flags?-1:1/0:e.id;function Rn(e){try{for(yn=0;ynjn;function jn(e,t=Pn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&ui(-1);const r=Mn(t);let s;try{s=e(...n)}finally{Mn(r),o._d&&ui(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Un(e,t){if(null===Pn)return e;const n=Xi(Pn),o=e.dirs||(e.dirs=[]);for(let e=0;ee.__isTeleport,Kn=e=>e&&(e.disabled||""===e.disabled),zn=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Gn=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,Jn=(e,t)=>{const n=e&&e.to;return S(n)?t?t(n):null:n};function Qn(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,d=2===s;if(d&&o(i,t,n),(!d||Kn(u))&&16&c)for(let e=0;e{16&y&&(r&&r.isCE&&(r.ce._teleportTarget=e),u(b,e,t,r,s,i,l,c))},p=()=>{const e=t.target=Jn(t.props,f),n=Zn(e,t,m,h);e&&("svg"!==i&&zn(e)?i="svg":"mathml"!==i&&Gn(e)&&(i="mathml"),v||(d(e,n),Yn(t,!1)))};v&&(d(n,a),Yn(t,!0)),(_=t.props)&&(_.defer||""===_.defer)?vs(p,s):p()}else{t.el=e.el,t.targetStart=e.targetStart;const o=t.anchor=e.anchor,u=t.target=e.target,h=t.targetAnchor=e.targetAnchor,m=Kn(e.props),g=m?n:u,y=m?o:h;if("svg"===i||zn(u)?i="svg":("mathml"===i||Gn(u))&&(i="mathml"),S?(p(e.dynamicChildren,S,g,r,s,i,l),ws(e,t,!0)):c||d(e,t,g,y,r,s,i,l,!1),v)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Qn(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=Jn(t.props,f);e&&Qn(t,e,null,a,0)}else m&&Qn(t,u,h,a,1);Yn(t,v)}var _},remove(e,t,n,{um:o,o:{remove:r}},s){const{shapeFlag:i,children:l,anchor:c,targetStart:a,targetAnchor:u,target:d,props:p}=e;if(d&&(r(a),r(u)),s&&r(c),16&i){const e=s||!Kn(p);for(let r=0;r{e.isMounted=!0})),Yo((()=>{e.isUnmounting=!0})),e}const oo=[Function,Array],ro={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:oo,onEnter:oo,onAfterEnter:oo,onEnterCancelled:oo,onBeforeLeave:oo,onLeave:oo,onAfterLeave:oo,onLeaveCancelled:oo,onBeforeAppear:oo,onAppear:oo,onAfterAppear:oo,onAppearCancelled:oo},so=e=>{const t=e.subTree;return t.component?so(t.component):t};function io(e){let t=e[0];if(e.length>1){let n=!1;for(const o of e)if(o.type!==ni){t=o,n=!0;break}}return t}const lo={name:"BaseTransition",props:ro,setup(e,{slots:t}){const n=Pi(),o=no();return()=>{const r=t.default&&fo(t.default(),!0);if(!r||!r.length)return;const s=io(r),i=Ft(e),{mode:l}=i;if(o.isLeaving)return uo(s);const c=po(s);if(!c)return uo(s);let a=ao(c,i,o,n,(e=>a=e));c.type!==ni&&ho(c,a);const u=n.subTree,d=u&&po(u);if(d&&d.type!==ni&&!mi(c,d)&&so(n).type!==ni){const e=ao(d,i,o,n);if(ho(d,e),"out-in"===l&&c.type!==ni)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave},uo(s);"in-out"===l&&c.type!==ni&&(e.delayLeave=(e,t,n)=>{co(o,d)[String(d.key)]=d,e[eo]=()=>{t(),e[eo]=void 0,delete a.delayedLeave},a.delayedLeave=n})}return s}}};function co(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function ao(e,t,n,o,r){const{appear:s,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:a,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:f,onLeaveCancelled:g,onBeforeAppear:v,onAppear:y,onAfterAppear:b,onAppearCancelled:S}=t,_=String(e.key),x=co(n,e),C=(e,t)=>{e&&mn(e,o,9,t)},w=(e,t)=>{const n=t[1];C(e,t),m(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},E={mode:i,persisted:l,beforeEnter(t){let o=c;if(!n.isMounted){if(!s)return;o=v||c}t[eo]&&t[eo](!0);const r=x[_];r&&mi(e,r)&&r.el[eo]&&r.el[eo](),C(o,[t])},enter(e){let t=a,o=u,r=d;if(!n.isMounted){if(!s)return;t=y||a,o=b||u,r=S||d}let i=!1;const l=e[to]=t=>{i||(i=!0,C(t?r:o,[e]),E.delayedLeave&&E.delayedLeave(),e[to]=void 0)};t?w(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t[to]&&t[to](!0),n.isUnmounting)return o();C(p,[t]);let s=!1;const i=t[eo]=n=>{s||(s=!0,o(),C(n?g:f,[t]),t[eo]=void 0,x[r]===e&&delete x[r])};x[r]=e,h?w(h,[t,i]):i()},clone(e){const s=ao(e,t,n,o,r);return r&&r(s),s}};return E}function uo(e){if(Mo(e))return(e=xi(e)).children=null,e}function po(e){if(!Mo(e))return Wn(e.type)&&e.children?io(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&b(n.default))return n.default()}}function ho(e,t){6&e.shapeFlag&&e.component?(e.transition=t,ho(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function fo(e,t=!1,n){let o=[],r=0;for(let s=0;s1)for(let e=0;ed({name:e.name},t,{setup:e}))():e}function go(){const e=Pi();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function vo(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function yo(e){const t=Pi(),n=Vt(null);if(t){const o=t.refs===s?t.refs={}:t.refs;Object.defineProperty(o,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e})}return n}function bo(e,t,n,o,r=!1){if(m(e))return void e.forEach(((e,s)=>bo(e,t&&(m(t)?t[s]:t),n,o,r)));if(Fo(o)&&!r)return;const i=4&o.shapeFlag?Xi(o.component):o.el,l=r?null:i,{i:c,r:a}=e,u=t&&t.r,d=c.refs===s?c.refs={}:c.refs,h=c.setupState,g=Ft(h),v=h===s?()=>!1:e=>f(g,e);if(null!=u&&u!==a&&(S(u)?(d[u]=null,v(u)&&(h[u]=null)):$t(u)&&(u.value=null)),b(a))fn(a,c,12,[l,d]);else{const t=S(a),o=$t(a);if(t||o){const s=()=>{if(e.f){const n=t?v(a)?h[a]:d[a]:a.value;r?m(n)&&p(n,i):m(n)?n.includes(i)||n.push(i):t?(d[a]=[i],v(a)&&(h[a]=d[a])):(a.value=[i],e.k&&(d[e.k]=a.value))}else t?(d[a]=l,v(a)&&(h[a]=l)):o&&(a.value=l,e.k&&(d[e.k]=l))};l?(s.id=-1,vs(s,n)):s()}}}let So=!1;const _o=()=>{So||(console.error("Hydration completed but contains mismatches."),So=!0)},xo=e=>{if(1===e.nodeType)return(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0},Co=e=>8===e.nodeType;function wo(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:l,insert:c,createComment:u}}=e,d=(n,o,l,a,u,b=!1)=>{b=b||!!o.dynamicChildren;const S=Co(n)&&"["===n.data,_=()=>m(n,o,l,a,u,S),{type:x,ref:C,shapeFlag:w,patchFlag:E}=o;let T=n.nodeType;o.el=n,-2===E&&(b=!1,o.dynamicChildren=null);let k=null;switch(x){case ti:3!==T?""===o.children?(c(o.el=r(""),i(n),n),k=n):k=_():(n.data!==o.children&&(_o(),n.data=o.children),k=s(n));break;case ni:y(n)?(k=s(n),v(o.el=n.content.firstChild,n,l)):k=8!==T||S?_():s(n);break;case oi:if(S&&(T=(n=s(n)).nodeType),1===T||3===T){k=n;const e=!o.children.length;for(let t=0;t{i=i||!!t.dynamicChildren;const{type:c,props:u,patchFlag:d,shapeFlag:p,dirs:f,transition:m}=t,g="input"===c||"option"===c;if(g||-1!==d){f&&Hn(t,null,n,"created");let c,b=!1;if(y(e)){b=Cs(null,m)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;b&&m.beforeEnter(o),v(o,e,n),t.el=e=o}if(16&p&&(!u||!u.innerHTML&&!u.textContent)){let o=h(e.firstChild,t,e,n,r,s,i);for(;o;){ko(e,1)||_o();const t=o;o=o.nextSibling,l(t)}}else if(8&p){let n=t.children;"\n"!==n[0]||"PRE"!==e.tagName&&"TEXTAREA"!==e.tagName||(n=n.slice(1)),e.textContent!==n&&(ko(e,0)||_o(),e.textContent=t.children)}if(u)if(g||!i||48&d){const t=e.tagName.includes("-");for(const r in u)(g&&(r.endsWith("value")||"indeterminate"===r)||a(r)&&!I(r)||"."===r[0]||t)&&o(e,r,null,u[r],void 0,n)}else if(u.onClick)o(e,"onClick",null,u.onClick,void 0,n);else if(4&d&&Nt(u.style))for(const e in u.style)u.style[e];(c=u&&u.onVnodeBeforeMount)&&Ni(c,n,t),f&&Hn(t,null,n,"beforeMount"),((c=u&&u.onVnodeMounted)||f||b)&&Ys((()=>{c&&Ni(c,n,t),b&&m.enter(e),f&&Hn(t,null,n,"mounted")}),r)}return e.nextSibling},h=(e,t,o,i,l,a,u)=>{u=u||!!t.dynamicChildren;const p=t.children,h=p.length;for(let t=0;t{const{slotScopeIds:a}=t;a&&(r=r?r.concat(a):a);const d=i(e),p=h(s(e),t,d,n,o,r,l);return p&&Co(p)&&"]"===p.data?s(t.anchor=p):(_o(),c(t.anchor=u("]"),d,p),p)},m=(e,t,o,r,c,a)=>{if(ko(e.parentElement,1)||_o(),t.el=null,a){const t=g(e);for(;;){const n=s(e);if(!n||n===t)break;l(n)}}const u=s(e),d=i(e);return l(e),n(null,t,d,u,o,r,xo(d),c),u},g=(e,t="[",n="]")=>{let o=0;for(;e;)if((e=s(e))&&Co(e)&&(e.data===t&&o++,e.data===n)){if(0===o)return s(e);o--}return e},v=(e,t,n)=>{const o=t.parentNode;o&&o.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},y=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),In(),void(t._vnode=e);d(t.firstChild,e,null,null,null),In(),t._vnode=e},d]}const Eo="data-allow-mismatch",To={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function ko(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(Eo);)e=e.parentElement;const n=e&&e.getAttribute(Eo);if(null==n)return!1;if(""===n)return!0;{const e=n.split(",");return!(0!==t||!e.includes("children"))||n.split(",").includes(To[t])}}const Ao=q().requestIdleCallback||(e=>setTimeout(e,1)),Io=q().cancelIdleCallback||(e=>clearTimeout(e)),No=(e=1e4)=>t=>{const n=Ao(t,{timeout:e});return()=>Io(n)},Ro=e=>(t,n)=>{const o=new IntersectionObserver((e=>{for(const n of e)if(n.isIntersecting){o.disconnect(),t();break}}),e);return n((e=>{if(e instanceof Element)return function(e){const{top:t,left:n,bottom:o,right:r}=e.getBoundingClientRect(),{innerHeight:s,innerWidth:i}=window;return(t>0&&t0&&o0&&n0&&ro.disconnect()},Do=e=>t=>{if(e){const n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},Oo=(e=[])=>(t,n)=>{S(e)&&(e=[e]);let o=!1;const r=e=>{o||(o=!0,s(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},s=()=>{n((t=>{for(const n of e)t.removeEventListener(n,r)}))};return n((t=>{for(const n of e)t.addEventListener(n,r,{once:!0})})),s},Fo=e=>!!e.type.__asyncLoader;function Po(e){b(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,hydrate:s,timeout:i,suspensible:l=!0,onError:c}=e;let a,u=null,d=0;const p=()=>{let e;return u||(e=u=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),c)return new Promise(((t,n)=>{c(e,(()=>t((d++,u=null,p()))),(()=>n(e)),d+1)}));throw e})).then((t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),a=t,t))))};return mo({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(e,t,n){const o=s?()=>{const o=s(n,(t=>function(e,t){if(Co(e)&&"["===e.data){let n=1,o=e.nextSibling;for(;o;){if(1===o.nodeType){if(!1===t(o))break}else if(Co(o))if("]"===o.data){if(0==--n)break}else"["===o.data&&n++;o=o.nextSibling}}else t(e)}(e,t)));o&&(t.bum||(t.bum=[])).push(o)}:n;a?o():p().then((()=>!t.isUnmounted&&o()))},get __asyncResolved(){return a},setup(){const e=Fi;if(vo(e),a)return()=>Lo(a,e);const t=t=>{u=null,gn(t,e,13,!o)};if(l&&e.suspense||Hi)return p().then((t=>()=>Lo(t,e))).catch((e=>(t(e),()=>o?Si(o,{error:e}):null)));const s=Bt(!1),c=Bt(),d=Bt(!!r);return r&&setTimeout((()=>{d.value=!1}),r),null!=i&&setTimeout((()=>{if(!s.value&&!c.value){const e=new Error(`Async component timed out after ${i}ms.`);t(e),c.value=e}}),i),p().then((()=>{s.value=!0,e.parent&&Mo(e.parent.vnode)&&e.parent.update()})).catch((e=>{t(e),c.value=e})),()=>s.value&&a?Lo(a,e):c.value&&o?Si(o,{error:c.value}):n&&!d.value?Si(n):void 0}})}function Lo(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=Si(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const Mo=e=>e.type.__isKeepAlive,$o={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Pi(),o=n.ctx;if(!o.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:d}}}=o,p=d("div");function h(e){qo(e),u(e,n,l,!0)}function f(e){r.forEach(((t,n)=>{const o=Yi(t.type);o&&!e(o)&&m(n)}))}function m(e){const t=r.get(e);!t||i&&mi(t,i)?i&&qo(i):h(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),vs((()=>{s.isDeactivated=!1,s.a&&B(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Ni(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;Ts(t.m),Ts(t.a),a(e,p,null,1,l),vs((()=>{t.da&&B(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Ni(n,t.parent,e),t.isDeactivated=!0}),l)},Ds((()=>[e.include,e.exclude]),(([e,t])=>{e&&f((t=>Bo(e,t))),t&&f((e=>!Bo(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&(Ks(n.subTree.type)?vs((()=>{r.set(g,Wo(n.subTree))}),n.subTree.suspense):r.set(g,Wo(n.subTree)))};return Jo(v),Xo(v),Yo((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=Wo(t);if(e.type!==r.type||e.key!==r.key)h(e);else{qo(r);const e=r.component.da;e&&vs(e,o)}}))})),()=>{if(g=null,!t.default)return i=null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!fi(o)||!(4&o.shapeFlag||128&o.shapeFlag))return i=null,o;let l=Wo(o);if(l.type===ni)return i=null,l;const c=l.type,a=Yi(Fo(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:d,max:p}=e;if(u&&(!a||!Bo(u,a))||d&&a&&Bo(d,a))return l.shapeFlag&=-257,i=l,o;const h=null==l.key?c:l.key,f=r.get(h);return l.el&&(l=xi(l),128&o.shapeFlag&&(o.ssContent=l)),g=h,f?(l.el=f.el,l.component=f.component,l.transition&&ho(l,l.transition),l.shapeFlag|=512,s.delete(h),s.add(h)):(s.add(h),p&&s.size>parseInt(p,10)&&m(s.values().next().value)),l.shapeFlag|=256,i=l,Ks(o.type)?o:l}}};function Bo(e,t){return m(e)?e.some((e=>Bo(e,t))):S(e)?e.split(",").includes(t):"[object RegExp]"===E(e)&&(e.lastIndex=0,e.test(t))}function Vo(e,t){Uo(e,"a",t)}function jo(e,t){Uo(e,"da",t)}function Uo(e,t,n=Fi){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Ko(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Mo(e.parent.vnode)&&Ho(o,t,n,e),e=e.parent}}function Ho(e,t,n,o){const r=Ko(t,e,o,!0);Zo((()=>{p(o[t],r)}),n)}function qo(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function Wo(e){return 128&e.shapeFlag?e.ssContent:e}function Ko(e,t,n=Fi,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{Pe();const r=$i(n),s=mn(t,n,e,o);return r(),Le(),s});return o?r.unshift(s):r.push(s),s}}const zo=e=>(t,n=Fi)=>{Hi&&"sp"!==e||Ko(e,((...e)=>t(...e)),n)},Go=zo("bm"),Jo=zo("m"),Qo=zo("bu"),Xo=zo("u"),Yo=zo("bum"),Zo=zo("um"),er=zo("sp"),tr=zo("rtg"),nr=zo("rtc");function or(e,t=Fi){Ko("ec",e,t)}const rr="components",sr="directives";function ir(e,t){return ur(rr,e,!0,t)||e}const lr=Symbol.for("v-ndc");function cr(e){return S(e)?ur(rr,e,!1)||e:e||lr}function ar(e){return ur(sr,e)}function ur(e,t,n=!0,o=!1){const r=Pn||Fi;if(r){const n=r.type;if(e===rr){const e=Yi(n,!1);if(e&&(e===t||e===O(t)||e===L(O(t))))return n}const s=dr(r[e]||n[e],t)||dr(r.appContext[e],t);return!s&&o?n:s}}function dr(e,t){return e&&(e[t]||e[O(t)]||e[L(O(t))])}function pr(e,t,n,o){let r;const s=n&&n[o],i=m(e);if(i||S(e)){let n=!1;i&&Nt(e)&&(n=!Dt(e),e=Je(e)),r=new Array(e.length);for(let o=0,i=e.length;ot(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e}function fr(e,t,n={},o,r){if(Pn.ce||Pn.parent&&Fo(Pn.parent)&&Pn.parent.ce)return"default"!==t&&(n.name=t),ii(),hi(ei,null,[Si("slot",n,o&&o())],64);let s=e[t];s&&s._c&&(s._d=!1),ii();const i=s&&mr(s(n)),l=n.key||i&&i.key,c=hi(ei,{key:(l&&!_(l)?l:`_${t}`)+(!i&&o?"_fb":"")},i||(o?o():[]),i&&1===e._?64:-2);return!r&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),s&&s._c&&(s._d=!0),c}function mr(e){return e.some((e=>!fi(e)||e.type!==ni&&!(e.type===ei&&!mr(e.children))))?e:null}function gr(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:M(o)]=e[o];return n}const vr=e=>e?Vi(e)?Xi(e):vr(e.parent):null,yr=d(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>vr(e.parent),$root:e=>vr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Vr(e),$forceUpdate:e=>e.f||(e.f=()=>{En(e.update)}),$nextTick:e=>e.n||(e.n=wn.bind(e.proxy)),$watch:e=>Fs.bind(e)}),br=(e,t)=>e!==s&&!e.__isScriptSetup&&f(e,t),Sr={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:o,data:r,props:i,accessCache:l,type:c,appContext:a}=e;let u;if("$"!==t[0]){const c=l[t];if(void 0!==c)switch(c){case 1:return o[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(br(o,t))return l[t]=1,o[t];if(r!==s&&f(r,t))return l[t]=2,r[t];if((u=e.propsOptions[0])&&f(u,t))return l[t]=3,i[t];if(n!==s&&f(n,t))return l[t]=4,n[t];Mr&&(l[t]=0)}}const d=yr[t];let p,h;return d?("$attrs"===t&&Ke(e.attrs,0,""),d(e)):(p=c.__cssModules)&&(p=p[t])?p:n!==s&&f(n,t)?(l[t]=4,n[t]):(h=a.config.globalProperties,f(h,t)?h[t]:void 0)},set({_:e},t,n){const{data:o,setupState:r,ctx:i}=e;return br(r,t)?(r[t]=n,!0):o!==s&&f(o,t)?(o[t]=n,!0):!(f(e.props,t)||"$"===t[0]&&t.slice(1)in e||(i[t]=n,0))},has({_:{data:e,setupState:t,accessCache:n,ctx:o,appContext:r,propsOptions:i}},l){let c;return!!n[l]||e!==s&&f(e,l)||br(t,l)||(c=i[0])&&f(c,l)||f(o,l)||f(yr,l)||f(r.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:f(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},_r=d({},Sr,{get(e,t){if(t!==Symbol.unscopables)return Sr.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!W(t)});function xr(){return null}function Cr(){return null}function wr(e){}function Er(e){}function Tr(){return null}function kr(){}function Ar(e,t){return null}function Ir(){return Rr().slots}function Nr(){return Rr().attrs}function Rr(){const e=Pi();return e.setupContext||(e.setupContext=Qi(e))}function Dr(e){return m(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function Or(e,t){const n=Dr(e);for(const e in t){if(e.startsWith("__skip"))continue;let o=n[e];o?m(o)||b(o)?o=n[e]={type:o,default:t[e]}:o.default=t[e]:null===o&&(o=n[e]={default:t[e]}),o&&t[`__skip_${e}`]&&(o.skipFactory=!0)}return n}function Fr(e,t){return e&&t?m(e)&&m(t)?e.concat(t):d({},Dr(e),Dr(t)):e||t}function Pr(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function Lr(e){const t=Pi();let n=e();return Bi(),C(n)&&(n=n.catch((e=>{throw $i(t),e}))),[n,()=>$i(t)]}let Mr=!0;function $r(e,t,n){mn(m(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Br(e,t,n,o){let r=o.includes(".")?Ps(n,o):()=>n[o];if(S(e)){const n=t[e];b(n)&&Ds(r,n)}else if(b(e))Ds(r,e.bind(n));else if(x(e))if(m(e))e.forEach((e=>Br(e,t,n,o)));else{const o=b(e.handler)?e.handler.bind(n):t[e.handler];b(o)&&Ds(r,o,e)}}function Vr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>jr(c,e,i,!0))),jr(c,t,i)):c=t,x(t)&&s.set(t,c),c}function jr(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&jr(e,s,n,!0),r&&r.forEach((t=>jr(e,t,n,!0)));for(const r in t)if(o&&"expose"===r);else{const o=Ur[r]||n&&n[r];e[r]=o?o(e[r],t[r]):t[r]}return e}const Ur={data:Hr,props:zr,emits:zr,methods:Kr,computed:Kr,beforeCreate:Wr,created:Wr,beforeMount:Wr,mounted:Wr,beforeUpdate:Wr,updated:Wr,beforeDestroy:Wr,beforeUnmount:Wr,destroyed:Wr,unmounted:Wr,activated:Wr,deactivated:Wr,errorCaptured:Wr,serverPrefetch:Wr,components:Kr,directives:Kr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=d(Object.create(null),e);for(const o in t)n[o]=Wr(e[o],t[o]);return n},provide:Hr,inject:function(e,t){return Kr(qr(e),qr(t))}};function Hr(e,t){return t?e?function(){return d(b(e)?e.call(this,this):e,b(t)?t.call(this,this):t)}:t:e}function qr(e){if(m(e)){const t={};for(let n=0;n(s.has(e)||(e&&b(e.install)?(s.add(e),e.install(c,...t)):b(e)&&(s.add(e),e(c,...t))),c),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),c),component:(e,t)=>t?(r.components[e]=t,c):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,c):r.directives[e],mount(s,i,a){if(!l){const u=c._ceVNode||Si(n,o);return u.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),i&&t?t(u,s):e(u,s,a),l=!0,c._container=s,s.__vue_app__=c,Xi(u.component)}},onUnmount(e){i.push(e)},unmount(){l&&(mn(i,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,c),runWithContext(e){const t=Xr;Xr=c;try{return e()}finally{Xr=t}}};return c}}let Xr=null;function Yr(e,t){if(Fi){let n=Fi.provides;const o=Fi.parent&&Fi.parent.provides;o===n&&(n=Fi.provides=Object.create(o)),n[e]=t}}function Zr(e,t,n=!1){const o=Fi||Pn;if(o||Xr){const r=Xr?Xr._context.provides:o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&b(t)?t.call(o&&o.proxy):t}}function es(){return!!(Fi||Pn||Xr)}const ts={},ns=()=>Object.create(ts),os=e=>Object.getPrototypeOf(e)===ts;function rs(e,t,n,o){const[r,i]=e.propsOptions;let l,c=!1;if(t)for(let s in t){if(I(s))continue;const a=t[s];let u;r&&f(r,u=O(s))?i&&i.includes(u)?(l||(l={}))[u]=a:n[u]=a:Vs(e.emitsOptions,s)||s in o&&a===o[s]||(o[s]=a,c=!0)}if(i){const t=Ft(n),o=l||s;for(let s=0;s{u=!0;const[n,o]=ls(e,t,!0);d(c,n),o&&a.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!l&&!u)return x(e)&&o.set(e,i),i;if(m(l))for(let e=0;e"_"===e[0]||"$stable"===e,us=e=>m(e)?e.map(Ti):[Ti(e)],ds=(e,t,n)=>{if(t._n)return t;const o=jn(((...e)=>us(t(...e))),n);return o._c=!1,o},ps=(e,t,n)=>{const o=e._ctx;for(const n in e){if(as(n))continue;const r=e[n];if(b(r))t[n]=ds(0,r,o);else if(null!=r){const e=us(r);t[n]=()=>e}}},hs=(e,t)=>{const n=us(t);e.slots.default=()=>n},fs=(e,t,n)=>{for(const o in t)(n||"_"!==o)&&(e[o]=t[o])},ms=(e,t,n)=>{const o=e.slots=ns();if(32&e.vnode.shapeFlag){const e=t._;e?(fs(o,t,n),n&&V(o,"_",e,!0)):ps(t,o)}else t&&hs(e,t)},gs=(e,t,n)=>{const{vnode:o,slots:r}=e;let i=!0,l=s;if(32&o.shapeFlag){const e=t._;e?n&&1===e?i=!1:fs(r,t,n):(i=!t.$stable,ps(t,r)),l=t}else t&&(hs(e,t),l={default:1});if(i)for(const e in r)as(e)||null!=l[e]||delete r[e]},vs=Ys;function ys(e){return Ss(e)}function bs(e){return Ss(e,wo)}function Ss(e,t){q().__VUE__=!0;const{insert:n,remove:o,patchProp:r,createElement:c,createText:a,createComment:u,setText:d,setElementText:p,parentNode:h,nextSibling:m,setScopeId:g=l,insertStaticContent:v}=e,y=(e,t,n,o=null,r=null,s=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!mi(e,t)&&(o=J(e),H(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:d}=t;switch(a){case ti:b(e,t,n,o);break;case ni:S(e,t,n,o);break;case oi:null==e&&_(t,n,o,i);break;case ei:N(e,t,n,o,r,s,i,l,c);break;default:1&d?x(e,t,n,o,r,s,i,l,c):6&d?R(e,t,n,o,r,s,i,l,c):(64&d||128&d)&&a.process(e,t,n,o,r,s,i,l,c,Y)}null!=u&&r&&bo(u,e&&e.ref,s,t||e,!t)},b=(e,t,o,r)=>{if(null==e)n(t.el=a(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},S=(e,t,o,r)=>{null==e?n(t.el=u(t.children||""),o,r):t.el=e.el},_=(e,t,n,o)=>{[e.el,e.anchor]=v(e.children,t,n,o,e.el,e.anchor)},x=(e,t,n,o,r,s,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?C(t,n,o,r,s,i,l,c):T(e,t,r,s,i,l,c)},C=(e,t,o,s,i,l,a,u)=>{let d,h;const{props:f,shapeFlag:m,transition:g,dirs:v}=e;if(d=e.el=c(e.type,l,f&&f.is,f),8&m?p(d,e.children):16&m&&E(e.children,d,null,s,i,_s(e,l),a,u),v&&Hn(e,null,s,"created"),w(d,e,e.scopeId,a,s),f){for(const e in f)"value"===e||I(e)||r(d,e,null,f[e],l,s);"value"in f&&r(d,"value",null,f.value,l),(h=f.onVnodeBeforeMount)&&Ni(h,s,e)}v&&Hn(e,null,s,"beforeMount");const y=Cs(i,g);y&&g.beforeEnter(d),n(d,t,o),((h=f&&f.onVnodeMounted)||y||v)&&vs((()=>{h&&Ni(h,s,e),y&&g.enter(d),v&&Hn(e,null,s,"mounted")}),i)},w=(e,t,n,o,r)=>{if(n&&g(e,n),o)for(let t=0;t{for(let a=c;a{const a=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:h}=t;u|=16&e.patchFlag;const f=e.props||s,m=t.props||s;let g;if(n&&xs(n,!1),(g=m.onVnodeBeforeUpdate)&&Ni(g,n,t,e),h&&Hn(t,e,n,"beforeUpdate"),n&&xs(n,!0),(f.innerHTML&&null==m.innerHTML||f.textContent&&null==m.textContent)&&p(a,""),d?k(e.dynamicChildren,d,a,n,o,_s(t,i),l):c||$(e,t,a,null,n,o,_s(t,i),l,!1),u>0){if(16&u)A(a,f,m,n,i);else if(2&u&&f.class!==m.class&&r(a,"class",null,m.class,i),4&u&&r(a,"style",f.style,m.style,i),8&u){const e=t.dynamicProps;for(let t=0;t{g&&Ni(g,n,t,e),h&&Hn(t,e,n,"updated")}),o)},k=(e,t,n,o,r,s,i)=>{for(let l=0;l{if(t!==n){if(t!==s)for(const s in t)I(s)||s in n||r(e,s,t[s],null,i,o);for(const s in n){if(I(s))continue;const l=n[s],c=t[s];l!==c&&"value"!==s&&r(e,s,c,l,i,o)}"value"in n&&r(e,"value",t.value,n.value,i)}},N=(e,t,o,r,s,i,l,c,u)=>{const d=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a("");let{patchFlag:h,dynamicChildren:f,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(n(d,o,r),n(p,o,r),E(t.children||[],o,p,s,i,l,c,u)):h>0&&64&h&&f&&e.dynamicChildren?(k(e.dynamicChildren,f,o,s,i,l,c),(null!=t.key||s&&t===s.subTree)&&ws(e,t,!0)):$(e,t,o,p,s,i,l,c,u)},R=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):D(t,n,o,r,s,i,c):F(e,t,c)},D=(e,t,n,o,r,s,i)=>{const l=e.component=Oi(e,o,r);if(Mo(e)&&(l.ctx.renderer=Y),qi(l,!1,i),l.asyncDep){if(r&&r.registerDep(l,L,i),!e.el){const e=l.subTree=Si(ni);S(null,e,t,n)}}else L(l,e,t,n,r,s,i)},F=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||qs(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?qs(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t{const l=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:c,vnode:a}=e;{const n=Es(e);if(n)return t&&(t.el=a.el,M(e,t,i)),void n.asyncDep.then((()=>{e.isUnmounted||l()}))}let u,d=t;xs(e,!1),t?(t.el=a.el,M(e,t,i)):t=a,n&&B(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Ni(u,c,t,a),xs(e,!0);const p=js(e),f=e.subTree;e.subTree=p,y(f,p,h(f.el),J(f),e,r,s),t.el=p.el,null===d&&Ws(e,p.el),o&&vs(o,r),(u=t.props&&t.props.onVnodeUpdated)&&vs((()=>Ni(u,c,t,a)),r)}else{let i;const{el:l,props:c}=t,{bm:a,m:u,parent:d,root:p,type:h}=e,f=Fo(t);if(xs(e,!1),a&&B(a),!f&&(i=c&&c.onVnodeBeforeMount)&&Ni(i,d,t),xs(e,!0),l&&ee){const t=()=>{e.subTree=js(e),ee(l,e.subTree,e,r,null)};f&&h.__asyncHydrate?h.__asyncHydrate(l,e,t):t()}else{p.ce&&p.ce._injectChildStyle(h);const i=e.subTree=js(e);y(null,i,n,o,e,r,s),t.el=i.el}if(u&&vs(u,r),!f&&(i=c&&c.onVnodeMounted)){const e=t;vs((()=>Ni(i,d,e)),r)}(256&t.shapeFlag||d&&Fo(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&vs(e.a,r),e.isMounted=!0,t=n=o=null}};e.scope.on();const c=e.effect=new ye(l);e.scope.off();const a=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>En(u),xs(e,!0),a()},M=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=Ft(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;rs(e,t,r,s)&&(a=!0);for(const s in l)t&&(f(t,s)||(o=P(s))!==s&&f(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=ss(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&f(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o{const a=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:h,shapeFlag:f}=t;if(h>0){if(128&h)return void j(a,d,n,o,r,s,i,l,c);if(256&h)return void V(a,d,n,o,r,s,i,l,c)}8&f?(16&u&&G(a,r,s),d!==a&&p(n,d)):16&u?16&f?j(a,d,n,o,r,s,i,l,c):G(a,r,s,!0):(8&u&&p(n,""),16&f&&E(d,n,o,r,s,i,l,c))},V=(e,t,n,o,r,s,l,c,a)=>{t=t||i;const u=(e=e||i).length,d=t.length,p=Math.min(u,d);let h;for(h=0;hd?G(e,r,s,!0,!1,p):E(t,n,o,r,s,l,c,a,p)},j=(e,t,n,o,r,s,l,c,a)=>{let u=0;const d=t.length;let p=e.length-1,h=d-1;for(;u<=p&&u<=h;){const o=e[u],i=t[u]=a?ki(t[u]):Ti(t[u]);if(!mi(o,i))break;y(o,i,n,null,r,s,l,c,a),u++}for(;u<=p&&u<=h;){const o=e[p],i=t[h]=a?ki(t[h]):Ti(t[h]);if(!mi(o,i))break;y(o,i,n,null,r,s,l,c,a),p--,h--}if(u>p){if(u<=h){const e=h+1,i=eh)for(;u<=p;)H(e[u],r,s,!0),u++;else{const f=u,m=u,g=new Map;for(u=m;u<=h;u++){const e=t[u]=a?ki(t[u]):Ti(t[u]);null!=e.key&&g.set(e.key,u)}let v,b=0;const S=h-m+1;let _=!1,x=0;const C=new Array(S);for(u=0;u=S){H(o,r,s,!0);continue}let i;if(null!=o.key)i=g.get(o.key);else for(v=m;v<=h;v++)if(0===C[v-m]&&mi(o,t[v])){i=v;break}void 0===i?H(o,r,s,!0):(C[i-m]=u+1,i>=x?x=i:_=!0,y(o,t[i],n,null,r,s,l,c,a),b++)}const w=_?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o>1,e[n[l]]0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}(C):i;for(v=w.length-1,u=S-1;u>=0;u--){const e=m+u,i=t[e],p=e+1{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)U(e.component.subTree,t,o,r);else if(128&u)e.suspense.move(t,o,r);else if(64&u)l.move(e,t,o,Y);else if(l!==ei)if(l!==oi)if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(i),n(i,t,o),vs((()=>c.enter(i)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,l=()=>n(i,t,o),a=()=>{e(i,(()=>{l(),s&&s()}))};r?r(i,l,a):a()}else n(i,t,o);else(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=m(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);else{n(i,t,o);for(let e=0;e{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:d,dirs:p,cacheIndex:h}=e;if(-2===d&&(r=!1),null!=l&&bo(l,null,n,e,!0),null!=h&&(t.renderCache[h]=void 0),256&u)return void t.ctx.deactivate(e);const f=1&u&&p,m=!Fo(e);let g;if(m&&(g=i&&i.onVnodeBeforeUnmount)&&Ni(g,t,e),6&u)z(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);f&&Hn(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,Y,o):a&&!a.hasOnce&&(s!==ei||d>0&&64&d)?G(a,t,n,!1,!0):(s===ei&&384&d||!r&&16&u)&&G(c,t,n),o&&W(e)}(m&&(g=i&&i.onVnodeUnmounted)||f)&&vs((()=>{g&&Ni(g,t,e),f&&Hn(e,null,t,"unmounted")}),n)},W=e=>{const{type:t,el:n,anchor:r,transition:s}=e;if(t===ei)return void K(n,r);if(t===oi)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),o(e),e=n;o(t)})(e);const i=()=>{o(n),s&&!s.persisted&&s.afterLeave&&s.afterLeave()};if(1&e.shapeFlag&&s&&!s.persisted){const{leave:t,delayLeave:o}=s,r=()=>t(n,i);o?o(e.el,i,r):r()}else i()},K=(e,t)=>{let n;for(;e!==t;)n=m(e),o(e),e=n;o(t)},z=(e,t,n)=>{const{bum:o,scope:r,job:s,subTree:i,um:l,m:c,a}=e;Ts(c),Ts(a),o&&B(o),r.stop(),s&&(s.flags|=8,H(i,e,t,n)),l&&vs(l,t),vs((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},G=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i{if(6&e.shapeFlag)return J(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=m(e.anchor||e.el),n=t&&t[qn];return n?m(n):t};let Q=!1;const X=(e,t,n)=>{null==e?t._vnode&&H(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,n),t._vnode=e,Q||(Q=!0,An(),In(),Q=!1)},Y={p:y,um:H,m:U,r:W,mt:D,mc:E,pc:$,pbc:k,n:J,o:e};let Z,ee;return t&&([Z,ee]=t(Y)),{render:X,hydrate:Z,createApp:Qr(X,Z)}}function _s({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function xs({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Cs(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function ws(e,t,n=!1){const o=e.children,r=t.children;if(m(o)&&m(r))for(let e=0;eZr(ks);function Is(e,t){return Os(e,null,t)}function Ns(e,t){return Os(e,null,{flush:"post"})}function Rs(e,t){return Os(e,null,{flush:"sync"})}function Ds(e,t,n){return Os(e,t,n)}function Os(e,t,n=s){const{immediate:o,deep:r,flush:i,once:c}=n,a=d({},n),u=t&&o||!t&&"post"!==i;let h;if(Hi)if("sync"===i){const e=As();h=e.__watcherHandles||(e.__watcherHandles=[])}else if(!u){const e=()=>{};return e.stop=l,e.resume=l,e.pause=l,e}const f=Fi;a.call=(e,t,n)=>mn(e,f,t,n);let g=!1;"post"===i?a.scheduler=e=>{vs(e,f&&f.suspense)}:"sync"!==i&&(g=!0,a.scheduler=(e,t)=>{t?e():En(e)}),a.augmentJob=e=>{t&&(e.flags|=4),g&&(e.flags|=2,f&&(e.id=f.uid,e.i=f))};const v=function(e,t,n=s){const{immediate:o,deep:r,once:i,scheduler:c,augmentJob:a,call:u}=n,d=e=>r?e:Dt(e)||!1===r||0===r?un(e,1):un(e);let h,f,g,v,y=!1,S=!1;if($t(e)?(f=()=>e.value,y=Dt(e)):Nt(e)?(f=()=>d(e),y=!0):m(e)?(S=!0,y=e.some((e=>Nt(e)||Dt(e))),f=()=>e.map((e=>$t(e)?e.value:Nt(e)?d(e):b(e)?u?u(e,2):e():void 0))):f=b(e)?t?u?()=>u(e,2):e:()=>{if(g){Pe();try{g()}finally{Le()}}const t=ln;ln=h;try{return u?u(e,3,[v]):e(v)}finally{ln=t}}:l,t&&r){const e=f,t=!0===r?1/0:r;f=()=>un(e(),t)}const _=me(),x=()=>{h.stop(),_&&p(_.effects,h)};if(i&&t){const e=t;t=(...t)=>{e(...t),x()}}let C=S?new Array(e.length).fill(rn):rn;const w=e=>{if(1&h.flags&&(h.dirty||e))if(t){const e=h.run();if(r||y||(S?e.some(((e,t)=>$(e,C[t]))):$(e,C))){g&&g();const n=ln;ln=h;try{const n=[e,C===rn?void 0:S&&C[0]===rn?[]:C,v];u?u(t,3,n):t(...n),C=e}finally{ln=n}}}else h.run()};return a&&a(w),h=new ye(f),h.scheduler=c?()=>c(w,!1):w,v=e=>an(e,!1,h),g=h.onStop=()=>{const e=sn.get(h);if(e){if(u)u(e,4);else for(const t of e)t();sn.delete(h)}},t?o?w(!0):C=h.run():c?c(w.bind(null,!0),!0):h.run(),x.pause=h.pause.bind(h),x.resume=h.resume.bind(h),x.stop=x,x}(e,t,a);return Hi&&(h?h.push(v):u&&v()),v}function Fs(e,t,n){const o=this.proxy,r=S(e)?e.includes(".")?Ps(o,e):()=>o[e]:e.bind(o,o);let s;b(t)?s=t:(s=t.handler,n=t);const i=$i(this),l=Os(r,s.bind(o),n);return i(),l}function Ps(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{let a,u,d=s;return Rs((()=>{const t=e[r];$(a,t)&&(a=t,c())})),{get:()=>(l(),n.get?n.get(a):a),set(e){const l=n.set?n.set(e):e;if(!($(l,a)||d!==s&&$(e,d)))return;const p=o.vnode.props;p&&(t in p||r in p||i in p)&&(`onUpdate:${t}`in p||`onUpdate:${r}`in p||`onUpdate:${i}`in p)||(a=e,c()),o.emit(`update:${t}`,l),$(e,l)&&$(e,d)&&!$(l,u)&&c(),d=e,u=l}}}));return c[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?l||s:c,done:!1}:{done:!0}}},c}const Ms=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${O(t)}Modifiers`]||e[`${P(t)}Modifiers`];function $s(e,t,...n){if(e.isUnmounted)return;const o=e.vnode.props||s;let r=n;const i=t.startsWith("update:"),l=i&&Ms(o,t.slice(7));let c;l&&(l.trim&&(r=n.map((e=>S(e)?e.trim():e))),l.number&&(r=n.map(j)));let a=o[c=M(t)]||o[c=M(O(t))];!a&&i&&(a=o[c=M(P(t))]),a&&mn(a,e,6,r);const u=o[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,mn(u,e,6,r)}}function Bs(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},l=!1;if(!b(e)){const o=e=>{const n=Bs(e,t,!0);n&&(l=!0,d(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(m(s)?s.forEach((e=>i[e]=null)):d(i,s),x(e)&&o.set(e,i),i):(x(e)&&o.set(e,null),null)}function Vs(e,t){return!(!e||!a(t))&&(t=t.slice(2).replace(/Once$/,""),f(e,t[0].toLowerCase()+t.slice(1))||f(e,P(t))||f(e,t))}function js(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[s],slots:i,attrs:l,emit:c,render:a,renderCache:d,props:p,data:h,setupState:f,ctx:m,inheritAttrs:g}=e,v=Mn(e);let y,b;try{if(4&n.shapeFlag){const e=r||o,t=e;y=Ti(a.call(t,e,d,p,f,h,m)),b=l}else{const e=t;y=Ti(e.length>1?e(p,{attrs:l,slots:i,emit:c}):e(p,null)),b=t.props?l:Us(l)}}catch(t){ri.length=0,gn(t,e,1),y=Si(ni)}let S=y;if(b&&!1!==g){const e=Object.keys(b),{shapeFlag:t}=S;e.length&&7&t&&(s&&e.some(u)&&(b=Hs(b,s)),S=xi(S,b,!1,!0))}return n.dirs&&(S=xi(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&ho(S,n.transition),y=S,Mn(v),y}const Us=e=>{let t;for(const n in e)("class"===n||"style"===n||a(n))&&((t||(t={}))[n]=e[n]);return t},Hs=(e,t)=>{const n={};for(const o in e)u(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function qs(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;re.__isSuspense;let zs=0;const Gs={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){if(null==e)!function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,d=u("div"),p=e.suspense=Qs(e,r,o,t,d,n,s,i,l,c);a(null,p.pendingBranch=e.ssContent,d,null,o,p,s,i),p.deps>0?(Js(e,"onPending"),Js(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),Zs(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,o,r,s,i,l,c,a);else{if(s&&s.deps>0&&!e.suspense.isInFallback)return t.suspense=e.suspense,t.suspense.vnode=t,void(t.el=e.el);!function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,h=t.ssFallback,{activeBranch:f,pendingBranch:m,isInFallback:g,isHydrating:v}=d;if(m)d.pendingBranch=p,mi(p,m)?(c(m,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():g&&(v||(c(f,h,n,o,r,null,s,i,l),Zs(d,h)))):(d.pendingId=zs++,v?(d.isHydrating=!1,d.activeBranch=m):a(m,r,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():(c(f,h,n,o,r,null,s,i,l),Zs(d,h))):f&&mi(p,f)?(c(f,p,n,o,r,d,s,i,l),d.resolve(!0)):(c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0&&d.resolve()));else if(f&&mi(p,f))c(f,p,n,o,r,d,s,i,l),Zs(d,p);else if(Js(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=zs++,c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0)d.resolve();else{const{timeout:e,pendingId:t}=d;e>0?setTimeout((()=>{d.pendingId===t&&d.fallback(h)}),e):0===e&&d.fallback(h)}}(e,t,n,o,r,i,l,c,a)}},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=Qs(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);return 0===a.deps&&a.resolve(!1,!0),u},normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=Xs(o?n.default:n),e.ssFallback=o?Xs(n.fallback):Si(ni)}};function Js(e,t){const n=e.props&&e.props[t];b(n)&&n()}function Qs(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:d,m:p,um:h,n:f,o:{parentNode:m,remove:g}}=a;let v;const y=function(e){const t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);y&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const b=e.props?U(e.props.timeout):void 0,S=s,_={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:zs++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:r,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=_;let d=!1;_.isHydrating?_.isHydrating=!1:e||(d=r&&i.transition&&"out-in"===i.transition.mode,d&&(r.transition.afterLeave=()=>{l===_.pendingId&&(p(i,u,s===S?f(r):s,0),kn(c))}),r&&(m(r.el)===u&&(s=f(r)),h(r,a,_,!0)),d||p(i,u,s,0)),Zs(_,i),_.pendingBranch=null,_.isInFallback=!1;let g=_.parent,b=!1;for(;g;){if(g.pendingBranch){g.effects.push(...c),b=!0;break}g=g.parent}b||d||kn(c),_.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),Js(o,"onResolve")},fallback(e){if(!_.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,namespace:s}=_;Js(t,"onFallback");const i=f(n),a=()=>{_.isInFallback&&(d(null,e,r,i,o,null,s,l,c),Zs(_,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),_.isInFallback=!0,h(n,o,null,!0),u||a()},move(e,t,n){_.activeBranch&&p(_.activeBranch,e,t,n),_.container=e},next:()=>_.activeBranch&&f(_.activeBranch),registerDep(e,t,n){const o=!!_.pendingBranch;o&&_.deps++;const r=e.vnode.el;e.asyncDep.catch((t=>{gn(t,e,0)})).then((s=>{if(e.isUnmounted||_.isUnmounted||_.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:l}=e;Wi(e,s,!1),r&&(l.el=r);const c=!r&&e.subTree.el;t(e,l,m(r||e.subTree.el),r?null:f(e.subTree),_,i,n),c&&g(c),Ws(e,l.el),o&&0==--_.deps&&_.resolve()}))},unmount(e,t){_.isUnmounted=!0,_.activeBranch&&h(_.activeBranch,n,e,t),_.pendingBranch&&h(_.pendingBranch,n,e,t)}};return _}function Xs(e){let t;if(b(e)){const n=ai&&e._c;n&&(e._d=!1,ii()),e=e(),n&&(e._d=!0,t=si,li())}if(m(e)){const t=function(e){let t;for(let n=0;nt!==e))),e}function Ys(e,t){t&&t.pendingBranch?m(e)?t.effects.push(...e):t.effects.push(e):kn(e)}function Zs(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,Ws(o,r))}const ei=Symbol.for("v-fgt"),ti=Symbol.for("v-txt"),ni=Symbol.for("v-cmt"),oi=Symbol.for("v-stc"),ri=[];let si=null;function ii(e=!1){ri.push(si=e?null:[])}function li(){ri.pop(),si=ri[ri.length-1]||null}let ci,ai=1;function ui(e){ai+=e,e<0&&si&&(si.hasOnce=!0)}function di(e){return e.dynamicChildren=ai>0?si||i:null,li(),ai>0&&si&&si.push(e),e}function pi(e,t,n,o,r,s){return di(bi(e,t,n,o,r,s,!0))}function hi(e,t,n,o,r){return di(Si(e,t,n,o,r,!0))}function fi(e){return!!e&&!0===e.__v_isVNode}function mi(e,t){return e.type===t.type&&e.key===t.key}function gi(e){ci=e}const vi=({key:e})=>null!=e?e:null,yi=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?S(e)||$t(e)||b(e)?{i:Pn,r:e,k:t,f:!!n}:e:null);function bi(e,t=null,n=null,o=0,r=null,s=(e===ei?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&vi(t),ref:t&&yi(t),scopeId:Ln,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Pn};return l?(Ai(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=S(n)?8:16),ai>0&&!i&&si&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&si.push(c),c}const Si=function(e,t=null,n=null,o=0,r=null,s=!1){if(e&&e!==lr||(e=ni),fi(e)){const o=xi(e,t,!0);return n&&Ai(o,n),ai>0&&!s&&si&&(6&o.shapeFlag?si[si.indexOf(e)]=o:si.push(o)),o.patchFlag=-2,o}if(i=e,b(i)&&"__vccOpts"in i&&(e=e.__vccOpts),t){t=_i(t);let{class:e,style:n}=t;e&&!S(e)&&(t.class=X(e)),x(n)&&(Ot(n)&&!m(n)&&(n=d({},n)),t.style=K(n))}var i;return bi(e,t,n,o,r,S(e)?1:Ks(e)?128:Wn(e)?64:x(e)?4:b(e)?2:0,s,!0)};function _i(e){return e?Ot(e)||os(e)?d({},e):e:null}function xi(e,t,n=!1,o=!1){const{props:r,ref:s,patchFlag:i,children:l,transition:c}=e,a=t?Ii(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&vi(a),ref:t&&t.ref?n&&s?m(s)?s.concat(yi(t)):[s,yi(t)]:yi(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ei?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&xi(e.ssContent),ssFallback:e.ssFallback&&xi(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&o&&ho(u,c.clone(u)),u}function Ci(e=" ",t=0){return Si(ti,null,e,t)}function wi(e,t){const n=Si(oi,null,e);return n.staticCount=t,n}function Ei(e="",t=!1){return t?(ii(),hi(ni,null,e)):Si(ni,null,e)}function Ti(e){return null==e||"boolean"==typeof e?Si(ni):m(e)?Si(ei,null,e.slice()):fi(e)?ki(e):Si(ti,null,String(e))}function ki(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:xi(e)}function Ai(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(m(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Ai(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||os(t)?3===o&&Pn&&(1===Pn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Pn}}else b(t)?(t={default:t,_ctx:Pn},n=32):(t=String(t),64&o?(n=16,t=[Ci(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ii(...e){const t={};for(let n=0;nFi||Pn;let Li,Mi;{const e=q(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach((t=>t(e))):o[0](e)}};Li=t("__VUE_INSTANCE_SETTERS__",(e=>Fi=e)),Mi=t("__VUE_SSR_SETTERS__",(e=>Hi=e))}const $i=e=>{const t=Fi;return Li(e),e.scope.on(),()=>{e.scope.off(),Li(t)}},Bi=()=>{Fi&&Fi.scope.off(),Li(null)};function Vi(e){return 4&e.vnode.shapeFlag}let ji,Ui,Hi=!1;function qi(e,t=!1,n=!1){t&&Mi(t);const{props:o,children:r}=e.vnode,s=Vi(e);!function(e,t,n,o=!1){const r={},s=ns();e.propsDefaults=Object.create(null),rs(e,t,r,s);for(const t in e.propsOptions[0])t in r||(r[t]=void 0);n?e.props=o?r:Tt(r):e.type.props?e.props=r:e.props=s,e.attrs=s}(e,o,s,t),ms(e,r,n);const i=s?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Sr);const{setup:o}=n;if(o){Pe();const n=e.setupContext=o.length>1?Qi(e):null,r=$i(e),s=fn(o,e,0,[e.props,n]),i=C(s);if(Le(),r(),!i&&!e.sp||Fo(e)||vo(e),i){if(s.then(Bi,Bi),t)return s.then((n=>{Wi(e,n,t)})).catch((t=>{gn(t,e,0)}));e.asyncDep=s}else Wi(e,s,t)}else Gi(e,t)}(e,t):void 0;return t&&Mi(!1),i}function Wi(e,t,n){b(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:x(t)&&(e.setupState=zt(t)),Gi(e,n)}function Ki(e){ji=e,Ui=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,_r))}}const zi=()=>!ji;function Gi(e,t,n){const o=e.type;if(!e.render){if(!t&&ji&&!o.render){const t=o.template||Vr(e).template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,l=d(d({isCustomElement:n,delimiters:s},r),i);o.render=ji(t,l)}}e.render=o.render||l,Ui&&Ui(e)}{const t=$i(e);Pe();try{!function(e){const t=Vr(e),n=e.proxy,o=e.ctx;Mr=!1,t.beforeCreate&&$r(t.beforeCreate,e,"bc");const{data:r,computed:s,methods:i,watch:c,provide:a,inject:u,created:d,beforeMount:p,mounted:h,beforeUpdate:f,updated:g,activated:v,deactivated:y,beforeDestroy:S,beforeUnmount:_,destroyed:C,unmounted:w,render:E,renderTracked:T,renderTriggered:k,errorCaptured:A,serverPrefetch:I,expose:N,inheritAttrs:R,components:D,directives:O,filters:F}=t;if(u&&function(e,t){m(e)&&(e=qr(e));for(const n in e){const o=e[n];let r;r=x(o)?"default"in o?Zr(o.from||n,o.default,!0):Zr(o.from||n):Zr(o),$t(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(u,o),i)for(const e in i){const t=i[e];b(t)&&(o[e]=t.bind(n))}if(r){const t=r.call(n,n);x(t)&&(e.data=Et(t))}if(Mr=!0,s)for(const e in s){const t=s[e],r=b(t)?t.bind(n,n):b(t.get)?t.get.bind(n,n):l,i=!b(t)&&b(t.set)?t.set.bind(n):l,c=Zi({get:r,set:i});Object.defineProperty(o,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(c)for(const e in c)Br(c[e],o,n,e);if(a){const e=b(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{Yr(t,e[t])}))}function P(e,t){m(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&$r(d,e,"c"),P(Go,p),P(Jo,h),P(Qo,f),P(Xo,g),P(Vo,v),P(jo,y),P(or,A),P(nr,T),P(tr,k),P(Yo,_),P(Zo,w),P(er,I),m(N))if(N.length){const t=e.exposed||(e.exposed={});N.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});E&&e.render===l&&(e.render=E),null!=R&&(e.inheritAttrs=R),D&&(e.components=D),O&&(e.directives=O),I&&vo(e)}(e)}finally{Le(),t()}}}const Ji={get:(e,t)=>(Ke(e,0,""),e[t])};function Qi(e){return{attrs:new Proxy(e.attrs,Ji),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Xi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(zt(Pt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in yr?yr[n](e):void 0,has:(e,t)=>t in e||t in yr})):e.proxy}function Yi(e,t=!0){return b(e)?e.displayName||e.name:e.name||t&&e.__name}const Zi=(e,t)=>{const n=function(e,t,n=!1){let o,r;return b(e)?o=e:(o=e.get,r=e.set),new tn(o,r,n)}(e,0,Hi);return n};function el(e,t,n){const o=arguments.length;return 2===o?x(t)&&!m(t)?fi(t)?Si(e,null,[t]):Si(e,t):Si(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&fi(n)&&(n=[n]),Si(e,t,n))}function tl(){}function nl(e,t,n,o){const r=n[o];if(r&&ol(r,e))return r;const s=t();return s.memo=e.slice(),s.cacheIndex=o,n[o]=s}function ol(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&si&&si.push(e),!0}const rl="3.5.12",sl=l,il={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"},ll=Dn,cl=function e(t,n){var o,r;Dn=t,Dn?(Dn.enabled=!0,On.forEach((({event:e,args:t})=>Dn.emit(e,...t))),On=[]):"undefined"!=typeof window&&window.HTMLElement&&!(null==(r=null==(o=window.navigator)?void 0:o.userAgent)?void 0:r.includes("jsdom"))?((n.__VUE_DEVTOOLS_HOOK_REPLAY__=n.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((t=>{e(t,n)})),setTimeout((()=>{Dn||(n.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Fn=!0,On=[])}),3e3)):(Fn=!0,On=[])},al={createComponentInstance:Oi,setupComponent:qi,renderComponentRoot:js,setCurrentRenderingInstance:Mn,isVNode:fi,normalizeVNode:Ti,getComponentPublicInstance:Xi,ensureValidVNode:mr,pushWarningContext:function(e){dn.push(e)},popWarningContext:function(){dn.pop()}},ul=null,dl=null,pl=null;let hl;const fl="undefined"!=typeof window&&window.trustedTypes;if(fl)try{hl=fl.createPolicy("vue",{createHTML:e=>e})}catch(e){}const ml=hl?e=>hl.createHTML(e):e=>e,gl="undefined"!=typeof document?document:null,vl=gl&&gl.createElement("template"),yl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r="svg"===t?gl.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?gl.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?gl.createElement(e,{is:n}):gl.createElement(e);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>gl.createTextNode(e),createComment:e=>gl.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>gl.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{vl.innerHTML=ml("svg"===o?`${e}`:"mathml"===o?`${e}`:e);const r=vl.content;if("svg"===o||"mathml"===o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},bl="transition",Sl="animation",_l=Symbol("_vtc"),xl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Cl=d({},ro,xl),wl=(e=>(e.displayName="Transition",e.props=Cl,e))(((e,{slots:t})=>el(lo,kl(e),t))),El=(e,t=[])=>{m(e)?e.forEach((e=>e(...t))):e&&e(...t)},Tl=e=>!!e&&(m(e)?e.some((e=>e.length>1)):e.length>1);function kl(e){const t={};for(const n in e)n in xl||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:a=i,appearToClass:u=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:h=`${n}-leave-active`,leaveToClass:f=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(x(e))return[Al(e.enter),Al(e.leave)];{const t=Al(e);return[t,t]}}(r),g=m&&m[0],v=m&&m[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:S,onLeave:_,onLeaveCancelled:C,onBeforeAppear:w=y,onAppear:E=b,onAppearCancelled:T=S}=t,k=(e,t,n)=>{Nl(e,t?u:l),Nl(e,t?a:i),n&&n()},A=(e,t)=>{e._isLeaving=!1,Nl(e,p),Nl(e,f),Nl(e,h),t&&t()},I=e=>(t,n)=>{const r=e?E:b,i=()=>k(t,e,n);El(r,[t,i]),Rl((()=>{Nl(t,e?c:s),Il(t,e?u:l),Tl(r)||Ol(t,o,g,i)}))};return d(t,{onBeforeEnter(e){El(y,[e]),Il(e,s),Il(e,i)},onBeforeAppear(e){El(w,[e]),Il(e,c),Il(e,a)},onEnter:I(!1),onAppear:I(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>A(e,t);Il(e,p),Il(e,h),Ml(),Rl((()=>{e._isLeaving&&(Nl(e,p),Il(e,f),Tl(_)||Ol(e,o,v,n))})),El(_,[e,n])},onEnterCancelled(e){k(e,!1),El(S,[e])},onAppearCancelled(e){k(e,!0),El(T,[e])},onLeaveCancelled(e){A(e),El(C,[e])}})}function Al(e){return U(e)}function Il(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[_l]||(e[_l]=new Set)).add(t)}function Nl(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[_l];n&&(n.delete(t),n.size||(e[_l]=void 0))}function Rl(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Dl=0;function Ol(e,t,n,o){const r=e._endId=++Dl,s=()=>{r===e._endId&&o()};if(null!=n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=Fl(e,t);if(!i)return o();const a=i+"end";let u=0;const d=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&d()};setTimeout((()=>{u(n[e]||"").split(", "),r=o(`${bl}Delay`),s=o(`${bl}Duration`),i=Pl(r,s),l=o(`${Sl}Delay`),c=o(`${Sl}Duration`),a=Pl(l,c);let u=null,d=0,p=0;return t===bl?i>0&&(u=bl,d=i,p=s.length):t===Sl?a>0&&(u=Sl,d=a,p=c.length):(d=Math.max(i,a),u=d>0?i>a?bl:Sl:null,p=u?u===bl?s.length:c.length:0),{type:u,timeout:d,propCount:p,hasTransform:u===bl&&/\b(transform|all)(,|$)/.test(o(`${bl}Property`).toString())}}function Pl(e,t){for(;e.lengthLl(t)+Ll(e[n]))))}function Ll(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Ml(){return document.body.offsetHeight}const $l=Symbol("_vod"),Bl=Symbol("_vsh"),Vl={beforeMount(e,{value:t},{transition:n}){e[$l]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):jl(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),jl(e,!0),o.enter(e)):o.leave(e,(()=>{jl(e,!1)})):jl(e,t))},beforeUnmount(e,{value:t}){jl(e,t)}};function jl(e,t){e.style.display=t?e[$l]:"none",e[Bl]=!t}const Ul=Symbol("");function Hl(e){const t=Pi();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>Wl(e,n)))},o=()=>{const o=e(t.proxy);t.ce?Wl(t.ce,o):ql(t.subTree,o),n(o)};Go((()=>{Ns(o)})),Jo((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),Zo((()=>e.disconnect()))}))}function ql(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{ql(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)Wl(e.el,t);else if(e.type===ei)e.children.forEach((e=>ql(e,t)));else if(e.type===oi){let{el:n,anchor:o}=e;for(;n&&(Wl(n,t),n!==o);)n=n.nextSibling}}function Wl(e,t){if(1===e.nodeType){const n=e.style;let o="";for(const e in t)n.setProperty(`--${e}`,t[e]),o+=`--${e}: ${t[e]};`;n[Ul]=o}}const Kl=/(^|;)\s*display\s*:/,zl=/\s*!important$/;function Gl(e,t,n){if(m(n))n.forEach((n=>Gl(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Ql[t];if(n)return n;let o=O(t);if("filter"!==o&&o in e)return Ql[t]=o;o=L(o);for(let n=0;noc||(rc.then((()=>oc=0)),oc=Date.now()),ic=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,lc={};function cc(e,t,n){const o=mo(e,t);k(o)&&d(o,t);class r extends dc{constructor(e){super(o,e,n)}}return r.def=o,r}const ac=(e,t)=>cc(e,t,Xc),uc="undefined"!=typeof HTMLElement?HTMLElement:class{};class dc extends uc{constructor(e,t={},n=Qc){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==Qc?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof dc){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then((()=>{this._pendingResolve=void 0,this._resolveDef()})):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,wn((()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)}))}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:n,styles:o}=e;let r;if(n&&!m(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=U(this._props[e])),(r||(r=Object.create(null)))[O(e)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(o),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then((t=>e(this._def=t,!0))):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const t=this._instance&&this._instance.exposed;if(t)for(const e in t)f(this,e)||Object.defineProperty(this,e,{get:()=>qt(t[e])})}_resolveProps(e){const{props:t}=e,n=m(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(const e of n.map(O))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const t=this.hasAttribute(e);let n=t?this.getAttribute(e):lc;const o=O(e);t&&this._numberProps&&this._numberProps[o]&&(n=U(n)),this._setProp(o,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!1){t!==this._props[e]&&(t===lc?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(P(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(P(e),t+""):t||this.removeAttribute(P(e))))}_update(){Gc(this._createVNode(),this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const t=Si(this._def,d(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,k(t[0])?d({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),P(e)!==e&&t(P(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}const n=this._nonce;for(let t=e.length-1;t>=0;t--){const o=document.createElement("style");n&&o.setAttribute("nonce",n),o.textContent=e[t],this.shadowRoot.prepend(o)}}_parseSlots(){const e=this._slots={};let t;for(;t=this.firstChild;){const n=1===t.nodeType&&t.getAttribute("slot")||"default";(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){const e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n(delete e.props.mode,e))({name:"TransitionGroup",props:d({},Cl,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Pi(),o=no();let r,s;return Xo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode(),r=e[_l];r&&r.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))})),n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(o);const{hasTransform:i}=Fl(o);return s.removeChild(o),i}(r[0].el,n.vnode.el,t))return;r.forEach(Sc),r.forEach(_c);const o=r.filter(xc);Ml(),o.forEach((e=>{const n=e.el,o=n.style;Il(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n[vc]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n[vc]=null,Nl(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=Ft(e),l=kl(i);let c=i.tag||ei;if(r=[],s)for(let e=0;e{const t=e.props["onUpdate:modelValue"]||!1;return m(t)?e=>B(t,e):t};function wc(e){e.target.composing=!0}function Ec(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Tc=Symbol("_assign"),kc={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[Tc]=Cc(r);const s=o||r.props&&"number"===r.props.type;ec(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=j(o)),e[Tc](o)})),n&&ec(e,"change",(()=>{e.value=e.value.trim()})),t||(ec(e,"compositionstart",wc),ec(e,"compositionend",Ec),ec(e,"change",Ec))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:s}},i){if(e[Tc]=Cc(i),e.composing)return;const l=null==t?"":t;if((!s&&"number"!==e.type||/^0\d/.test(e.value)?e.value:j(e.value))!==l){if(document.activeElement===e&&"range"!==e.type){if(o&&t===n)return;if(r&&e.value.trim()===l)return}e.value=l}}},Ac={deep:!0,created(e,t,n){e[Tc]=Cc(n),ec(e,"change",(()=>{const t=e._modelValue,n=Oc(e),o=e.checked,r=e[Tc];if(m(t)){const e=ie(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(v(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(Fc(e,o))}))},mounted:Ic,beforeUpdate(e,t,n){e[Tc]=Cc(n),Ic(e,t,n)}};function Ic(e,{value:t,oldValue:n},o){let r;if(e._modelValue=t,m(t))r=ie(t,o.props.value)>-1;else if(v(t))r=t.has(o.props.value);else{if(t===n)return;r=se(t,Fc(e,!0))}e.checked!==r&&(e.checked=r)}const Nc={created(e,{value:t},n){e.checked=se(t,n.props.value),e[Tc]=Cc(n),ec(e,"change",(()=>{e[Tc](Oc(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e[Tc]=Cc(o),t!==n&&(e.checked=se(t,o.props.value))}},Rc={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=v(t);ec(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?j(Oc(e)):Oc(e)));e[Tc](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,wn((()=>{e._assigning=!1}))})),e[Tc]=Cc(o)},mounted(e,{value:t}){Dc(e,t)},beforeUpdate(e,t,n){e[Tc]=Cc(n)},updated(e,{value:t}){e._assigning||Dc(e,t)}};function Dc(e,t){const n=e.multiple,o=m(t);if(!n||o||v(t)){for(let r=0,s=e.options.length;rString(e)===String(i))):ie(t,i)>-1}else s.selected=t.has(i);else if(se(Oc(s),t))return void(e.selectedIndex!==r&&(e.selectedIndex=r))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Oc(e){return"_value"in e?e._value:e.value}function Fc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Pc={created(e,t,n){Mc(e,t,n,null,"created")},mounted(e,t,n){Mc(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Mc(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Mc(e,t,n,o,"updated")}};function Lc(e,t){switch(e){case"SELECT":return Rc;case"TEXTAREA":return kc;default:switch(t){case"checkbox":return Ac;case"radio":return Nc;default:return kc}}}function Mc(e,t,n,o,r){const s=Lc(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const $c=["ctrl","shift","alt","meta"],Bc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>$c.some((n=>e[`${n}Key`]&&!t.includes(n)))},Vc=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=P(n.key);return t.some((e=>e===o||jc[e]===o))?e(n):void 0})},Hc=d({patchProp:(e,t,n,o,r,s)=>{const i="svg"===r;"class"===t?function(e,t,n){const o=e[_l];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,i):"style"===t?function(e,t,n){const o=e.style,r=S(n);let s=!1;if(n&&!r){if(t)if(S(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&Gl(o,t,"")}else for(const e in t)null==n[e]&&Gl(o,e,"");for(const e in n)"display"===e&&(s=!0),Gl(o,e,n[e])}else if(r){if(t!==n){const e=o[Ul];e&&(n+=";"+e),o.cssText=n,s=Kl.test(n)}}else t&&e.removeAttribute("style");$l in e&&(e[$l]=s?o.display:"",e[Bl]&&(o.display="none"))}(e,n,o):a(t)?u(t)||function(e,t,n,o,r=null){const s=e[tc]||(e[tc]={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(nc.test(e)){let n;for(t={};n=e.match(nc);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):P(e.slice(2)),t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();mn(function(e,t){if(m(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=sc(),n}(o,r);ec(e,n,i,l)}else i&&(function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}(e,t,0,o,s):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&ic(t)&&b(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!ic(t)||!S(n))&&t in e}(e,t,o,i))?(Zl(e,t,o),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||Yl(e,t,o,i,0,"value"!==t)):!e._isVueCE||!/[A-Z]/.test(t)&&S(o)?("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),Yl(e,t,o,i)):Zl(e,O(t),o,0,t)}},yl);let qc,Wc=!1;function Kc(){return qc||(qc=ys(Hc))}function zc(){return qc=Wc?qc:bs(Hc),Wc=!0,qc}const Gc=(...e)=>{Kc().render(...e)},Jc=(...e)=>{zc().hydrate(...e)},Qc=(...e)=>{const t=Kc().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=Zc(e);if(!o)return;const r=t._component;b(r)||r.render||r.template||(r.template=o.innerHTML),1===o.nodeType&&(o.textContent="");const s=n(o,!1,Yc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},Xc=(...e)=>{const t=zc().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=Zc(e);if(t)return n(t,!0,Yc(t))},t};function Yc(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function Zc(e){return S(e)?document.querySelector(e):e}let ea=!1;const ta=()=>{ea||(ea=!0,kc.getSSRProps=({value:e})=>({value:e}),Nc.getSSRProps=({value:e},t)=>{if(t.props&&se(t.props.value,e))return{checked:!0}},Ac.getSSRProps=({value:e},t)=>{if(m(e)){if(t.props&&ie(e,t.props.value)>-1)return{checked:!0}}else if(v(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Pc.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=Lc(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},Vl.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})},na=Symbol(""),oa=Symbol(""),ra=Symbol(""),sa=Symbol(""),ia=Symbol(""),la=Symbol(""),ca=Symbol(""),aa=Symbol(""),ua=Symbol(""),da=Symbol(""),pa=Symbol(""),ha=Symbol(""),fa=Symbol(""),ma=Symbol(""),ga=Symbol(""),va=Symbol(""),ya=Symbol(""),ba=Symbol(""),Sa=Symbol(""),_a=Symbol(""),xa=Symbol(""),Ca=Symbol(""),wa=Symbol(""),Ea=Symbol(""),Ta=Symbol(""),ka=Symbol(""),Aa=Symbol(""),Ia=Symbol(""),Na=Symbol(""),Ra=Symbol(""),Da=Symbol(""),Oa=Symbol(""),Fa=Symbol(""),Pa=Symbol(""),La=Symbol(""),Ma=Symbol(""),$a=Symbol(""),Ba=Symbol(""),Va=Symbol(""),ja={[na]:"Fragment",[oa]:"Teleport",[ra]:"Suspense",[sa]:"KeepAlive",[ia]:"BaseTransition",[la]:"openBlock",[ca]:"createBlock",[aa]:"createElementBlock",[ua]:"createVNode",[da]:"createElementVNode",[pa]:"createCommentVNode",[ha]:"createTextVNode",[fa]:"createStaticVNode",[ma]:"resolveComponent",[ga]:"resolveDynamicComponent",[va]:"resolveDirective",[ya]:"resolveFilter",[ba]:"withDirectives",[Sa]:"renderList",[_a]:"renderSlot",[xa]:"createSlots",[Ca]:"toDisplayString",[wa]:"mergeProps",[Ea]:"normalizeClass",[Ta]:"normalizeStyle",[ka]:"normalizeProps",[Aa]:"guardReactiveProps",[Ia]:"toHandlers",[Na]:"camelize",[Ra]:"capitalize",[Da]:"toHandlerKey",[Oa]:"setBlockTracking",[Fa]:"pushScopeId",[Pa]:"popScopeId",[La]:"withCtx",[Ma]:"unref",[$a]:"isRef",[Ba]:"withMemo",[Va]:"isMemoSame"},Ua={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Ha(e,t,n,o,r,s,i,l=!1,c=!1,a=!1,u=Ua){return e&&(l?(e.helper(la),e.helper(Za(e.inSSR,a))):e.helper(Ya(e.inSSR,a)),i&&e.helper(ba)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function qa(e,t=Ua){return{type:17,loc:t,elements:e}}function Wa(e,t=Ua){return{type:15,loc:t,properties:e}}function Ka(e,t){return{type:16,loc:Ua,key:S(e)?za(e,!0):e,value:t}}function za(e,t=!1,n=Ua,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function Ga(e,t=Ua){return{type:8,loc:t,children:e}}function Ja(e,t=[],n=Ua){return{type:14,loc:n,callee:e,arguments:t}}function Qa(e,t=void 0,n=!1,o=!1,r=Ua){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function Xa(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:Ua}}function Ya(e,t){return e||t?ua:da}function Za(e,t){return e||t?ca:aa}function eu(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(Ya(o,e.isComponent)),t(la),t(Za(o,e.isComponent)))}const tu=new Uint8Array([123,123]),nu=new Uint8Array([125,125]);function ou(e){return e>=97&&e<=122||e>=65&&e<=90}function ru(e){return 32===e||10===e||9===e||12===e||13===e}function su(e){return 47===e||62===e||ru(e)}function iu(e){const t=new Uint8Array(e.length);for(let n=0;n4===e.type&&e.isStatic;function mu(e){switch(e){case"Teleport":case"teleport":return oa;case"Suspense":case"suspense":return ra;case"KeepAlive":case"keep-alive":return sa;case"BaseTransition":case"base-transition":return ia}}const gu=/^\d|[^\$\w\xA0-\uFFFF]/,vu=e=>!gu.test(e),yu=/[A-Za-z_$\xA0-\uFFFF]/,bu=/[\.\?\w$\xA0-\uFFFF]/,Su=/\s+[.[]\s*|\s*[.[]\s+/g,_u=e=>4===e.type?e.content:e.loc.source,xu=e=>{const t=_u(e).trim().replace(Su,(e=>e.trim()));let n=0,o=[],r=0,s=0,i=null;for(let e=0;e|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;function wu(e,t,n=!1){for(let o=0;o4===e.key.type&&e.key.content===o))}return n}function Pu(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}const Lu=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Mu={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:c,isPreTag:c,isIgnoreNewlineTag:c,isCustomElement:c,onError:du,onWarn:pu,comments:!1,prefixIdentifiers:!1};let $u=Mu,Bu=null,Vu="",ju=null,Uu=null,Hu="",qu=-1,Wu=-1,Ku=0,zu=!1,Gu=null;const Ju=[],Qu=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=tu,this.delimiterClose=nu,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=tu,this.delimiterClose=nu}getPos(e){let t=1,n=e+1;for(let o=this.newlines.length-1;o>=0;o--){const r=this.newlines[o];if(e>r){t=o+2,n=e-r;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?su(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||ru(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart=e||(28===this.state?this.currentSequence===lu.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(Ju,{onerr:gd,ontext(e,t){td(Zu(e,t),e,t)},ontextentity(e,t,n){td(e,t,n)},oninterpolation(e,t){if(zu)return td(Zu(e,t),e,t);let n=e+Qu.delimiterOpen.length,o=t-Qu.delimiterClose.length;for(;ru(Vu.charCodeAt(n));)n++;for(;ru(Vu.charCodeAt(o-1));)o--;let r=Zu(n,o);r.includes("&")&&(r=$u.decodeEntities(r,!1)),dd({type:5,content:md(r,!1,pd(n,o)),loc:pd(e,t)})},onopentagname(e,t){const n=Zu(e,t);ju={type:1,tag:n,ns:$u.getNamespace(n,Ju[0],$u.ns),tagType:0,props:[],children:[],loc:pd(e-1,t),codegenNode:void 0}},onopentagend(e){ed(e)},onclosetag(e,t){const n=Zu(e,t);if(!$u.isVoidTag(n)){let o=!1;for(let e=0;e0&&gd(24,Ju[0].loc.start.offset);for(let n=0;n<=e;n++)nd(Ju.shift(),t,n(7===e.type?e.rawName:e.name)===n))&&gd(2,t)},onattribend(e,t){if(ju&&Uu){if(hd(Uu.loc,t),0!==e)if(Hu.includes("&")&&(Hu=$u.decodeEntities(Hu,!0)),6===Uu.type)"class"===Uu.name&&(Hu=ud(Hu).trim()),1!==e||Hu||gd(13,t),Uu.value={type:2,content:Hu,loc:1===e?pd(qu,Wu):pd(qu-1,Wu+1)},Qu.inSFCRoot&&"template"===ju.tag&&"lang"===Uu.name&&Hu&&"html"!==Hu&&Qu.enterRCDATA(iu("{const r=t.start.offset+n;return md(e,!1,pd(r,r+e.length),0,o?1:0)},l={source:i(s.trim(),n.indexOf(s,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(Yu,"").trim();const a=r.indexOf(c),u=c.match(Xu);if(u){c=c.replace(Xu,"").trim();const e=u[1].trim();let t;if(e&&(t=n.indexOf(e,a+c.length),l.key=i(e,t,!0)),u[2]){const o=u[2].trim();o&&(l.index=i(o,n.indexOf(o,l.key?t+e.length:a+c.length),!0))}}return c&&(l.value=i(c,a,!0)),l}(Uu.exp));let t=-1;"bind"===Uu.name&&(t=Uu.modifiers.findIndex((e=>"sync"===e.content)))>-1&&uu("COMPILER_V_BIND_SYNC",$u,Uu.loc,Uu.rawName)&&(Uu.name="model",Uu.modifiers.splice(t,1))}7===Uu.type&&"pre"===Uu.name||ju.props.push(Uu)}Hu="",qu=Wu=-1},oncomment(e,t){$u.comments&&dd({type:3,content:Zu(e,t),loc:pd(e-4,t+3)})},onend(){const e=Vu.length;for(let t=0;t64&&n<91||mu(e)||$u.isBuiltInComponent&&$u.isBuiltInComponent(e)||$u.isNativeTag&&!$u.isNativeTag(e))return!0;var n;for(let e=0;e6===e.type&&"inline-template"===e.name));n&&uu("COMPILER_INLINE_TEMPLATE",$u,n.loc)&&e.children.length&&(n.value={type:2,content:Zu(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function od(e,t){let n=e;for(;Vu.charCodeAt(n)!==t&&n>=0;)n--;return n}const rd=new Set(["if","else","else-if","for","slot"]);function sd({tag:e,props:t}){if("template"===e)for(let e=0;e0){if(e>=2){l.codegenNode.patchFlag=-1,i.push(l);continue}}else{const e=l.codegenNode;if(13===e.type){const t=e.patchFlag;if((void 0===t||512===t||1===t)&&Cd(l,n)>=2){const t=wd(l);t&&(e.props=n.hoist(t))}e.dynamicProps&&(e.dynamicProps=n.hoist(e.dynamicProps))}}}else if(12===l.type&&(o?0:Sd(l,n))>=2){i.push(l);continue}if(1===l.type){const t=1===l.tagType;t&&n.scopes.vSlot++,bd(l,e,n,!1,r),t&&n.scopes.vSlot--}else if(11===l.type)bd(l,e,n,1===l.children.length,!0);else if(9===l.type)for(let t=0;te.key===t||e.key.content===t));return n&&n.value}}i.length&&n.transformHoist&&n.transformHoist(s,n,e)}function Sd(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const o=n.get(e);if(void 0!==o)return o;const r=e.codegenNode;if(13!==r.type)return 0;if(r.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0===r.patchFlag){let o=3;const s=Cd(e,t);if(0===s)return n.set(e,0),0;s1)for(let r=0;r`_${ja[k.helper(e)]}`,replaceNode(e){k.parent.children[k.childIndex]=k.currentNode=e},removeNode(e){const t=k.parent.children,n=e?t.indexOf(e):k.currentNode?k.childIndex:-1;e&&e!==k.currentNode?k.childIndex>n&&(k.childIndex--,k.onNodeRemoved()):(k.currentNode=null,k.onNodeRemoved()),k.parent.children.splice(n,1)},onNodeRemoved:l,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){S(e)&&(e=za(e)),k.hoists.push(e);const t=za(`_hoisted_${k.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){const n=function(e,t,n=!1){return{type:20,index:e,value:t,needPauseTracking:n,needArraySpread:!1,loc:Ua}}(k.cached.length,e,t);return k.cached.push(n),n}};return k.filters=new Set,k}(e,t);Td(e,n),t.hoistStatic&&vd(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(yd(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&eu(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;e.codegenNode=Ha(t,n(na),void 0,e.children,o,void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function Td(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let r=0;r{n--};for(;nt===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(Au))return;const s=[];for(let i=0;i`${ja[e]}: _${ja[e]}`;function Nd(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("filter"===t?ya:"component"===t?ma:va);for(let n=0;n3||!1;t.push("["),n&&t.indent(),Dd(e,t,n),n&&t.deindent(),t.push("]")}function Dd(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;ie||"null"))}([s,i,l,f,a]),t),n(")"),d&&n(")"),u&&(n(", "),Od(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=S(e.callee)?e.callee:o(e.callee);r&&n(Ad),n(s+"(",-2,e),Dd(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",-2,e);const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let e=0;e "),(c||l)&&(n("{"),o()),i?(c&&n("return "),m(i)?Rd(i,t):Od(i,t)):l&&Od(l,t),(c||l)&&(r(),n("}")),a&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!vu(n.content);e&&i("("),Fd(n,t),e&&i(")")}else i("("),Od(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),Od(o,t),t.indentLevel--,s&&a(),s||i(" "),i(": ");const u=19===r.type;u||t.indentLevel++,Od(r,t),u||t.indentLevel--,s&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t,{needPauseTracking:l,needArraySpread:c}=e;c&&n("[...("),n(`_cache[${e.index}] || (`),l&&(r(),n(`${o(Oa)}(-1),`),i(),n("(")),n(`_cache[${e.index}] = `),Od(e.value,t),l&&(n(`).cacheIndex = ${e.index},`),i(),n(`${o(Oa)}(1),`),i(),n(`_cache[${e.index}]`),s()),n(")"),c&&n(")]")}(e,t);break;case 21:Dd(e.body,t,!0,!1)}}function Fd(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,-3,e)}function Pd(e,t){for(let n=0;nfunction(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const o=t.exp?t.exp.loc:e.loc;n.onError(hu(28,t.loc)),t.exp=za("true",!1,o)}if("if"===t.name){const s=$d(e,t),i={type:9,loc:(r=e.loc,pd(r.start.offset,r.end.offset)),branches:[s]};if(n.replaceNode(i),o)return o(i,s,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(hu(30,e.loc)),n.removeNode();const r=$d(e,t);i.branches.push(r);const s=o&&o(i,r,!1);Td(r,n),s&&s(),n.currentNode=null}else n.onError(hu(30,e.loc));break}n.removeNode(i)}}}var r}(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=Bd(t,i,n);else{const o=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);o.alternate=Bd(t,i+e.branches.length-1,n)}}}))));function $d(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!wu(e,"for")?e.children:[e],userKey:Eu(e,"key"),isTemplateIf:n}}function Bd(e,t,n){return e.condition?Xa(e.condition,Vd(e,t,n),Ja(n.helper(pa),['""',"true"])):Vd(e,t,n)}function Vd(e,t,n){const{helper:o}=n,r=Ka("key",za(`${t}`,!1,Ua,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return Ou(e,r,n),e}{let t=64;return Ha(n,o(na),Wa([r]),s,t,void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===Ba?l.arguments[1].returns:l;return 13===t.type&&eu(t,n),Ou(t,r,n),e}var l}const jd=(e,t,n)=>{const{modifiers:o,loc:r}=e,s=e.arg;let{exp:i}=e;if(i&&4===i.type&&!i.content.trim()&&(i=void 0),!i){if(4!==s.type||!s.isStatic)return n.onError(hu(52,s.loc)),{props:[Ka(s,za("",!0,r))]};Ud(e),i=e.exp}return 4!==s.type?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=`${s.content} || ""`),o.some((e=>"camel"===e.content))&&(4===s.type?s.isStatic?s.content=O(s.content):s.content=`${n.helperString(Na)}(${s.content})`:(s.children.unshift(`${n.helperString(Na)}(`),s.children.push(")"))),n.inSSR||(o.some((e=>"prop"===e.content))&&Hd(s,"."),o.some((e=>"attr"===e.content))&&Hd(s,"^")),{props:[Ka(s,i)]}},Ud=(e,t)=>{const n=e.arg,o=O(n.content);e.exp=za(o,!1,n.loc)},Hd=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},qd=kd("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return function(e,t,n,o){if(!t.exp)return void n.onError(hu(31,t.loc));const r=t.forParseResult;if(!r)return void n.onError(hu(32,t.loc));Wd(r);const{addIdentifiers:s,removeIdentifiers:i,scopes:l}=n,{source:c,value:a,key:u,index:d}=r,p={type:11,loc:t.loc,source:c,valueAlias:a,keyAlias:u,objectIndexAlias:d,parseResult:r,children:Iu(e)?e.children:[e]};n.replaceNode(p),l.vFor++;const h=o&&o(p);return()=>{l.vFor--,h&&h()}}(e,t,n,(t=>{const s=Ja(o(Sa),[t.source]),i=Iu(e),l=wu(e,"memo"),c=Eu(e,"key",!1,!0);c&&7===c.type&&!c.exp&&Ud(c);const a=c&&(6===c.type?c.value?za(c.value.content,!0):void 0:c.exp),u=c&&a?Ka("key",a):null,d=4===t.source.type&&t.source.constType>0,p=d?64:c?128:256;return t.codegenNode=Ha(n,o(na),void 0,s,p,void 0,void 0,!0,!d,!1,e.loc),()=>{let c;const{children:p}=t,h=1!==p.length||1!==p[0].type,f=Nu(e)?e:i&&1===e.children.length&&Nu(e.children[0])?e.children[0]:null;if(f?(c=f.codegenNode,i&&u&&Ou(c,u,n)):h?c=Ha(n,o(na),u?Wa([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(c=p[0].codegenNode,i&&u&&Ou(c,u,n),c.isBlock!==!d&&(c.isBlock?(r(la),r(Za(n.inSSR,c.isComponent))):r(Ya(n.inSSR,c.isComponent))),c.isBlock=!d,c.isBlock?(o(la),o(Za(n.inSSR,c.isComponent))):o(Ya(n.inSSR,c.isComponent))),l){const e=Qa(Kd(t.parseResult,[za("_cached")]));e.body={type:21,body:[Ga(["const _memo = (",l.exp,")"]),Ga(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(Va)}(_cached, _memo)) return _cached`]),Ga(["const _item = ",c]),za("_item.memo = _memo"),za("return _item")],loc:Ua},s.arguments.push(e,za("_cache"),za(String(n.cached.length))),n.cached.push(null)}else s.arguments.push(Qa(Kd(t.parseResult),c,!0))}}))}));function Wd(e,t){e.finalized||(e.finalized=!0)}function Kd({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||za("_".repeat(t+1),!1)))}([e,t,n,...o])}const zd=za("undefined",!1),Gd=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=wu(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},Jd=(e,t,n,o)=>Qa(e,n,!1,!0,n.length?n[0].loc:o);function Qd(e,t,n=Jd){t.helper(La);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=wu(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!fu(e)&&(l=!0),s.push(Ka(e||za("default",!0),n(t,void 0,o,r)))}let a=!1,u=!1;const d=[],p=new Set;let h=0;for(let e=0;e{const s=n(e,void 0,o,r);return t.compatConfig&&(s.isNonScopedSlot=!0),Ka("default",s)};a?d.length&&d.some((e=>Zd(e)))&&(u?t.onError(hu(39,d[0].loc)):s.push(e(void 0,d))):s.push(e(void 0,o))}const f=l?2:Yd(e.children)?3:1;let m=Wa(s.concat(Ka("_",za(f+"",!1))),r);return i.length&&(m=Ja(t.helper(xa),[m,qa(i)])),{slots:m,hasDynamicSlots:l}}function Xd(e,t,n){const o=[Ka("name",e),Ka("fn",t)];return null!=n&&o.push(Ka("key",za(String(n),!0))),Wa(o)}function Yd(e){for(let t=0;tfunction(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?function(e,t,n=!1){let{tag:o}=e;const r=sp(o),s=Eu(e,"is",!1,!0);if(s)if(r||au("COMPILER_IS_ON_ELEMENT",t)){let e;if(6===s.type?e=s.value&&za(s.value.content,!0):(e=s.exp,e||(e=za("is",!1,s.arg.loc))),e)return Ja(t.helper(ga),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=mu(o)||t.isBuiltInComponent(o);return i?(n||t.helper(i),i):(t.helper(ma),t.components.add(o),Pu(o,"component"))}(e,t):`"${n}"`;const i=x(s)&&s.callee===ga;let l,c,a,u,d,p=0,h=i||s===oa||s===ra||!r&&("svg"===n||"foreignObject"===n||"math"===n);if(o.length>0){const n=np(e,t,void 0,r,i);l=n.props,p=n.patchFlag,u=n.dynamicPropNames;const o=n.directives;d=o&&o.length?qa(o.map((e=>function(e,t){const n=[],o=ep.get(e);o?n.push(t.helperString(o)):(t.helper(va),t.directives.add(e.name),n.push(Pu(e.name,"directive")));const{loc:r}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=za("true",!1,r);n.push(Wa(e.modifiers.map((e=>Ka(e,t))),r))}return qa(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0)if(s===sa&&(h=!0,p|=1024),r&&s!==oa&&s!==sa){const{slots:n,hasDynamicSlots:o}=Qd(e,t);c=n,o&&(p|=1024)}else if(1===e.children.length&&s!==oa){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===Sd(n,t)&&(p|=1),c=r||2===o?n:e.children}else c=e.children;u&&u.length&&(a=function(e){let t="[";for(let n=0,o=e.length;n0;let f=!1,m=0,g=!1,v=!1,y=!1,b=!1,S=!1,x=!1;const C=[],w=e=>{u.length&&(d.push(Wa(op(u),l)),u=[]),e&&d.push(e)},E=()=>{t.scopes.vFor>0&&u.push(Ka(za("ref_for",!0),za("true")))},T=({key:e,value:n})=>{if(fu(e)){const s=e.content,i=a(s);if(!i||o&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||I(s)||(b=!0),i&&I(s)&&(x=!0),i&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&Sd(n,t)>0)return;"ref"===s?g=!0:"class"===s?v=!0:"style"===s?y=!0:"key"===s||C.includes(s)||C.push(s),!o||"class"!==s&&"style"!==s||C.includes(s)||C.push(s)}else S=!0};for(let r=0;r"prop"===e.content))&&(m|=32);const x=t.directiveTransforms[n];if(x){const{props:n,needRuntime:o}=x(c,e,t);!s&&n.forEach(T),b&&r&&!fu(r)?w(Wa(n,l)):u.push(...n),o&&(p.push(c),_(o)&&ep.set(c,o))}else N(n)||(p.push(c),h&&(f=!0))}}let k;if(d.length?(w(),k=d.length>1?Ja(t.helper(wa),d,l):d[0]):u.length&&(k=Wa(op(u),l)),S?m|=16:(v&&!o&&(m|=2),y&&!o&&(m|=4),C.length&&(m|=8),b&&(m|=32)),f||0!==m&&32!==m||!(g||x||p.length>0)||(m|=512),!t.inSSR&&k)switch(k.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t{if(Nu(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=function(e,t){let n,o='"default"';const r=[];for(let t=0;t0){const{props:o,directives:s}=np(e,t,r,!1,!1);n=o,s.length&&t.onError(hu(36,s[0].loc))}return{slotName:o,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let l=2;s&&(i[2]=s,l=3),n.length&&(i[3]=Qa([],n,!1,!1,o),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=Ja(t.helper(_a),i,o)}},lp=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let l;if(e.exp||s.length||n.onError(hu(35,r)),4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),l=za(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?M(O(e)):`on:${e}`,!0,i.loc)}else l=Ga([`${n.helperString(Da)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(Da)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=xu(c),t=!(e||(e=>Cu.test(_u(e)))(c)),n=c.content.includes(";");(t||a&&e)&&(c=Ga([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[Ka(l,c||za("() => {}",!1,r))]};return o&&(u=o(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},cp=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e{if(1===e.type&&wu(e,"once",!0)){if(ap.has(e)||t.inVOnce||t.inSSR)return;return ap.add(e),t.inVOnce=!0,t.helper(Oa),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},dp=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return n.onError(hu(41,e.loc)),pp();const s=o.loc.source.trim(),i=4===o.type?o.content:s,l=n.bindingMetadata[s];if("props"===l||"props-aliased"===l)return n.onError(hu(44,o.loc)),pp();if(!i.trim()||!xu(o))return n.onError(hu(42,o.loc)),pp();const c=r||za("modelValue",!0),a=r?fu(r)?`onUpdate:${O(r.content)}`:Ga(['"onUpdate:" + ',r]):"onUpdate:modelValue";let u;u=Ga([(n.isTS?"($event: any)":"$event")+" => ((",o,") = $event)"]);const d=[Ka(c,e.exp),Ka(a,u)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>e.content)).map((e=>(vu(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?fu(r)?`${r.content}Modifiers`:Ga([r,' + "Modifiers"']):"modelModifiers";d.push(Ka(n,za(`{ ${t} }`,!1,e.loc,2)))}return pp(d)};function pp(e=[]){return{props:e}}const hp=/[\w).+\-_$\]]/,fp=(e,t)=>{au("COMPILER_FILTERS",t)&&(5===e.type?mp(e.content,t):1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&mp(e.exp,t)})))};function mp(e,t){if(4===e.type)gp(e,t);else for(let n=0;n=0&&(e=n.charAt(t)," "===e);t--);e&&hp.test(e)||(u=!0)}}else void 0===i?(f=s+1,i=n.slice(0,s).trim()):g();function g(){m.push(n.slice(f,s).trim()),f=s+1}if(void 0===i?i=n.slice(0,s).trim():0!==f&&g(),m.length){for(s=0;s{if(1===e.type){const n=wu(e,"memo");if(!n||yp.has(e))return;return yp.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&eu(o,t),e.codegenNode=Ja(t.helper(Ba),[n.exp,Qa(void 0,o),"_cache",String(t.cached.length)]),t.cached.push(null))}}};function Sp(e,t={}){const n=t.onError||du,o="module"===t.mode;!0===t.prefixIdentifiers?n(hu(47)):o&&n(hu(48)),t.cacheHandlers&&n(hu(49)),t.scopeId&&!o&&n(hu(50));const r=d({},t,{prefixIdentifiers:!1}),s=S(e)?function(e,t){if(Qu.reset(),ju=null,Uu=null,Hu="",qu=-1,Wu=-1,Ju.length=0,Vu=e,$u=d({},Mu),t){let e;for(e in t)null!=t[e]&&($u[e]=t[e])}Qu.mode="html"===$u.parseMode?1:"sfc"===$u.parseMode?2:0,Qu.inXML=1===$u.ns||2===$u.ns;const n=t&&t.delimiters;n&&(Qu.delimiterOpen=iu(n[0]),Qu.delimiterClose=iu(n[1]));const o=Bu=function(e,t=""){return{type:0,source:t,children:[],helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Ua}}(0,e);return Qu.parse(Vu),o.loc=pd(0,e.length),o.children=ld(o.children),Bu=null,o}(e,r):e,[i,l]=[[up,Md,bp,qd,fp,ip,tp,Gd,cp],{on:lp,bind:jd,model:dp}];return Ed(s,d({},r,{nodeTransforms:[...i,...t.nodeTransforms||[]],directiveTransforms:d({},l,t.directiveTransforms||{})})),function(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){const h={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:a,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${ja[e]}`,push(e,t=-2,n){h.code+=e},indent(){f(++h.indentLevel)},deindent(e=!1){e?--h.indentLevel:f(--h.indentLevel)},newline(){f(h.indentLevel)}};function f(e){h.push("\n"+" ".repeat(e),0)}return h}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:c,scopeId:a,ssr:u}=n,d=Array.from(e.helpers),p=d.length>0,h=!s&&"module"!==o;if(function(e,t){const{ssr:n,prefixIdentifiers:o,push:r,newline:s,runtimeModuleName:i,runtimeGlobalName:l,ssrRuntimeModuleName:c}=t,a=l,u=Array.from(e.helpers);u.length>0&&(r(`const _Vue = ${a}\n`,-1),e.hoists.length)&&r(`const { ${[ua,da,pa,ha,fa].filter((e=>u.includes(e))).map(Id).join(", ")} } = _Vue\n`,-1),function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o}=t;o();for(let r=0;r0)&&c()),e.directives.length&&(Nd(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Nd(e.filters,"filter",n),c()),e.temps>0){r("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n",0),c()),u||r("return "),e.codegenNode?Od(e.codegenNode,n):r("null"),h&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(s,r)}const _p=Symbol(""),xp=Symbol(""),Cp=Symbol(""),wp=Symbol(""),Ep=Symbol(""),Tp=Symbol(""),kp=Symbol(""),Ap=Symbol(""),Ip=Symbol(""),Np=Symbol("");var Rp;let Dp;Rp={[_p]:"vModelRadio",[xp]:"vModelCheckbox",[Cp]:"vModelText",[wp]:"vModelSelect",[Ep]:"vModelDynamic",[Tp]:"withModifiers",[kp]:"withKeys",[Ap]:"vShow",[Ip]:"Transition",[Np]:"TransitionGroup"},Object.getOwnPropertySymbols(Rp).forEach((e=>{ja[e]=Rp[e]}));const Op={parseMode:"html",isVoidTag:ne,isNativeTag:e=>Z(e)||ee(e)||te(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,t=!1){return Dp||(Dp=document.createElement("div")),t?(Dp.innerHTML=`
`,Dp.children[0].getAttribute("foo")):(Dp.innerHTML=e,Dp.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?Ip:"TransitionGroup"===e||"transition-group"===e?Np:void 0,getNamespace(e,t,n){let o=t?t.ns:n;if(t&&2===o)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(o=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(o=0);else t&&1===o&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(o=0));if(0===o){if("svg"===e)return 1;if("math"===e)return 2}return o}},Fp=(e,t)=>{const n=Q(e);return za(JSON.stringify(n),!1,t,3)};function Pp(e,t){return hu(e,t)}const Lp=r("passive,once,capture"),Mp=r("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),$p=r("left,right"),Bp=r("onkeyup,onkeydown,onkeypress"),Vp=(e,t)=>fu(e)&&"onclick"===e.content.toLowerCase()?za(t,!0):4!==e.type?Ga(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,jp=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},Up=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:za("style",!0,t.loc),exp:Fp(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],Hp={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Pp(53,r)),t.children.length&&(n.onError(Pp(54,r)),t.children.length=0),{props:[Ka(za("innerHTML",!0,r),o||za("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Pp(55,r)),t.children.length&&(n.onError(Pp(56,r)),t.children.length=0),{props:[Ka(za("textContent",!0),o?Sd(o,n)>0?o:Ja(n.helperString(Ca),[o],r):za("",!0))]}},model:(e,t,n)=>{const o=dp(e,t,n);if(!o.props.length||1===t.tagType)return o;e.arg&&n.onError(Pp(58,e.arg.loc));const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let i=Cp,l=!1;if("input"===r||s){const o=Eu(t,"type");if(o){if(7===o.type)i=Ep;else if(o.value)switch(o.value.content){case"radio":i=_p;break;case"checkbox":i=xp;break;case"file":l=!0,n.onError(Pp(59,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=Ep)}else"select"===r&&(i=wp);l||(o.needRuntime=n.helper(i))}else n.onError(Pp(57,e.loc));return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>lp(e,t,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n)=>{const o=[],r=[],s=[];for(let i=0;i{const{exp:o,loc:r}=e;return o||n.onError(Pp(61,r)),{props:[],needRuntime:n.helper(Ap)}}},qp=Object.create(null);Ki((function(e,t){if(!S(e)){if(!e.nodeType)return l;e=e.innerHTML}const n=function(e,t){return e+JSON.stringify(t,((e,t)=>"function"==typeof t?t.toString():t))}(e,t),r=qp[n];if(r)return r;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const s=d({hoistStatic:!0,onError:void 0,onWarn:l},t);s.isCustomElement||"undefined"==typeof customElements||(s.isCustomElement=e=>!!customElements.get(e));const{code:i}=function(e,t={}){return Sp(e,d({},Op,t,{nodeTransforms:[jp,...Up,...t.nodeTransforms||[]],directiveTransforms:d({},Hp,t.directiveTransforms||{}),transformHoist:null}))}(e,s),c=new Function("Vue",i)(o);return c._rc=!0,qp[n]=c}))}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return n[e](s,s.exports,r),s.exports}r.m=n,r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,n)=>(r.f[n](e,t),t)),[])),r.u=e=>({245:"form-editor-view",776:"form-browser-view",951:"restore-fields-view"}[e]+".chunk.js"),r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="leaf_vue:",r.l=(n,o,s,i)=>{if(e[n])e[n].push(o);else{var l,c;if(void 0!==s)for(var a=document.getElementsByTagName("script"),u=0;u{l.onerror=l.onload=null,clearTimeout(h);var r=e[n];if(delete e[n],l.parentNode&&l.parentNode.removeChild(l),r&&r.forEach((e=>e(o))),t)return t(o)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:l}),12e4);l.onerror=p.bind(null,l.onerror),l.onload=p.bind(null,l.onload),c&&document.head.appendChild(l)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),(()=>{var e={763:0};r.f.j=(t,n)=>{var o=r.o(e,t)?e[t]:void 0;if(0!==o)if(o)n.push(o[2]);else{var s=new Promise(((n,r)=>o=e[t]=[n,r]));n.push(o[2]=s);var i=r.p+r.u(t),l=new Error;r.l(i,(n=>{if(r.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var s=n&&("load"===n.type?"missing":n.type),i=n&&n.target&&n.target.src;l.message="Loading chunk "+t+" failed.\n("+s+": "+i+")",l.name="ChunkLoadError",l.type=s,l.request=i,o[1](l)}}),"chunk-"+t,t)}};var t=(t,n)=>{var o,s,[i,l,c]=n,a=0;if(i.some((t=>0!==e[t]))){for(o in l)r.o(l,o)&&(r.m[o]=l[o]);c&&c(r)}for(t&&t(n);ae.length)&&(t=e.length);for(var n=0,o=Array(t);n{{ message }}
'}},created:function(){var e=this;this.getEnabledCategories(),document.addEventListener("keydown",(function(t){"escape"===((null==t?void 0:t.key)||"").toLowerCase()&&!0===e.showFormDialog&&null===(t.target.closest(".CodeMirror")||null)&&e.closeFormDialog()}))},methods:{truncateText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:40,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"...";return e.length<=t?e:e.slice(0,t)+n},decodeAndStripHTML:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=document.createElement("div");return t.innerHTML=e,XSSHelpers.stripAllTags(t.innerText)},updateChosenAttributes:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"List Selection",o=document.querySelector("#".concat(e,"_chosen input.chosen-search-input")),r=document.querySelector("#".concat(e,"-chosen-search-results"));null!==o&&(o.setAttribute("role","combobox"),o.setAttribute("aria-labelledby",t)),null!==r&&(r.setAttribute("title",n),r.setAttribute("role","listbox"))},showLastUpdate:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=(new Date).toLocaleString(),n=document.getElementById(e);null!==n&&(n.style.display="flex",n.innerText="last modified: ".concat(t),n.style.border="2px solid #20a0f0",setTimeout((function(){n.style.border="2px solid transparent"}),750))},setDefaultAjaxResponseMessage:function(){var e=this;$.ajax({type:"POST",url:"ajaxIndex.php?a=checkstatus",data:{CSRFToken},success:function(t){e.ajaxResponseMessage=t||""},error:function(e){return reject(e)}})},initializeOrgSelector:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"employee",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s="group"===(e=e.toLowerCase())?"group#":"#",i={};(i="group"===e?new groupSelector("".concat(n,"orgSel_").concat(t)):"position"===e?new positionSelector("".concat(n,"orgSel_").concat(t)):new employeeSelector("".concat(n,"orgSel_").concat(t))).apiPath="".concat(this.orgchartPath,"/api/"),i.rootPath="".concat(this.orgchartPath,"/"),i.basePath="".concat(this.orgchartPath,"/"),i.setSelectHandler((function(){var t=document.querySelector("#".concat(i.containerID," input.").concat(e,"SelectorInput"));null!==t&&(t.value="".concat(s)+i.selection)})),"function"==typeof r&&i.setResultHandler((function(){return r(i)})),i.initialize();var l=document.querySelector("#".concat(i.containerID," input.").concat(e,"SelectorInput"));""!==o&&null!==l&&(l.value="".concat(s)+o)},getEnabledCategories:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.appIsLoadingCategories=!0;try{fetch("".concat(this.APIroot,"formStack/categoryList/allWithStaples")).then((function(n){n.json().then((function(n){for(var o in e.allStapledFormCatIDs={},e.categories={},n)e.categories[n[o].categoryID]=n[o],n[o].stapledFormIDs.forEach((function(t){e.allStapledFormCatIDs[t]=void 0===e.allStapledFormCatIDs[t]?1:e.allStapledFormCatIDs[t]+1}));e.appIsLoadingCategories=!1,t&&!0===/^form_[0-9a-f]{5}$/i.test(t)&&e.$router.push({name:"category",query:{formID:t}})}))}))}catch(e){console.log("error getting categories",e)}},getSiteSettings:function(){var e=this;try{fetch("".concat(this.APIroot,"system/settings")).then((function(t){t.json().then((function(t){e.siteSettings=t,+(null==t?void 0:t.leafSecure)>=1&&e.getSecureFormsInfo()}))}))}catch(e){console.log("error getting site settings",e)}},fetchLEAFSRequests:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(t,n){var o=new LeafFormQuery;o.setRootURL("../"),o.addTerm("categoryID","=","leaf_secure"),!0===e?(o.addTerm("stepID","=","resolved"),o.join("recordResolutionData")):o.addTerm("stepID","!=","resolved"),o.onSuccess((function(e){return t(e)})),o.execute()}))},getSecureFormsInfo:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"form/indicator/list?x-filterData=timeAdded"),success:function(e){},error:function(e){return console.log(e)}}),this.fetchLEAFSRequests(!0)];Promise.all(t).then((function(t){var n=t[0],o=t[1];e.checkLeafSRequestStatus(n,o)})).catch((function(e){return console.log("an error has occurred",e)}))},checkLeafSRequestStatus:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=!1,r=0;for(var s in n)"approved"===n[s].recordResolutionData.lastStatus.toLowerCase()&&n[s].recordResolutionData.fulfillmentTime>r&&(r=n[s].recordResolutionData.fulfillmentTime);var i=new Date(1e3*parseInt(r));for(var l in t)if(new Date(t[l].timeAdded).getTime()>i.getTime()){o=!0;break}!0===o?(this.showCertificationStatus=!0,this.fetchLEAFSRequests(!1).then((function(t){if(0===Object.keys(t).length)e.secureStatusText="Forms have been modified.",e.secureBtnText="Please Recertify Your Site",e.secureBtnLink="../report.php?a=LEAF_start_leaf_secure_certification";else{var n=t[Object.keys(t)[0]].recordID;e.secureStatusText="Re-certification in progress.",e.secureBtnText="Check Certification Progress",e.secureBtnLink="../index.php?a=printview&recordID="+n}})).catch((function(e){return console.log("an error has occurred",e)}))):this.showCertificationStatus=!1},updateCategoriesProperty:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";void 0!==this.categories[e][t]&&(this.categories[e][t]=n)},updateStapledFormsInfo:function(){var e,t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";!0===(arguments.length>2&&void 0!==arguments[2]&&arguments[2])?(this.categories[o].stapledFormIDs=this.categories[o].stapledFormIDs.filter((function(e){return e!==n})),(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[n])>0?this.allStapledFormCatIDs[n]=this.allStapledFormCatIDs[n]-1:console.log("check staple calc")):(this.allStapledFormCatIDs[n]=void 0===this.allStapledFormCatIDs[n]?1:this.allStapledFormCatIDs[n]+1,this.categories[o].stapledFormIDs=Array.from(new Set([].concat(function(e){if(Array.isArray(e))return i(e)}(t=this.categories[o].stapledFormIDs)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[n]))))},addNewCategory:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.categories[e]=t},removeCategory:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";delete this.categories[e]},closeFormDialog:function(){this.showFormDialog=!1,this.dialogTitle="",this.dialogFormContent="",this.dialogButtonText={confirm:"Save",cancel:"Cancel"},this.formSaveFunction=null,this.dialogData=null},lastModalTab:function(e){if(!1===(null==e?void 0:e.shiftKey)){var t=document.getElementById("leaf-vue-dialog-close");null!==t&&(t.focus(),e.preventDefault())}},setCustomDialogTitle:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogTitle=e},setFormDialogComponent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogFormContent=e},setDialogSaveFunction:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";"function"==typeof e&&(this.formSaveFunction=e)},checkRequiredData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=Object.keys((null==this?void 0:this.dialogData)||{});e.forEach((function(e){n.includes(e)||t.push(e)})),t.length>0&&console.warn("expected dialogData key was not found",t)},openConfirmDeleteFormDialog:function(){this.setCustomDialogTitle("

Delete this form

"),this.setFormDialogComponent("confirm-delete-dialog"),this.dialogButtonText={confirm:"Yes",cancel:"No"},this.showFormDialog=!0},openStapleFormsDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogData={mainFormID:e},this.setCustomDialogTitle("

Editing Stapled Forms

"),this.setFormDialogComponent("staple-form-dialog"),this.dialogButtonText={confirm:"Add",cancel:"Close"},this.showFormDialog=!0},openEditCollaboratorsDialog:function(){this.setCustomDialogTitle("

Customize Write Access

"),this.setFormDialogComponent("edit-collaborators-dialog"),this.dialogButtonText={confirm:"Add",cancel:"Close"},this.showFormDialog=!0},openIfThenDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Untitled",n=this.truncateText(this.decodeAndStripHTML(t),35);this.dialogData={indicatorID:e},this.dialogButtonText={confirm:"Save",cancel:"Close"},this.setCustomDialogTitle('

Conditions For '.concat(n," (").concat(e,")

")),this.setFormDialogComponent("conditions-editor-dialog"),this.showFormDialog=!0},openIndicatorEditingDialog:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e=null===t&&null===n?"

Adding new Section

":null===t?"

Adding question to ".concat(n,"

"):"

Editing indicatorID ".concat(t,"

"),this.dialogData={indicatorID:t,parentID:n,indicator:o},this.setCustomDialogTitle(e),this.setFormDialogComponent("indicator-editing-dialog"),this.showFormDialog=!0},openAdvancedOptionsDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.dialogData={indicatorID:e.indicatorID,html:(null==e?void 0:e.html)||"",htmlPrint:(null==e?void 0:e.htmlPrint)||""},this.setCustomDialogTitle("

Advanced Options for indicator ".concat(e.indicatorID,"

")),this.setFormDialogComponent("advanced-options-dialog"),this.showFormDialog=!0},openNewFormDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogData={parentID:e};var t=""===e?"

New Form

":"

New Internal Use Form

";this.setCustomDialogTitle(t),this.setFormDialogComponent("new-form-dialog"),this.showFormDialog=!0},openImportFormDialog:function(){this.setCustomDialogTitle("

Import Form

"),this.setFormDialogComponent("import-form-dialog"),this.dialogButtonText={confirm:"Import",cancel:"Close"},this.showFormDialog=!0},openFormHistoryDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogData={historyType:"form",historyID:e},this.setCustomDialogTitle("

Form History

"),this.setFormDialogComponent("history-dialog"),this.showFormDialog=!0}}},c="undefined"!=typeof document;function a(e){return"object"==typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}const u=Object.assign;function d(e,t){const n={};for(const o in t){const r=t[o];n[o]=h(r)?r.map(e):e(r)}return n}const p=()=>{},h=Array.isArray,f=/#/g,m=/&/g,g=/\//g,v=/=/g,y=/\?/g,b=/\+/g,S=/%5B/g,_=/%5D/g,x=/%5E/g,C=/%60/g,w=/%7B/g,E=/%7C/g,T=/%7D/g,k=/%20/g;function A(e){return encodeURI(""+e).replace(E,"|").replace(S,"[").replace(_,"]")}function I(e){return A(e).replace(b,"%2B").replace(k,"+").replace(f,"%23").replace(m,"%26").replace(C,"`").replace(w,"{").replace(T,"}").replace(x,"^")}function N(e){return null==e?"":function(e){return A(e).replace(f,"%23").replace(y,"%3F")}(e).replace(g,"%2F")}function R(e){try{return decodeURIComponent(""+e)}catch(e){}return""+e}const D=/\/$/;function O(e,t,n="/"){let o,r={},s="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(o=t.slice(0,c),s=t.slice(c+1,l>-1?l:t.length),r=e(s)),l>-1&&(o=o||t.slice(0,l),i=t.slice(l,t.length)),o=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];".."!==r&&"."!==r||o.push("");let s,i,l=n.length-1;for(s=0;s1&&l--}return n.slice(0,l).join("/")+"/"+o.slice(s).join("/")}(null!=o?o:t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:R(i)}}function F(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function P(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function L(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!M(e[n],t[n]))return!1;return!0}function M(e,t){return h(e)?B(e,t):h(t)?B(t,e):e===t}function B(e,t){return h(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}const V={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var j,U;!function(e){e.pop="pop",e.push="push"}(j||(j={})),function(e){e.back="back",e.forward="forward",e.unknown=""}(U||(U={}));const H=/^[^#]+#/;function q(e,t){return e.replace(H,"#")+t}const W=()=>({left:window.scrollX,top:window.scrollY});function K(e,t){return(history.state?history.state.position-t:-1)+e}const z=new Map;let G=()=>location.protocol+"//"+location.host;function J(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let t=r.includes(e.slice(s))?e.slice(s).length:1,n=r.slice(t);return"/"!==n[0]&&(n="/"+n),F(n,"")}return F(n,e)+o+r}function Q(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?W():null}}function X(e){return"string"==typeof e||"symbol"==typeof e}const Y=Symbol("");var Z;function ee(e,t){return u(new Error,{type:e,[Y]:!0},t)}function te(e,t){return e instanceof Error&&Y in e&&(null==t||!!(e.type&t))}!function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"}(Z||(Z={}));const ne="[^/]+?",oe={sensitive:!1,strict:!1,start:!0,end:!0},re=/[.+*?^${}()[\]/\\]/g;function se(e,t){let n=0;for(;nt.length?1===t.length&&80===t[0]?1:-1:0}function ie(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const ce={type:0,value:""},ae=/[a-zA-Z0-9_]/;function ue(e,t,n){const o=function(e,t){const n=u({},oe,t),o=[];let r=n.start?"^":"";const s=[];for(const t of e){const e=t.length?[]:[90];n.strict&&!t.length&&(r+="/");for(let o=0;o1&&("*"===l||"+"===l)&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:a,regexp:u,repeatable:"*"===l||"+"===l,optional:"*"===l||"?"===l})):t("Invalid state to consume buffer"),a="")}function p(){a+=l}for(;cu(e,t.meta)),{})}function ge(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function ve({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function ye(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let e=0;ee&&I(e))):[o&&I(o)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))})):void 0!==o&&(t+=(t.length?"&":"")+n)}return t}function Se(e){const t={};for(const n in e){const o=e[n];void 0!==o&&(t[n]=h(o)?o.map((e=>null==e?null:""+e)):null==o?o:""+o)}return t}const _e=Symbol(""),xe=Symbol(""),Ce=Symbol(""),we=Symbol(""),Ee=Symbol("");function Te(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function ke(e,t,n,o,r,s=e=>e()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise(((l,c)=>{const a=e=>{var s;!1===e?c(ee(4,{from:n,to:t})):e instanceof Error?c(e):"string"==typeof(s=e)||s&&"object"==typeof s?c(ee(2,{from:t,to:e})):(i&&o.enterCallbacks[r]===i&&"function"==typeof e&&i.push(e),l())},u=s((()=>e.call(o&&o.instances[r],t,n,a)));let d=Promise.resolve(u);e.length<3&&(d=d.then(a)),d.catch((e=>c(e)))}))}function Ae(e,t,n,o,r=e=>e()){const s=[];for(const i of e)for(const e in i.components){let l=i.components[e];if("beforeRouteEnter"===t||i.instances[e])if(a(l)){const c=(l.__vccOpts||l)[t];c&&s.push(ke(c,n,o,i,e,r))}else{let c=l();s.push((()=>c.then((s=>{if(!s)throw new Error(`Couldn't resolve component "${e}" at "${i.path}"`);const l=(c=s).__esModule||"Module"===c[Symbol.toStringTag]||c.default&&a(c.default)?s.default:s;var c;i.mods[e]=s,i.components[e]=l;const u=(l.__vccOpts||l)[t];return u&&ke(u,n,o,i,e,r)()}))))}}return s}function Ie(e){const t=(0,s.WQ)(Ce),n=(0,s.WQ)(we),o=(0,s.EW)((()=>{const n=(0,s.R1)(e.to);return t.resolve(n)})),r=(0,s.EW)((()=>{const{matched:e}=o.value,{length:t}=e,r=e[t-1],s=n.matched;if(!r||!s.length)return-1;const i=s.findIndex(P.bind(null,r));if(i>-1)return i;const l=Re(e[t-2]);return t>1&&Re(r)===l&&s[s.length-1].path!==l?s.findIndex(P.bind(null,e[t-2])):i})),i=(0,s.EW)((()=>r.value>-1&&function(e,t){for(const n in t){const o=t[n],r=e[n];if("string"==typeof o){if(o!==r)return!1}else if(!h(r)||r.length!==o.length||o.some(((e,t)=>e!==r[t])))return!1}return!0}(n.params,o.value.params))),l=(0,s.EW)((()=>r.value>-1&&r.value===n.matched.length-1&&L(n.params,o.value.params)));return{route:o,href:(0,s.EW)((()=>o.value.href)),isActive:i,isExactActive:l,navigate:function(n={}){return function(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}(n)?t[(0,s.R1)(e.replace)?"replace":"push"]((0,s.R1)(e.to)).catch(p):Promise.resolve()}}}const Ne=(0,s.pM)({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:Ie,setup(e,{slots:t}){const n=(0,s.Kh)(Ie(e)),{options:o}=(0,s.WQ)(Ce),r=(0,s.EW)((()=>({[De(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[De(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const o=t.default&&t.default(n);return e.custom?o:(0,s.h)("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}});function Re(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const De=(e,t,n)=>null!=e?e:null!=t?t:n;function Oe(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const Fe=(0,s.pM)({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=(0,s.WQ)(Ee),r=(0,s.EW)((()=>e.route||o.value)),i=(0,s.WQ)(xe,0),l=(0,s.EW)((()=>{let e=(0,s.R1)(i);const{matched:t}=r.value;let n;for(;(n=t[e])&&!n.components;)e++;return e})),c=(0,s.EW)((()=>r.value.matched[l.value]));(0,s.Gt)(xe,(0,s.EW)((()=>l.value+1))),(0,s.Gt)(_e,c),(0,s.Gt)(Ee,r);const a=(0,s.KR)();return(0,s.wB)((()=>[a.value,c.value,e.name]),(([e,t,n],[o,r,s])=>{t&&(t.instances[n]=e,r&&r!==t&&e&&e===o&&(t.leaveGuards.size||(t.leaveGuards=r.leaveGuards),t.updateGuards.size||(t.updateGuards=r.updateGuards))),!e||!t||r&&P(t,r)&&o||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=r.value,i=e.name,l=c.value,d=l&&l.components[i];if(!d)return Oe(n.default,{Component:d,route:o});const p=l.props[i],h=p?!0===p?o.params:"function"==typeof p?p(o):p:null,f=(0,s.h)(d,u({},h,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(l.instances[i]=null)},ref:a}));return Oe(n.default,{Component:f,route:o})||f}}});var Pe,Le=[{path:"/",name:"browser",component:function(){return r.e(776).then(r.bind(r,223))}},{path:"/forms",name:"category",component:function(){return r.e(245).then(r.bind(r,211))}},{path:"/restore",name:"restore",component:function(){return r.e(951).then(r.bind(r,315))}}],Me=function(e){const t=function(e,t){const n=[],o=new Map;function r(e,n,o){const l=!o,c=pe(e);c.aliasOf=o&&o.record;const a=ge(t,e),d=[c];if("alias"in e){const t="string"==typeof e.alias?[e.alias]:e.alias;for(const e of t)d.push(pe(u({},c,{components:o?o.record.components:c.components,path:e,aliasOf:o?o.record:c})))}let h,f;for(const t of d){const{path:u}=t;if(n&&"/"!==u[0]){const e=n.record.path,o="/"===e[e.length-1]?"":"/";t.path=n.record.path+(u&&o+u)}if(h=ue(t,n,a),o?o.alias.push(h):(f=f||h,f!==h&&f.alias.push(h),l&&e.name&&!fe(h)&&s(e.name)),ve(h)&&i(h),c.children){const e=c.children;for(let t=0;t{s(f)}:p}function s(e){if(X(e)){const t=o.get(e);t&&(o.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(s),t.alias.forEach(s))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&o.delete(e.record.name),e.children.forEach(s),e.alias.forEach(s))}}function i(e){const t=function(e,t){let n=0,o=t.length;for(;n!==o;){const r=n+o>>1;ie(e,t[r])<0?o=r:n=r+1}const r=function(e){let t=e;for(;t=t.parent;)if(ve(t)&&0===ie(e,t))return t}(e);return r&&(o=t.lastIndexOf(r,o-1)),o}(e,n);n.splice(t,0,e),e.record.name&&!fe(e)&&o.set(e.record.name,e)}return t=ge({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>r(e))),{addRoute:r,resolve:function(e,t){let r,s,i,l={};if("name"in e&&e.name){if(r=o.get(e.name),!r)throw ee(1,{location:e});i=r.record.name,l=u(de(t.params,r.keys.filter((e=>!e.optional)).concat(r.parent?r.parent.keys.filter((e=>e.optional)):[]).map((e=>e.name))),e.params&&de(e.params,r.keys.map((e=>e.name)))),s=r.stringify(l)}else if(null!=e.path)s=e.path,r=n.find((e=>e.re.test(s))),r&&(l=r.parse(s),i=r.record.name);else{if(r=t.name?o.get(t.name):n.find((e=>e.re.test(t.path))),!r)throw ee(1,{location:e,currentLocation:t});i=r.record.name,l=u({},t.params,e.params),s=r.stringify(l)}const c=[];let a=r;for(;a;)c.unshift(a.record),a=a.parent;return{name:i,path:s,params:l,matched:c,meta:me(c)}},removeRoute:s,clearRoutes:function(){n.length=0,o.clear()},getRoutes:function(){return n},getRecordMatcher:function(e){return o.get(e)}}}(e.routes,e),n=e.parseQuery||ye,o=e.stringifyQuery||be,r=e.history,i=Te(),l=Te(),a=Te(),f=(0,s.IJ)(V);let m=V;c&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const g=d.bind(null,(e=>""+e)),v=d.bind(null,N),y=d.bind(null,R);function b(e,s){if(s=u({},s||f.value),"string"==typeof e){const o=O(n,e,s.path),i=t.resolve({path:o.path},s),l=r.createHref(o.fullPath);return u(o,i,{params:y(i.params),hash:R(o.hash),redirectedFrom:void 0,href:l})}let i;if(null!=e.path)i=u({},e,{path:O(n,e.path,s.path).path});else{const t=u({},e.params);for(const e in t)null==t[e]&&delete t[e];i=u({},e,{params:v(t)}),s.params=v(s.params)}const l=t.resolve(i,s),c=e.hash||"";l.params=g(y(l.params));const a=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,u({},e,{hash:(d=c,A(d).replace(w,"{").replace(T,"}").replace(x,"^")),path:l.path}));var d;const p=r.createHref(a);return u({fullPath:a,hash:c,query:o===be?Se(e.query):e.query||{}},l,{redirectedFrom:void 0,href:p})}function S(e){return"string"==typeof e?O(n,e,f.value.path):u({},e)}function _(e,t){if(m!==e)return ee(8,{from:t,to:e})}function C(e){return k(e)}function E(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let o="function"==typeof n?n(e):n;return"string"==typeof o&&(o=o.includes("?")||o.includes("#")?o=S(o):{path:o},o.params={}),u({query:e.query,hash:e.hash,params:null!=o.path?{}:e.params},o)}}function k(e,t){const n=m=b(e),r=f.value,s=e.state,i=e.force,l=!0===e.replace,c=E(n);if(c)return k(u(S(c),{state:"object"==typeof c?u({},s,c.state):s,force:i,replace:l}),t||n);const a=n;let d;return a.redirectedFrom=t,!i&&function(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&P(t.matched[o],n.matched[r])&&L(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,r,n)&&(d=ee(16,{to:a,from:r}),Q(r,r,!0,!1)),(d?Promise.resolve(d):F(a,r)).catch((e=>te(e)?te(e,2)?e:J(e):G(e,a,r))).then((e=>{if(e){if(te(e,2))return k(u({replace:l},S(e.to),{state:"object"==typeof e.to?u({},s,e.to.state):s,force:i}),t||a)}else e=$(a,r,!0,l,s);return M(a,r,e),e}))}function I(e,t){const n=_(e,t);return n?Promise.reject(n):Promise.resolve()}function D(e){const t=ne.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function F(e,t){let n;const[o,r,s]=function(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;iP(e,s)))?o.push(s):n.push(s));const l=e.matched[i];l&&(t.matched.find((e=>P(e,l)))||r.push(l))}return[n,o,r]}(e,t);n=Ae(o.reverse(),"beforeRouteLeave",e,t);for(const r of o)r.leaveGuards.forEach((o=>{n.push(ke(o,e,t))}));const c=I.bind(null,e,t);return n.push(c),re(n).then((()=>{n=[];for(const o of i.list())n.push(ke(o,e,t));return n.push(c),re(n)})).then((()=>{n=Ae(r,"beforeRouteUpdate",e,t);for(const o of r)o.updateGuards.forEach((o=>{n.push(ke(o,e,t))}));return n.push(c),re(n)})).then((()=>{n=[];for(const o of s)if(o.beforeEnter)if(h(o.beforeEnter))for(const r of o.beforeEnter)n.push(ke(r,e,t));else n.push(ke(o.beforeEnter,e,t));return n.push(c),re(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=Ae(s,"beforeRouteEnter",e,t,D),n.push(c),re(n)))).then((()=>{n=[];for(const o of l.list())n.push(ke(o,e,t));return n.push(c),re(n)})).catch((e=>te(e,8)?e:Promise.reject(e)))}function M(e,t,n){a.list().forEach((o=>D((()=>o(e,t,n)))))}function $(e,t,n,o,s){const i=_(e,t);if(i)return i;const l=t===V,a=c?history.state:{};n&&(o||l?r.replace(e.fullPath,u({scroll:l&&a&&a.scroll},s)):r.push(e.fullPath,s)),f.value=e,Q(e,t,n,l),J()}let B;let U,H=Te(),q=Te();function G(e,t,n){J(e);const o=q.list();return o.length?o.forEach((o=>o(e,t,n))):console.error(e),Promise.reject(e)}function J(e){return U||(U=!e,B||(B=r.listen(((e,t,n)=>{if(!oe.listening)return;const o=b(e),s=E(o);if(s)return void k(u(s,{replace:!0}),o).catch(p);m=o;const i=f.value;var l,a;c&&(l=K(i.fullPath,n.delta),a=W(),z.set(l,a)),F(o,i).catch((e=>te(e,12)?e:te(e,2)?(k(e.to,o).then((e=>{te(e,20)&&!n.delta&&n.type===j.pop&&r.go(-1,!1)})).catch(p),Promise.reject()):(n.delta&&r.go(-n.delta,!1),G(e,o,i)))).then((e=>{(e=e||$(o,i,!1))&&(n.delta&&!te(e,8)?r.go(-n.delta,!1):n.type===j.pop&&te(e,20)&&r.go(-1,!1)),M(o,i,e)})).catch(p)}))),H.list().forEach((([t,n])=>e?n(e):t())),H.reset()),e}function Q(t,n,o,r){const{scrollBehavior:i}=e;if(!c||!i)return Promise.resolve();const l=!o&&function(e){const t=z.get(e);return z.delete(e),t}(K(t.fullPath,0))||(r||!o)&&history.state&&history.state.scroll||null;return(0,s.dY)().then((()=>i(t,n,l))).then((e=>e&&function(e){let t;if("el"in e){const n=e.el,o="string"==typeof n&&n.startsWith("#"),r="string"==typeof n?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=function(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}(e))).catch((e=>G(e,t,n)))}const Y=e=>r.go(e);let Z;const ne=new Set,oe={currentRoute:f,listening:!0,addRoute:function(e,n){let o,r;return X(e)?(o=t.getRecordMatcher(e),r=n):r=e,t.addRoute(r,o)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},clearRoutes:t.clearRoutes,hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:b,options:e,push:C,replace:function(e){return C(u(S(e),{replace:!0}))},go:Y,back:()=>Y(-1),forward:()=>Y(1),beforeEach:i.add,beforeResolve:l.add,afterEach:a.add,onError:q.add,isReady:function(){return U&&f.value!==V?Promise.resolve():new Promise(((e,t)=>{H.add([e,t])}))},install(e){e.component("RouterLink",Ne),e.component("RouterView",Fe),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>(0,s.R1)(f)}),c&&!Z&&f.value===V&&(Z=!0,C(r.location).catch((e=>{})));const t={};for(const e in V)Object.defineProperty(t,e,{get:()=>f.value[e],enumerable:!0});e.provide(Ce,this),e.provide(we,(0,s.Gc)(t)),e.provide(Ee,f);const n=e.unmount;ne.add(e),e.unmount=function(){ne.delete(e),ne.size<1&&(m=V,B&&B(),B=null,f.value=V,Z=!1,U=!1),n()}}};function re(e){return e.reduce(((e,t)=>e.then((()=>D(t)))),Promise.resolve())}return oe}({history:((Pe=location.host?Pe||location.pathname+location.search:"").includes("#")||(Pe+="#"),function(e){const t=function(e){const{history:t,location:n}=window,o={value:J(e,n)},r={value:t.state};function s(o,s,i){const l=e.indexOf("#"),c=l>-1?(n.host&&document.querySelector("base")?e:e.slice(l))+o:G()+e+o;try{t[i?"replaceState":"pushState"](s,"",c),r.value=s}catch(e){console.error(e),n[i?"replace":"assign"](c)}}return r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:o,state:r,push:function(e,n){const i=u({},r.value,t.state,{forward:e,scroll:W()});s(i.current,i,!0),s(e,u({},Q(o.value,e,null),{position:i.position+1},n),!1),o.value=e},replace:function(e,n){s(e,u({},t.state,Q(r.value.back,e,r.value.forward,!0),n,{position:r.value.position}),!0),o.value=e}}}(e=function(e){if(!e)if(c){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(D,"")}(e)),n=function(e,t,n,o){let r=[],s=[],i=null;const l=({state:s})=>{const l=J(e,location),c=n.value,a=t.value;let u=0;if(s){if(n.value=l,t.value=s,i&&i===c)return void(i=null);u=a?s.position-a.position:0}else o(l);r.forEach((e=>{e(n.value,c,{delta:u,type:j.pop,direction:u?u>0?U.forward:U.back:U.unknown})}))};function c(){const{history:e}=window;e.state&&e.replaceState(u({},e.state,{scroll:W()}),"")}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:function(){i=n.value},listen:function(e){r.push(e);const t=()=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)};return s.push(t),t},destroy:function(){for(const e of s)e();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}}}(e,t.state,t.location,t.replace),o=u({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:q.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}(Pe)),routes:Le});Me.beforeEach((function(e){if("/bodyarea"===e.path)return!1}));const $e=Me;var Be=(0,s.Ef)(l);Be.use($e),Be.mount("#vue-formeditor-app")})(); \ No newline at end of file diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.js.LICENSE.txt b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.js.LICENSE.txt index 3fb0d1695..35fb4e81b 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.js.LICENSE.txt +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.js.LICENSE.txt @@ -1,19 +1,19 @@ /*! #__NO_SIDE_EFFECTS__ */ /** -* @vue/runtime-core v3.5.9 +* @vue/runtime-core v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ /** -* @vue/runtime-dom v3.5.9 +* @vue/runtime-dom v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ /** -* @vue/shared v3.5.9 +* @vue/shared v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ diff --git a/app/libs/js/vue-dest/site_designer/LEAF_Designer.js b/app/libs/js/vue-dest/site_designer/LEAF_Designer.js index ccfaf39f2..6c90ee88b 100644 --- a/app/libs/js/vue-dest/site_designer/LEAF_Designer.js +++ b/app/libs/js/vue-dest/site_designer/LEAF_Designer.js @@ -1,2 +1,2 @@ /*! For license information please see LEAF_Designer.js.LICENSE.txt */ -(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};function n(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}e.r(t),e.d(t,{BaseTransition:()=>xo,BaseTransitionPropsValidators:()=>bo,Comment:()=>hi,DeprecationTypes:()=>wl,EffectScope:()=>pe,ErrorCodes:()=>kn,ErrorTypeStrings:()=>yl,Fragment:()=>pi,KeepAlive:()=>Xo,ReactiveEffect:()=>ve,Static:()=>mi,Suspense:()=>ii,Teleport:()=>po,Text:()=>fi,TrackOpTypes:()=>mn,Transition:()=>Ll,TransitionGroup:()=>Ac,TriggerOpTypes:()=>gn,VueElement:()=>xc,assertNumber:()=>wn,callWithAsyncErrorHandling:()=>Tn,callWithErrorHandling:()=>In,camelize:()=>N,capitalize:()=>R,cloneVNode:()=>Ri,compatUtils:()=>Cl,computed:()=>dl,createApp:()=>la,createBlock:()=>ki,createCommentVNode:()=>Fi,createElementBlock:()=>wi,createElementVNode:()=>Ni,createHydrationRenderer:()=>Ns,createPropsRestProxy:()=>zr,createRenderer:()=>As,createSSRApp:()=>ca,createSlots:()=>kr,createStaticVNode:()=>Li,createTextVNode:()=>Mi,createVNode:()=>Oi,customRef:()=>cn,defineAsyncComponent:()=>zo,defineComponent:()=>Do,defineCustomElement:()=>bc,defineEmits:()=>Mr,defineExpose:()=>Lr,defineModel:()=>jr,defineOptions:()=>Fr,defineProps:()=>Rr,defineSSRCustomElement:()=>Sc,defineSlots:()=>Br,devtools:()=>bl,effect:()=>De,effectScope:()=>fe,getCurrentInstance:()=>zi,getCurrentScope:()=>he,getCurrentWatcher:()=>Sn,getTransitionRawChildren:()=>Eo,guardReactiveProps:()=>Pi,h:()=>pl,handleError:()=>En,hasInjectionContext:()=>ps,hydrate:()=>ia,hydrateOnIdle:()=>Vo,hydrateOnInteraction:()=>Wo,hydrateOnMediaQuery:()=>qo,hydrateOnVisible:()=>Uo,initCustomFormatter:()=>fl,initDirectivesForSSR:()=>pa,inject:()=>ds,isMemoSame:()=>ml,isProxy:()=>Wt,isReactive:()=>Vt,isReadonly:()=>Ut,isRef:()=>Xt,isRuntimeOnly:()=>sl,isShallow:()=>qt,isVNode:()=>Ii,markRaw:()=>zt,mergeDefaults:()=>Wr,mergeModels:()=>Gr,mergeProps:()=>Hi,nextTick:()=>Bn,normalizeClass:()=>X,normalizeProps:()=>Y,normalizeStyle:()=>W,onActivated:()=>Qo,onBeforeMount:()=>ir,onBeforeUnmount:()=>ur,onBeforeUpdate:()=>cr,onDeactivated:()=>Zo,onErrorCaptured:()=>mr,onMounted:()=>lr,onRenderTracked:()=>hr,onRenderTriggered:()=>fr,onScopeDispose:()=>me,onServerPrefetch:()=>pr,onUnmounted:()=>dr,onUpdated:()=>ar,onWatcherCleanup:()=>_n,openBlock:()=>yi,popScopeId:()=>Zn,provide:()=>us,proxyRefs:()=>sn,pushScopeId:()=>Qn,queuePostFlushCb:()=>Hn,reactive:()=>Ft,readonly:()=>jt,ref:()=>Yt,registerRuntimeCompiler:()=>rl,render:()=>sa,renderList:()=>wr,renderSlot:()=>Ir,resolveComponent:()=>yr,resolveDirective:()=>_r,resolveDynamicComponent:()=>Sr,resolveFilter:()=>xl,resolveTransitionHooks:()=>wo,setBlockTracking:()=>xi,setDevtoolsHook:()=>Sl,setTransitionHooks:()=>To,shallowReactive:()=>Bt,shallowReadonly:()=>$t,shallowRef:()=>Qt,ssrContextKey:()=>js,ssrUtils:()=>_l,stop:()=>Ae,toDisplayString:()=>le,toHandlerKey:()=>M,toHandlers:()=>Er,toRaw:()=>Gt,toRef:()=>pn,toRefs:()=>an,toValue:()=>on,transformVNodeArgs:()=>Ei,triggerRef:()=>tn,unref:()=>nn,useAttrs:()=>Vr,useCssModule:()=>kc,useCssVars:()=>tc,useHost:()=>Cc,useId:()=>Ao,useModel:()=>Ks,useSSRContext:()=>$s,useShadowRoot:()=>wc,useSlots:()=>Hr,useTemplateRef:()=>Oo,useTransitionState:()=>vo,vModelCheckbox:()=>jc,vModelDynamic:()=>Gc,vModelRadio:()=>Hc,vModelSelect:()=>Vc,vModelText:()=>Bc,vShow:()=>Ql,version:()=>gl,warn:()=>vl,watch:()=>qs,watchEffect:()=>Hs,watchPostEffect:()=>Vs,watchSyncEffect:()=>Us,withAsyncContext:()=>Kr,withCtx:()=>to,withDefaults:()=>$r,withDirectives:()=>no,withKeys:()=>Zc,withMemo:()=>hl,withModifiers:()=>Yc,withScopeId:()=>eo});const o={},r=[],s=()=>{},i=()=>!1,l=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith("onUpdate:"),a=Object.assign,u=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,p=(e,t)=>d.call(e,t),f=Array.isArray,h=e=>"[object Map]"===C(e),m=e=>"[object Set]"===C(e),g=e=>"[object Date]"===C(e),v=e=>"function"==typeof e,y=e=>"string"==typeof e,b=e=>"symbol"==typeof e,S=e=>null!==e&&"object"==typeof e,_=e=>(S(e)||v(e))&&v(e.then)&&v(e.catch),x=Object.prototype.toString,C=e=>x.call(e),w=e=>C(e).slice(8,-1),k=e=>"[object Object]"===C(e),I=e=>y(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,T=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),E=n("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),D=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},A=/-(\w)/g,N=D((e=>e.replace(A,((e,t)=>t?t.toUpperCase():"")))),O=/\B([A-Z])/g,P=D((e=>e.replace(O,"-$1").toLowerCase())),R=D((e=>e.charAt(0).toUpperCase()+e.slice(1))),M=D((e=>e?`on${R(e)}`:"")),L=(e,t)=>!Object.is(e,t),F=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},j=e=>{const t=parseFloat(e);return isNaN(t)?e:t},H=e=>{const t=y(e)?Number(e):NaN;return isNaN(t)?e:t};let V;const U=()=>V||(V="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e.g?e.g:{}),q=n("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function W(e){if(f(e)){const t={};for(let n=0;n{if(e){const n=e.split(z);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function X(e){let t="";if(y(e))t=e;else if(f(e))for(let n=0;nre(e,t)))}const ie=e=>!(!e||!0!==e.__v_isRef),le=e=>y(e)?e:null==e?"":f(e)||S(e)&&(e.toString===x||!v(e.toString))?ie(e)?le(e.value):JSON.stringify(e,ce,2):String(e),ce=(e,t)=>ie(t)?ce(e,t.value):h(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[ae(t,o)+" =>"]=n,e)),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ae(e)))}:b(t)?ae(t):!S(t)||f(t)||k(t)?t:String(t),ae=(e,t="")=>{var n;return b(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let ue,de;class pe{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ue,!e&&ue&&(this.index=(ue.scopes||(ue.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0)return;let e;for(;ye;){let t,n=ye;for(;n;)n.flags&=-9,n=n.next;for(n=ye,ye=void 0;n;){if(1&n.flags)try{n.trigger()}catch(t){e||(e=t)}t=n.next,n.next=void 0,n=t}}if(e)throw e}function Ce(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function we(e){let t,n=e.depsTail,o=n;for(;o;){const e=o.prevDep;-1===o.version?(o===n&&(n=e),Te(o),Ee(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=e}e.deps=t,e.depsTail=n}function ke(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ie(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ie(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===Le)return;e.globalVersion=Le;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ke(e))return void(e.flags&=-3);const n=de,o=Ne;de=e,Ne=!0;try{Ce(e);const n=e.fn(e._value);(0===t.version||L(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{de=n,Ne=o,we(e),e.flags&=-3}}function Te(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o),!n.subs&&n.computed){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Te(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function Ee(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function De(e,t){e.effect instanceof ve&&(e=e.effect.fn);const n=new ve(e);t&&a(n,t);try{n.run()}catch(e){throw n.stop(),e}const o=n.run.bind(n);return o.effect=n,o}function Ae(e){e.effect.stop()}let Ne=!0;const Oe=[];function Pe(){Oe.push(Ne),Ne=!1}function Re(){const e=Oe.pop();Ne=void 0===e||e}function Me(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=de;de=void 0;try{t()}finally{de=e}}}let Le=0;class Fe{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Be{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.target=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!de||!Ne||de===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==de)t=this.activeLink=new Fe(de,this),de.deps?(t.prevDep=de.depsTail,de.depsTail.nextDep=t,de.depsTail=t):de.deps=de.depsTail=t,je(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=de.depsTail,t.nextDep=void 0,de.depsTail.nextDep=t,de.depsTail=t,de.deps===t&&(de.deps=e)}return t}trigger(e){this.version++,Le++,this.notify(e)}notify(e){_e();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{xe()}}}function je(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)je(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const $e=new WeakMap,He=Symbol(""),Ve=Symbol(""),Ue=Symbol("");function qe(e,t,n){if(Ne&&de){let t=$e.get(e);t||$e.set(e,t=new Map);let o=t.get(n);o||(t.set(n,o=new Be),o.target=e,o.map=t,o.key=n),o.track()}}function We(e,t,n,o,r,s){const i=$e.get(e);if(!i)return void Le++;const l=e=>{e&&e.trigger()};if(_e(),"clear"===t)i.forEach(l);else{const r=f(e),s=r&&I(n);if(r&&"length"===n){const e=Number(o);i.forEach(((t,n)=>{("length"===n||n===Ue||!b(n)&&n>=e)&&l(t)}))}else switch(void 0!==n&&l(i.get(n)),s&&l(i.get(Ue)),t){case"add":r?s&&l(i.get("length")):(l(i.get(He)),h(e)&&l(i.get(Ve)));break;case"delete":r||(l(i.get(He)),h(e)&&l(i.get(Ve)));break;case"set":h(e)&&l(i.get(He))}}xe()}function Ge(e){const t=Gt(e);return t===e?t:(qe(t,0,Ue),qt(e)?t:t.map(Kt))}function ze(e){return qe(e=Gt(e),0,Ue),e}const Ke={__proto__:null,[Symbol.iterator](){return Je(this,Symbol.iterator,Kt)},concat(...e){return Ge(this).concat(...e.map((e=>f(e)?Ge(e):e)))},entries(){return Je(this,"entries",(e=>(e[1]=Kt(e[1]),e)))},every(e,t){return Ye(this,"every",e,t,void 0,arguments)},filter(e,t){return Ye(this,"filter",e,t,(e=>e.map(Kt)),arguments)},find(e,t){return Ye(this,"find",e,t,Kt,arguments)},findIndex(e,t){return Ye(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Ye(this,"findLast",e,t,Kt,arguments)},findLastIndex(e,t){return Ye(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Ye(this,"forEach",e,t,void 0,arguments)},includes(...e){return Ze(this,"includes",e)},indexOf(...e){return Ze(this,"indexOf",e)},join(e){return Ge(this).join(e)},lastIndexOf(...e){return Ze(this,"lastIndexOf",e)},map(e,t){return Ye(this,"map",e,t,void 0,arguments)},pop(){return et(this,"pop")},push(...e){return et(this,"push",e)},reduce(e,...t){return Qe(this,"reduce",e,t)},reduceRight(e,...t){return Qe(this,"reduceRight",e,t)},shift(){return et(this,"shift")},some(e,t){return Ye(this,"some",e,t,void 0,arguments)},splice(...e){return et(this,"splice",e)},toReversed(){return Ge(this).toReversed()},toSorted(e){return Ge(this).toSorted(e)},toSpliced(...e){return Ge(this).toSpliced(...e)},unshift(...e){return et(this,"unshift",e)},values(){return Je(this,"values",Kt)}};function Je(e,t,n){const o=ze(e),r=o[t]();return o===e||qt(e)||(r._next=r.next,r.next=()=>{const e=r._next();return e.value&&(e.value=n(e.value)),e}),r}const Xe=Array.prototype;function Ye(e,t,n,o,r,s){const i=ze(e),l=i!==e&&!qt(e),c=i[t];if(c!==Xe[t]){const t=c.apply(e,s);return l?Kt(t):t}let a=n;i!==e&&(l?a=function(t,o){return n.call(this,Kt(t),o,e)}:n.length>2&&(a=function(t,o){return n.call(this,t,o,e)}));const u=c.call(i,a,o);return l&&r?r(u):u}function Qe(e,t,n,o){const r=ze(e);let s=n;return r!==e&&(qt(e)?n.length>3&&(s=function(t,o,r){return n.call(this,t,o,r,e)}):s=function(t,o,r){return n.call(this,t,Kt(o),r,e)}),r[t](s,...o)}function Ze(e,t,n){const o=Gt(e);qe(o,0,Ue);const r=o[t](...n);return-1!==r&&!1!==r||!Wt(n[0])?r:(n[0]=Gt(n[0]),o[t](...n))}function et(e,t,n=[]){Pe(),_e();const o=Gt(e)[t].apply(e,n);return xe(),Re(),o}const tt=n("__proto__,__v_isRef,__isVue"),nt=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(b));function ot(e){b(e)||(e=String(e));const t=Gt(this);return qe(t,0,e),t.hasOwnProperty(e)}class rt{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?Lt:Mt:r?Rt:Pt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=f(e);if(!o){let e;if(s&&(e=Ke[t]))return e;if("hasOwnProperty"===t)return ot}const i=Reflect.get(e,t,Xt(e)?e:n);return(b(t)?nt.has(t):tt(t))?i:(o||qe(e,0,t),r?i:Xt(i)?s&&I(t)?i:i.value:S(i)?o?jt(i):Ft(i):i)}}class st extends rt{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._isShallow){const t=Ut(r);if(qt(n)||Ut(n)||(r=Gt(r),n=Gt(n)),!f(e)&&Xt(r)&&!Xt(n))return!t&&(r.value=n,!0)}const s=f(e)&&I(t)?Number(t)e,pt=e=>Reflect.getPrototypeOf(e);function ft(e,t,n=!1,o=!1){const r=Gt(e=e.__v_raw),s=Gt(t);n||(L(t,s)&&qe(r,0,t),qe(r,0,s));const{has:i}=pt(r),l=o?dt:n?Jt:Kt;return i.call(r,t)?l(e.get(t)):i.call(r,s)?l(e.get(s)):void(e!==r&&e.get(t))}function ht(e,t=!1){const n=this.__v_raw,o=Gt(n),r=Gt(e);return t||(L(e,r)&&qe(o,0,e),qe(o,0,r)),e===r?n.has(e):n.has(e)||n.has(r)}function mt(e,t=!1){return e=e.__v_raw,!t&&qe(Gt(e),0,He),Reflect.get(e,"size",e)}function gt(e,t=!1){t||qt(e)||Ut(e)||(e=Gt(e));const n=Gt(this);return pt(n).has.call(n,e)||(n.add(e),We(n,"add",e,e)),this}function vt(e,t,n=!1){n||qt(t)||Ut(t)||(t=Gt(t));const o=Gt(this),{has:r,get:s}=pt(o);let i=r.call(o,e);i||(e=Gt(e),i=r.call(o,e));const l=s.call(o,e);return o.set(e,t),i?L(t,l)&&We(o,"set",e,t):We(o,"add",e,t),this}function yt(e){const t=Gt(this),{has:n,get:o}=pt(t);let r=n.call(t,e);r||(e=Gt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&We(t,"delete",e,void 0),s}function bt(){const e=Gt(this),t=0!==e.size,n=e.clear();return t&&We(e,"clear",void 0,void 0),n}function St(e,t){return function(n,o){const r=this,s=r.__v_raw,i=Gt(s),l=t?dt:e?Jt:Kt;return!e&&qe(i,0,He),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}}function _t(e,t,n){return function(...o){const r=this.__v_raw,s=Gt(r),i=h(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?dt:t?Jt:Kt;return!t&&qe(s,0,c?Ve:He),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}function xt(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function Ct(){const e={get(e){return ft(this,e)},get size(){return mt(this)},has:ht,add:gt,set:vt,delete:yt,clear:bt,forEach:St(!1,!1)},t={get(e){return ft(this,e,!1,!0)},get size(){return mt(this)},has:ht,add(e){return gt.call(this,e,!0)},set(e,t){return vt.call(this,e,t,!0)},delete:yt,clear:bt,forEach:St(!1,!0)},n={get(e){return ft(this,e,!0)},get size(){return mt(this,!0)},has(e){return ht.call(this,e,!0)},add:xt("add"),set:xt("set"),delete:xt("delete"),clear:xt("clear"),forEach:St(!0,!1)},o={get(e){return ft(this,e,!0,!0)},get size(){return mt(this,!0)},has(e){return ht.call(this,e,!0)},add:xt("add"),set:xt("set"),delete:xt("delete"),clear:xt("clear"),forEach:St(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach((r=>{e[r]=_t(r,!1,!1),n[r]=_t(r,!0,!1),t[r]=_t(r,!1,!0),o[r]=_t(r,!0,!0)})),[e,n,t,o]}const[wt,kt,It,Tt]=Ct();function Et(e,t){const n=t?e?Tt:It:e?kt:wt;return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(p(n,o)&&o in t?n:t,o,r)}const Dt={get:Et(!1,!1)},At={get:Et(!1,!0)},Nt={get:Et(!0,!1)},Ot={get:Et(!0,!0)},Pt=new WeakMap,Rt=new WeakMap,Mt=new WeakMap,Lt=new WeakMap;function Ft(e){return Ut(e)?e:Ht(e,!1,lt,Dt,Pt)}function Bt(e){return Ht(e,!1,at,At,Rt)}function jt(e){return Ht(e,!0,ct,Nt,Mt)}function $t(e){return Ht(e,!0,ut,Ot,Lt)}function Ht(e,t,n,o,r){if(!S(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(w(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?o:n);return r.set(e,c),c}function Vt(e){return Ut(e)?Vt(e.__v_raw):!(!e||!e.__v_isReactive)}function Ut(e){return!(!e||!e.__v_isReadonly)}function qt(e){return!(!e||!e.__v_isShallow)}function Wt(e){return!!e&&!!e.__v_raw}function Gt(e){const t=e&&e.__v_raw;return t?Gt(t):e}function zt(e){return!p(e,"__v_skip")&&Object.isExtensible(e)&&B(e,"__v_skip",!0),e}const Kt=e=>S(e)?Ft(e):e,Jt=e=>S(e)?jt(e):e;function Xt(e){return!!e&&!0===e.__v_isRef}function Yt(e){return Zt(e,!1)}function Qt(e){return Zt(e,!0)}function Zt(e,t){return Xt(e)?e:new en(e,t)}class en{constructor(e,t){this.dep=new Be,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Gt(e),this._value=t?e:Kt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||qt(e)||Ut(e);e=n?e:Gt(e),L(e,t)&&(this._rawValue=e,this._value=n?e:Kt(e),this.dep.trigger())}}function tn(e){e.dep&&e.dep.trigger()}function nn(e){return Xt(e)?e.value:e}function on(e){return v(e)?e():nn(e)}const rn={get:(e,t,n)=>"__v_raw"===t?e:nn(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Xt(r)&&!Xt(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function sn(e){return Vt(e)?e:new Proxy(e,rn)}class ln{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new Be,{get:n,set:o}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=o}get value(){return this._value=this._get()}set value(e){this._set(e)}}function cn(e){return new ln(e)}function an(e){const t=f(e)?new Array(e.length):{};for(const n in e)t[n]=fn(e,n);return t}class un{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){const n=$e.get(e);return n&&n.get(t)}(Gt(this._object),this._key)}}class dn{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function pn(e,t,n){return Xt(e)?e:v(e)?new dn(e):S(e)&&arguments.length>1?fn(e,t,n):Yt(e)}function fn(e,t,n){const o=e[t];return Xt(o)?o:new un(e,t,n)}class hn{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new Be(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Le-1,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags||de===this))return Se(this),!0}get value(){const e=this.dep.track();return Ie(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const mn={GET:"get",HAS:"has",ITERATE:"iterate"},gn={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},vn={},yn=new WeakMap;let bn;function Sn(){return bn}function _n(e,t=!1,n=bn){if(n){let t=yn.get(n);t||yn.set(n,t=[]),t.push(e)}}function xn(e,t=1/0,n){if(t<=0||!S(e)||e.__v_skip)return e;if((n=n||new Set).has(e))return e;if(n.add(e),t--,Xt(e))xn(e.value,t,n);else if(f(e))for(let o=0;o{xn(e,t,n)}));else if(k(e)){for(const o in e)xn(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&xn(e[o],t,n)}return e}const Cn=[];function wn(e,t){}const kn={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function In(e,t,n,o){try{return o?e(...o):e()}catch(e){En(e,t,n)}}function Tn(e,t,n,o){if(v(e)){const r=In(e,t,n,o);return r&&_(r)&&r.catch((e=>{En(e,t,n)})),r}if(f(e)){const r=[];for(let s=0;s=qn(n)?Nn.push(e):Nn.splice(function(e){let t=Dn?On+1:0,n=Nn.length;for(;t>>1,r=Nn[o],s=qn(r);sqn(e)-qn(t)));if(Pn.length=0,Rn)return void Rn.push(...e);for(Rn=e,Mn=0;Mnnull==e.id?2&e.flags?-1:1/0:e.id;function Wn(e){An=!1,Dn=!0;try{for(On=0;Onto;function to(e,t=Jn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&xi(-1);const r=Yn(t);let s;try{s=e(...n)}finally{Yn(r),o._d&&xi(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function no(e,t){if(null===Jn)return e;const n=al(Jn),r=e.dirs||(e.dirs=[]);for(let e=0;ee.__isTeleport,io=e=>e&&(e.disabled||""===e.disabled),lo=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,co=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,ao=(e,t)=>{const n=e&&e.to;return y(n)?t?t(n):null:n};function uo(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,d=2===s;if(d&&o(i,t,n),(!d||io(u))&&16&c)for(let e=0;e{16&y&&(r&&r.isCE&&(r.ce._teleportTarget=e),u(b,e,t,r,s,i,l,c))},p=()=>{const e=t.target=ao(t.props,h),n=ho(e,t,m,f);e&&("svg"!==i&&lo(e)?i="svg":"mathml"!==i&&co(e)&&(i="mathml"),v||(d(e,n),fo(t)))};v&&(d(n,a),fo(t)),(_=t.props)&&(_.defer||""===_.defer)?Ds(p,s):p()}else{t.el=e.el,t.targetStart=e.targetStart;const o=t.anchor=e.anchor,u=t.target=e.target,f=t.targetAnchor=e.targetAnchor,m=io(e.props),g=m?n:u,y=m?o:f;if("svg"===i||lo(u)?i="svg":("mathml"===i||co(u))&&(i="mathml"),S?(p(e.dynamicChildren,S,g,r,s,i,l),Ls(e,t,!0)):c||d(e,t,g,y,r,s,i,l,!1),v)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):uo(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=ao(t.props,h);e&&uo(t,e,null,a,0)}else m&&uo(t,u,f,a,1);fo(t)}var _},remove(e,t,n,{um:o,o:{remove:r}},s){const{shapeFlag:i,children:l,anchor:c,targetStart:a,targetAnchor:u,target:d,props:p}=e;if(d&&(r(a),r(u)),s&&r(c),16&i){const e=s||!io(p);for(let r=0;r{e.isMounted=!0})),ur((()=>{e.isUnmounting=!0})),e}const yo=[Function,Array],bo={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:yo,onEnter:yo,onAfterEnter:yo,onEnterCancelled:yo,onBeforeLeave:yo,onLeave:yo,onAfterLeave:yo,onLeaveCancelled:yo,onBeforeAppear:yo,onAppear:yo,onAfterAppear:yo,onAppearCancelled:yo},So=e=>{const t=e.subTree;return t.component?So(t.component):t};function _o(e){let t=e[0];if(e.length>1){let n=!1;for(const o of e)if(o.type!==hi){t=o,n=!0;break}}return t}const xo={name:"BaseTransition",props:bo,setup(e,{slots:t}){const n=zi(),o=vo();return()=>{const r=t.default&&Eo(t.default(),!0);if(!r||!r.length)return;const s=_o(r),i=Gt(e),{mode:l}=i;if(o.isLeaving)return ko(s);const c=Io(s);if(!c)return ko(s);let a=wo(c,i,o,n,(e=>a=e));c.type!==hi&&To(c,a);const u=n.subTree,d=u&&Io(u);if(d&&d.type!==hi&&!Ti(c,d)&&So(n).type!==hi){const e=wo(d,i,o,n);if(To(d,e),"out-in"===l&&c.type!==hi)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave},ko(s);"in-out"===l&&c.type!==hi&&(e.delayLeave=(e,t,n)=>{Co(o,d)[String(d.key)]=d,e[mo]=()=>{t(),e[mo]=void 0,delete a.delayedLeave},a.delayedLeave=n})}return s}}};function Co(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function wo(e,t,n,o,r){const{appear:s,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:a,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:m,onLeaveCancelled:g,onBeforeAppear:v,onAppear:y,onAfterAppear:b,onAppearCancelled:S}=t,_=String(e.key),x=Co(n,e),C=(e,t)=>{e&&Tn(e,o,9,t)},w=(e,t)=>{const n=t[1];C(e,t),f(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},k={mode:i,persisted:l,beforeEnter(t){let o=c;if(!n.isMounted){if(!s)return;o=v||c}t[mo]&&t[mo](!0);const r=x[_];r&&Ti(e,r)&&r.el[mo]&&r.el[mo](),C(o,[t])},enter(e){let t=a,o=u,r=d;if(!n.isMounted){if(!s)return;t=y||a,o=b||u,r=S||d}let i=!1;const l=e[go]=t=>{i||(i=!0,C(t?r:o,[e]),k.delayedLeave&&k.delayedLeave(),e[go]=void 0)};t?w(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t[go]&&t[go](!0),n.isUnmounting)return o();C(p,[t]);let s=!1;const i=t[mo]=n=>{s||(s=!0,o(),C(n?g:m,[t]),t[mo]=void 0,x[r]===e&&delete x[r])};x[r]=e,h?w(h,[t,i]):i()},clone(e){const s=wo(e,t,n,o,r);return r&&r(s),s}};return k}function ko(e){if(Jo(e))return(e=Ri(e)).children=null,e}function Io(e){if(!Jo(e))return so(e.type)&&e.children?_o(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&v(n.default))return n.default()}}function To(e,t){6&e.shapeFlag&&e.component?(e.transition=t,To(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Eo(e,t=!1,n){let o=[],r=0;for(let s=0;s1)for(let e=0;ea({name:e.name},t,{setup:e}))():e}function Ao(){const e=zi();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function No(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function Oo(e){const t=zi(),n=Qt(null);if(t){const r=t.refs===o?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e})}return n}function Po(e,t,n,r,s=!1){if(f(e))return void e.forEach(((e,o)=>Po(e,t&&(f(t)?t[o]:t),n,r,s)));if(Go(r)&&!s)return;const i=4&r.shapeFlag?al(r.component):r.el,l=s?null:i,{i:c,r:a}=e,d=t&&t.r,h=c.refs===o?c.refs={}:c.refs,m=c.setupState,g=Gt(m),b=m===o?()=>!1:e=>p(g,e);if(null!=d&&d!==a&&(y(d)?(h[d]=null,b(d)&&(m[d]=null)):Xt(d)&&(d.value=null)),v(a))In(a,c,12,[l,h]);else{const t=y(a),o=Xt(a);if(t||o){const r=()=>{if(e.f){const n=t?b(a)?m[a]:h[a]:a.value;s?f(n)&&u(n,i):f(n)?n.includes(i)||n.push(i):t?(h[a]=[i],b(a)&&(m[a]=h[a])):(a.value=[i],e.k&&(h[e.k]=a.value))}else t?(h[a]=l,b(a)&&(m[a]=l)):o&&(a.value=l,e.k&&(h[e.k]=l))};l?(r.id=-1,Ds(r,n)):r()}}}let Ro=!1;const Mo=()=>{Ro||(console.error("Hydration completed but contains mismatches."),Ro=!0)},Lo=e=>{if(1===e.nodeType)return(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0},Fo=e=>8===e.nodeType;function Bo(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:c,insert:a,createComment:u}}=e,d=(n,o,l,c,u,b=!1)=>{b=b||!!o.dynamicChildren;const S=Fo(n)&&"["===n.data,_=()=>m(n,o,l,c,u,S),{type:x,ref:C,shapeFlag:w,patchFlag:k}=o;let I=n.nodeType;o.el=n,-2===k&&(b=!1,o.dynamicChildren=null);let T=null;switch(x){case fi:3!==I?""===o.children?(a(o.el=r(""),i(n),n),T=n):T=_():(n.data!==o.children&&(Mo(),n.data=o.children),T=s(n));break;case hi:y(n)?(T=s(n),v(o.el=n.content.firstChild,n,l)):T=8!==I||S?_():s(n);break;case mi:if(S&&(I=(n=s(n)).nodeType),1===I||3===I){T=n;const e=!o.children.length;for(let t=0;t{i=i||!!t.dynamicChildren;const{type:a,props:u,patchFlag:d,shapeFlag:p,dirs:h,transition:m}=t,g="input"===a||"option"===a;if(g||-1!==d){h&&oo(t,null,n,"created");let a,b=!1;if(y(e)){b=Ms(r,m)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;b&&m.beforeEnter(o),v(o,e,n),t.el=e=o}if(16&p&&(!u||!u.innerHTML&&!u.textContent)){let o=f(e.firstChild,t,e,n,r,s,i);for(;o;){Ho(e,1)||Mo();const t=o;o=o.nextSibling,c(t)}}else if(8&p){let n=t.children;"\n"!==n[0]||"PRE"!==e.tagName&&"TEXTAREA"!==e.tagName||(n=n.slice(1)),e.textContent!==n&&(Ho(e,0)||Mo(),e.textContent=t.children)}if(u)if(g||!i||48&d){const t=e.tagName.includes("-");for(const r in u)(g&&(r.endsWith("value")||"indeterminate"===r)||l(r)&&!T(r)||"."===r[0]||t)&&o(e,r,null,u[r],void 0,n)}else if(u.onClick)o(e,"onClick",null,u.onClick,void 0,n);else if(4&d&&Vt(u.style))for(const e in u.style)u.style[e];(a=u&&u.onVnodeBeforeMount)&&Vi(a,n,t),h&&oo(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||h||b)&&ui((()=>{a&&Vi(a,n,t),b&&m.enter(e),h&&oo(t,null,n,"mounted")}),r)}return e.nextSibling},f=(e,t,o,i,l,c,u)=>{u=u||!!t.dynamicChildren;const p=t.children,f=p.length;for(let t=0;t{const{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);const d=i(e),p=f(s(e),t,d,n,o,r,l);return p&&Fo(p)&&"]"===p.data?s(t.anchor=p):(Mo(),a(t.anchor=u("]"),d,p),p)},m=(e,t,o,r,l,a)=>{if(Ho(e.parentElement,1)||Mo(),t.el=null,a){const t=g(e);for(;;){const n=s(e);if(!n||n===t)break;c(n)}}const u=s(e),d=i(e);return c(e),n(null,t,d,u,o,r,Lo(d),l),u},g=(e,t="[",n="]")=>{let o=0;for(;e;)if((e=s(e))&&Fo(e)&&(e.data===t&&o++,e.data===n)){if(0===o)return s(e);o--}return e},v=(e,t,n)=>{const o=t.parentNode;o&&o.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},y=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),Un(),void(t._vnode=e);d(t.firstChild,e,null,null,null),Un(),t._vnode=e},d]}const jo="data-allow-mismatch",$o={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Ho(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(jo);)e=e.parentElement;const n=e&&e.getAttribute(jo);if(null==n)return!1;if(""===n)return!0;{const e=n.split(",");return!(0!==t||!e.includes("children"))||n.split(",").includes($o[t])}}const Vo=(e=1e4)=>t=>{const n=requestIdleCallback(t,{timeout:e});return()=>cancelIdleCallback(n)},Uo=e=>(t,n)=>{const o=new IntersectionObserver((e=>{for(const n of e)if(n.isIntersecting){o.disconnect(),t();break}}),e);return n((e=>{if(e instanceof Element)return function(e){const{top:t,left:n,bottom:o,right:r}=e.getBoundingClientRect(),{innerHeight:s,innerWidth:i}=window;return(t>0&&t0&&o0&&n0&&ro.disconnect()},qo=e=>t=>{if(e){const n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},Wo=(e=[])=>(t,n)=>{y(e)&&(e=[e]);let o=!1;const r=e=>{o||(o=!0,s(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},s=()=>{n((t=>{for(const n of e)t.removeEventListener(n,r)}))};return n((t=>{for(const n of e)t.addEventListener(n,r,{once:!0})})),s},Go=e=>!!e.type.__asyncLoader;function zo(e){v(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,hydrate:s,timeout:i,suspensible:l=!0,onError:c}=e;let a,u=null,d=0;const p=()=>{let e;return u||(e=u=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),c)return new Promise(((t,n)=>{c(e,(()=>t((d++,u=null,p()))),(()=>n(e)),d+1)}));throw e})).then((t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),a=t,t))))};return Do({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(e,t,n){const o=s?()=>{const o=s(n,(t=>function(e,t){if(Fo(e)&&"["===e.data){let n=1,o=e.nextSibling;for(;o;){if(1===o.nodeType){if(!1===t(o))break}else if(Fo(o))if("]"===o.data){if(0==--n)break}else"["===o.data&&n++;o=o.nextSibling}}else t(e)}(e,t)));o&&(t.bum||(t.bum=[])).push(o)}:n;a?o():p().then((()=>!t.isUnmounted&&o()))},get __asyncResolved(){return a},setup(){const e=Gi;if(No(e),a)return()=>Ko(a,e);const t=t=>{u=null,En(t,e,13,!o)};if(l&&e.suspense||tl)return p().then((t=>()=>Ko(t,e))).catch((e=>(t(e),()=>o?Oi(o,{error:e}):null)));const s=Yt(!1),c=Yt(),d=Yt(!!r);return r&&setTimeout((()=>{d.value=!1}),r),null!=i&&setTimeout((()=>{if(!s.value&&!c.value){const e=new Error(`Async component timed out after ${i}ms.`);t(e),c.value=e}}),i),p().then((()=>{s.value=!0,e.parent&&Jo(e.parent.vnode)&&e.parent.update()})).catch((e=>{t(e),c.value=e})),()=>s.value&&a?Ko(a,e):c.value&&o?Oi(o,{error:c.value}):n&&!d.value?Oi(n):void 0}})}function Ko(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=Oi(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const Jo=e=>e.type.__isKeepAlive,Xo={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=zi(),o=n.ctx;if(!o.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:d}}}=o,p=d("div");function f(e){nr(e),u(e,n,l,!0)}function h(e){r.forEach(((t,n)=>{const o=ul(t.type);o&&!e(o)&&m(n)}))}function m(e){const t=r.get(e);!t||i&&Ti(t,i)?i&&nr(i):f(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),Ds((()=>{s.isDeactivated=!1,s.a&&F(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Vi(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;Bs(t.m),Bs(t.a),a(e,p,null,1,l),Ds((()=>{t.da&&F(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Vi(n,t.parent,e),t.isDeactivated=!0}),l)},qs((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>Yo(e,t))),t&&h((e=>!Yo(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&(ri(n.subTree.type)?Ds((()=>{r.set(g,or(n.subTree))}),n.subTree.suspense):r.set(g,or(n.subTree)))};return lr(v),ar(v),ur((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=or(t);if(e.type!==r.type||e.key!==r.key)f(e);else{nr(r);const e=r.component.da;e&&Ds(e,o)}}))})),()=>{if(g=null,!t.default)return i=null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!Ii(o)||!(4&o.shapeFlag||128&o.shapeFlag))return i=null,o;let l=or(o);if(l.type===hi)return i=null,l;const c=l.type,a=ul(Go(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:d,max:p}=e;if(u&&(!a||!Yo(u,a))||d&&a&&Yo(d,a))return l.shapeFlag&=-257,i=l,o;const f=null==l.key?c:l.key,h=r.get(f);return l.el&&(l=Ri(l),128&o.shapeFlag&&(o.ssContent=l)),g=f,h?(l.el=h.el,l.component=h.component,l.transition&&To(l,l.transition),l.shapeFlag|=512,s.delete(f),s.add(f)):(s.add(f),p&&s.size>parseInt(p,10)&&m(s.values().next().value)),l.shapeFlag|=256,i=l,ri(o.type)?o:l}}};function Yo(e,t){return f(e)?e.some((e=>Yo(e,t))):y(e)?e.split(",").includes(t):"[object RegExp]"===C(e)&&(e.lastIndex=0,e.test(t))}function Qo(e,t){er(e,"a",t)}function Zo(e,t){er(e,"da",t)}function er(e,t,n=Gi){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(rr(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Jo(e.parent.vnode)&&tr(o,t,n,e),e=e.parent}}function tr(e,t,n,o){const r=rr(t,e,o,!0);dr((()=>{u(o[t],r)}),n)}function nr(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function or(e){return 128&e.shapeFlag?e.ssContent:e}function rr(e,t,n=Gi,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{Pe();const r=Xi(n),s=Tn(t,n,e,o);return r(),Re(),s});return o?r.unshift(s):r.push(s),s}}const sr=e=>(t,n=Gi)=>{tl&&"sp"!==e||rr(e,((...e)=>t(...e)),n)},ir=sr("bm"),lr=sr("m"),cr=sr("bu"),ar=sr("u"),ur=sr("bum"),dr=sr("um"),pr=sr("sp"),fr=sr("rtg"),hr=sr("rtc");function mr(e,t=Gi){rr("ec",e,t)}const gr="components",vr="directives";function yr(e,t){return xr(gr,e,!0,t)||e}const br=Symbol.for("v-ndc");function Sr(e){return y(e)?xr(gr,e,!1)||e:e||br}function _r(e){return xr(vr,e)}function xr(e,t,n=!0,o=!1){const r=Jn||Gi;if(r){const n=r.type;if(e===gr){const e=ul(n,!1);if(e&&(e===t||e===N(t)||e===R(N(t))))return n}const s=Cr(r[e]||n[e],t)||Cr(r.appContext[e],t);return!s&&o?n:s}}function Cr(e,t){return e&&(e[t]||e[N(t)]||e[R(N(t))])}function wr(e,t,n,o){let r;const s=n&&n[o],i=f(e);if(i||y(e)){let n=!1;i&&Vt(e)&&(n=!qt(e),e=ze(e)),r=new Array(e.length);for(let o=0,i=e.length;ot(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e}function Ir(e,t,n={},o,r){if(Jn.ce||Jn.parent&&Go(Jn.parent)&&Jn.parent.ce)return"default"!==t&&(n.name=t),yi(),ki(pi,null,[Oi("slot",n,o&&o())],64);let s=e[t];s&&s._c&&(s._d=!1),yi();const i=s&&Tr(s(n)),l=ki(pi,{key:(n.key||i&&i.key||`_${t}`)+(!i&&o?"_fb":"")},i||(o?o():[]),i&&1===e._?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),s&&s._c&&(s._d=!0),l}function Tr(e){return e.some((e=>!Ii(e)||e.type!==hi&&!(e.type===pi&&!Tr(e.children))))?e:null}function Er(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:M(o)]=e[o];return n}const Dr=e=>e?Qi(e)?al(e):Dr(e.parent):null,Ar=a(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Dr(e.parent),$root:e=>Dr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Qr(e),$forceUpdate:e=>e.f||(e.f=()=>{jn(e.update)}),$nextTick:e=>e.n||(e.n=Bn.bind(e.proxy)),$watch:e=>Gs.bind(e)}),Nr=(e,t)=>e!==o&&!e.__isScriptSetup&&p(e,t),Or={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:l,type:c,appContext:a}=e;let u;if("$"!==t[0]){const c=l[t];if(void 0!==c)switch(c){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(Nr(r,t))return l[t]=1,r[t];if(s!==o&&p(s,t))return l[t]=2,s[t];if((u=e.propsOptions[0])&&p(u,t))return l[t]=3,i[t];if(n!==o&&p(n,t))return l[t]=4,n[t];Jr&&(l[t]=0)}}const d=Ar[t];let f,h;return d?("$attrs"===t&&qe(e.attrs,0,""),d(e)):(f=c.__cssModules)&&(f=f[t])?f:n!==o&&p(n,t)?(l[t]=4,n[t]):(h=a.config.globalProperties,p(h,t)?h[t]:void 0)},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return Nr(s,t)?(s[t]=n,!0):r!==o&&p(r,t)?(r[t]=n,!0):!(p(e.props,t)||"$"===t[0]&&t.slice(1)in e||(i[t]=n,0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:i}},l){let c;return!!n[l]||e!==o&&p(e,l)||Nr(t,l)||(c=i[0])&&p(c,l)||p(r,l)||p(Ar,l)||p(s.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:p(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Pr=a({},Or,{get(e,t){if(t!==Symbol.unscopables)return Or.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!q(t)});function Rr(){return null}function Mr(){return null}function Lr(e){}function Fr(e){}function Br(){return null}function jr(){}function $r(e,t){return null}function Hr(){return Ur().slots}function Vr(){return Ur().attrs}function Ur(){const e=zi();return e.setupContext||(e.setupContext=cl(e))}function qr(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function Wr(e,t){const n=qr(e);for(const e in t){if(e.startsWith("__skip"))continue;let o=n[e];o?f(o)||v(o)?o=n[e]={type:o,default:t[e]}:o.default=t[e]:null===o&&(o=n[e]={default:t[e]}),o&&t[`__skip_${e}`]&&(o.skipFactory=!0)}return n}function Gr(e,t){return e&&t?f(e)&&f(t)?e.concat(t):a({},qr(e),qr(t)):e||t}function zr(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function Kr(e){const t=zi();let n=e();return Yi(),_(n)&&(n=n.catch((e=>{throw Xi(t),e}))),[n,()=>Xi(t)]}let Jr=!0;function Xr(e,t,n){Tn(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Yr(e,t,n,o){let r=o.includes(".")?zs(n,o):()=>n[o];if(y(e)){const n=t[e];v(n)&&qs(r,n)}else if(v(e))qs(r,e.bind(n));else if(S(e))if(f(e))e.forEach((e=>Yr(e,t,n,o)));else{const o=v(e.handler)?e.handler.bind(n):t[e.handler];v(o)&&qs(r,o,e)}}function Qr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>Zr(c,e,i,!0))),Zr(c,t,i)):c=t,S(t)&&s.set(t,c),c}function Zr(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&Zr(e,s,n,!0),r&&r.forEach((t=>Zr(e,t,n,!0)));for(const r in t)if(o&&"expose"===r);else{const o=es[r]||n&&n[r];e[r]=o?o(e[r],t[r]):t[r]}return e}const es={data:ts,props:ss,emits:ss,methods:rs,computed:rs,beforeCreate:os,created:os,beforeMount:os,mounted:os,beforeUpdate:os,updated:os,beforeDestroy:os,beforeUnmount:os,destroyed:os,unmounted:os,activated:os,deactivated:os,errorCaptured:os,serverPrefetch:os,components:rs,directives:rs,watch:function(e,t){if(!e)return t;if(!t)return e;const n=a(Object.create(null),e);for(const o in t)n[o]=os(e[o],t[o]);return n},provide:ts,inject:function(e,t){return rs(ns(e),ns(t))}};function ts(e,t){return t?e?function(){return a(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function ns(e){if(f(e)){const t={};for(let n=0;n(s.has(e)||(e&&v(e.install)?(s.add(e),e.install(c,...t)):v(e)&&(s.add(e),e(c,...t))),c),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),c),component:(e,t)=>t?(r.components[e]=t,c):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,c):r.directives[e],mount(s,i,a){if(!l){const u=c._ceVNode||Oi(n,o);return u.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),i&&t?t(u,s):e(u,s,a),l=!0,c._container=s,s.__vue_app__=c,al(u.component)}},onUnmount(e){i.push(e)},unmount(){l&&(Tn(i,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,c),runWithContext(e){const t=as;as=c;try{return e()}finally{as=t}}};return c}}let as=null;function us(e,t){if(Gi){let n=Gi.provides;const o=Gi.parent&&Gi.parent.provides;o===n&&(n=Gi.provides=Object.create(o)),n[e]=t}}function ds(e,t,n=!1){const o=Gi||Jn;if(o||as){const r=as?as._context.provides:o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&v(t)?t.call(o&&o.proxy):t}}function ps(){return!!(Gi||Jn||as)}const fs={},hs=()=>Object.create(fs),ms=e=>Object.getPrototypeOf(e)===fs;function gs(e,t,n,r){const[s,i]=e.propsOptions;let l,c=!1;if(t)for(let o in t){if(T(o))continue;const a=t[o];let u;s&&p(s,u=N(o))?i&&i.includes(u)?(l||(l={}))[u]=a:n[u]=a:Qs(e.emitsOptions,o)||o in r&&a===r[o]||(r[o]=a,c=!0)}if(i){const t=Gt(n),r=l||o;for(let o=0;o{d=!0;const[n,o]=bs(e,t,!0);a(c,n),o&&u.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!l&&!d)return S(e)&&s.set(e,r),r;if(f(l))for(let e=0;e"_"===e[0]||"$stable"===e,xs=e=>f(e)?e.map(Bi):[Bi(e)],Cs=(e,t,n)=>{if(t._n)return t;const o=to(((...e)=>xs(t(...e))),n);return o._c=!1,o},ws=(e,t,n)=>{const o=e._ctx;for(const n in e){if(_s(n))continue;const r=e[n];if(v(r))t[n]=Cs(0,r,o);else if(null!=r){const e=xs(r);t[n]=()=>e}}},ks=(e,t)=>{const n=xs(t);e.slots.default=()=>n},Is=(e,t,n)=>{for(const o in t)(n||"_"!==o)&&(e[o]=t[o])},Ts=(e,t,n)=>{const o=e.slots=hs();if(32&e.vnode.shapeFlag){const e=t._;e?(Is(o,t,n),n&&B(o,"_",e,!0)):ws(t,o)}else t&&ks(e,t)},Es=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,l=o;if(32&r.shapeFlag){const e=t._;e?n&&1===e?i=!1:Is(s,t,n):(i=!t.$stable,ws(t,s)),l=t}else t&&(ks(e,t),l={default:1});if(i)for(const e in s)_s(e)||null!=l[e]||delete s[e]},Ds=ui;function As(e){return Os(e)}function Ns(e){return Os(e,Bo)}function Os(e,t){U().__VUE__=!0;const{insert:n,remove:i,patchProp:l,createElement:c,createText:a,createComment:u,setText:d,setElementText:f,parentNode:h,nextSibling:m,setScopeId:g=s,insertStaticContent:v}=e,y=(e,t,n,o=null,r=null,s=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Ti(e,t)&&(o=J(e),q(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:d}=t;switch(a){case fi:b(e,t,n,o);break;case hi:S(e,t,n,o);break;case mi:null==e&&_(t,n,o,i);break;case pi:A(e,t,n,o,r,s,i,l,c);break;default:1&d?x(e,t,n,o,r,s,i,l,c):6&d?O(e,t,n,o,r,s,i,l,c):(64&d||128&d)&&a.process(e,t,n,o,r,s,i,l,c,Q)}null!=u&&r&&Po(u,e&&e.ref,s,t||e,!t)},b=(e,t,o,r)=>{if(null==e)n(t.el=a(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},S=(e,t,o,r)=>{null==e?n(t.el=u(t.children||""),o,r):t.el=e.el},_=(e,t,n,o)=>{[e.el,e.anchor]=v(e.children,t,n,o,e.el,e.anchor)},x=(e,t,n,o,r,s,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?C(t,n,o,r,s,i,l,c):I(e,t,r,s,i,l,c)},C=(e,t,o,r,s,i,a,u)=>{let d,p;const{props:h,shapeFlag:m,transition:g,dirs:v}=e;if(d=e.el=c(e.type,i,h&&h.is,h),8&m?f(d,e.children):16&m&&k(e.children,d,null,r,s,Ps(e,i),a,u),v&&oo(e,null,r,"created"),w(d,e,e.scopeId,a,r),h){for(const e in h)"value"===e||T(e)||l(d,e,null,h[e],i,r);"value"in h&&l(d,"value",null,h.value,i),(p=h.onVnodeBeforeMount)&&Vi(p,r,e)}v&&oo(e,null,r,"beforeMount");const y=Ms(s,g);y&&g.beforeEnter(d),n(d,t,o),((p=h&&h.onVnodeMounted)||y||v)&&Ds((()=>{p&&Vi(p,r,e),y&&g.enter(d),v&&oo(e,null,r,"mounted")}),s)},w=(e,t,n,o,r)=>{if(n&&g(e,n),o)for(let t=0;t{for(let a=c;a{const a=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=t;u|=16&e.patchFlag;const h=e.props||o,m=t.props||o;let g;if(n&&Rs(n,!1),(g=m.onVnodeBeforeUpdate)&&Vi(g,n,t,e),p&&oo(t,e,n,"beforeUpdate"),n&&Rs(n,!0),(h.innerHTML&&null==m.innerHTML||h.textContent&&null==m.textContent)&&f(a,""),d?E(e.dynamicChildren,d,a,n,r,Ps(t,s),i):c||j(e,t,a,null,n,r,Ps(t,s),i,!1),u>0){if(16&u)D(a,h,m,n,s);else if(2&u&&h.class!==m.class&&l(a,"class",null,m.class,s),4&u&&l(a,"style",h.style,m.style,s),8&u){const e=t.dynamicProps;for(let t=0;t{g&&Vi(g,n,t,e),p&&oo(t,e,n,"updated")}),r)},E=(e,t,n,o,r,s,i)=>{for(let l=0;l{if(t!==n){if(t!==o)for(const o in t)T(o)||o in n||l(e,o,t[o],null,s,r);for(const o in n){if(T(o))continue;const i=n[o],c=t[o];i!==c&&"value"!==o&&l(e,o,c,i,s,r)}"value"in n&&l(e,"value",t.value,n.value,s)}},A=(e,t,o,r,s,i,l,c,u)=>{const d=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a("");let{patchFlag:f,dynamicChildren:h,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(n(d,o,r),n(p,o,r),k(t.children||[],o,p,s,i,l,c,u)):f>0&&64&f&&h&&e.dynamicChildren?(E(e.dynamicChildren,h,o,s,i,l,c),(null!=t.key||s&&t===s.subTree)&&Ls(e,t,!0)):j(e,t,o,p,s,i,l,c,u)},O=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):R(t,n,o,r,s,i,c):M(e,t,c)},R=(e,t,n,o,r,s,i)=>{const l=e.component=Wi(e,o,r);if(Jo(e)&&(l.ctx.renderer=Q),nl(l,!1,i),l.asyncDep){if(r&&r.registerDep(l,L,i),!e.el){const e=l.subTree=Oi(hi);S(null,e,t,n)}}else L(l,e,t,n,r,s,i)},M=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||ni(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?ni(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t{const l=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:c,vnode:a}=e;{const n=Fs(e);if(n)return t&&(t.el=a.el,B(e,t,i)),void n.asyncDep.then((()=>{e.isUnmounted||l()}))}let u,d=t;Rs(e,!1),t?(t.el=a.el,B(e,t,i)):t=a,n&&F(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Vi(u,c,t,a),Rs(e,!0);const p=Zs(e),f=e.subTree;e.subTree=p,y(f,p,h(f.el),J(f),e,r,s),t.el=p.el,null===d&&oi(e,p.el),o&&Ds(o,r),(u=t.props&&t.props.onVnodeUpdated)&&Ds((()=>Vi(u,c,t,a)),r)}else{let i;const{el:l,props:c}=t,{bm:a,m:u,parent:d,root:p,type:f}=e,h=Go(t);if(Rs(e,!1),a&&F(a),!h&&(i=c&&c.onVnodeBeforeMount)&&Vi(i,d,t),Rs(e,!0),l&&ee){const t=()=>{e.subTree=Zs(e),ee(l,e.subTree,e,r,null)};h&&f.__asyncHydrate?f.__asyncHydrate(l,e,t):t()}else{p.ce&&p.ce._injectChildStyle(f);const i=e.subTree=Zs(e);y(null,i,n,o,e,r,s),t.el=i.el}if(u&&Ds(u,r),!h&&(i=c&&c.onVnodeMounted)){const e=t;Ds((()=>Vi(i,d,e)),r)}(256&t.shapeFlag||d&&Go(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&Ds(e.a,r),e.isMounted=!0,t=n=o=null}};e.scope.on();const c=e.effect=new ve(l);e.scope.off();const a=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>jn(u),Rs(e,!0),a()},B=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=Gt(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;gs(e,t,r,s)&&(a=!0);for(const s in l)t&&(p(t,s)||(o=P(s))!==s&&p(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=vs(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&p(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o{const a=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void H(a,d,n,o,r,s,i,l,c);if(256&p)return void $(a,d,n,o,r,s,i,l,c)}8&h?(16&u&&K(a,r,s),d!==a&&f(n,d)):16&u?16&h?H(a,d,n,o,r,s,i,l,c):K(a,r,s,!0):(8&u&&f(n,""),16&h&&k(d,n,o,r,s,i,l,c))},$=(e,t,n,o,s,i,l,c,a)=>{t=t||r;const u=(e=e||r).length,d=t.length,p=Math.min(u,d);let f;for(f=0;fd?K(e,s,i,!0,!1,p):k(t,n,o,s,i,l,c,a,p)},H=(e,t,n,o,s,i,l,c,a)=>{let u=0;const d=t.length;let p=e.length-1,f=d-1;for(;u<=p&&u<=f;){const o=e[u],r=t[u]=a?ji(t[u]):Bi(t[u]);if(!Ti(o,r))break;y(o,r,n,null,s,i,l,c,a),u++}for(;u<=p&&u<=f;){const o=e[p],r=t[f]=a?ji(t[f]):Bi(t[f]);if(!Ti(o,r))break;y(o,r,n,null,s,i,l,c,a),p--,f--}if(u>p){if(u<=f){const e=f+1,r=ef)for(;u<=p;)q(e[u],s,i,!0),u++;else{const h=u,m=u,g=new Map;for(u=m;u<=f;u++){const e=t[u]=a?ji(t[u]):Bi(t[u]);null!=e.key&&g.set(e.key,u)}let v,b=0;const S=f-m+1;let _=!1,x=0;const C=new Array(S);for(u=0;u=S){q(o,s,i,!0);continue}let r;if(null!=o.key)r=g.get(o.key);else for(v=m;v<=f;v++)if(0===C[v-m]&&Ti(o,t[v])){r=v;break}void 0===r?q(o,s,i,!0):(C[r-m]=u+1,r>=x?x=r:_=!0,y(o,t[r],n,null,s,i,l,c,a),b++)}const w=_?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o>1,e[n[l]]0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}(C):r;for(v=w.length-1,u=S-1;u>=0;u--){const e=m+u,r=t[e],p=e+1{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)V(e.component.subTree,t,o,r);else if(128&u)e.suspense.move(t,o,r);else if(64&u)l.move(e,t,o,Q);else if(l!==pi)if(l!==mi)if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(i),n(i,t,o),Ds((()=>c.enter(i)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,l=()=>n(i,t,o),a=()=>{e(i,(()=>{l(),s&&s()}))};r?r(i,l,a):a()}else n(i,t,o);else(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=m(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);else{n(i,t,o);for(let e=0;e{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:d,dirs:p,cacheIndex:f}=e;if(-2===d&&(r=!1),null!=l&&Po(l,null,n,e,!0),null!=f&&(t.renderCache[f]=void 0),256&u)return void t.ctx.deactivate(e);const h=1&u&&p,m=!Go(e);let g;if(m&&(g=i&&i.onVnodeBeforeUnmount)&&Vi(g,t,e),6&u)z(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);h&&oo(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,Q,o):a&&!a.hasOnce&&(s!==pi||d>0&&64&d)?K(a,t,n,!1,!0):(s===pi&&384&d||!r&&16&u)&&K(c,t,n),o&&W(e)}(m&&(g=i&&i.onVnodeUnmounted)||h)&&Ds((()=>{g&&Vi(g,t,e),h&&oo(e,null,t,"unmounted")}),n)},W=e=>{const{type:t,el:n,anchor:o,transition:r}=e;if(t===pi)return void G(n,o);if(t===mi)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),i(e),e=n;i(t)})(e);const s=()=>{i(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:o}=r,i=()=>t(n,s);o?o(e.el,s,i):i()}else s()},G=(e,t)=>{let n;for(;e!==t;)n=m(e),i(e),e=n;i(t)},z=(e,t,n)=>{const{bum:o,scope:r,job:s,subTree:i,um:l,m:c,a}=e;Bs(c),Bs(a),o&&F(o),r.stop(),s&&(s.flags|=8,q(i,e,t,n)),l&&Ds(l,t),Ds((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},K=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i{if(6&e.shapeFlag)return J(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=m(e.anchor||e.el),n=t&&t[ro];return n?m(n):t};let X=!1;const Y=(e,t,n)=>{null==e?t._vnode&&q(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,n),t._vnode=e,X||(X=!0,Vn(),Un(),X=!1)},Q={p:y,um:q,m:V,r:W,mt:R,mc:k,pc:j,pbc:E,n:J,o:e};let Z,ee;return t&&([Z,ee]=t(Q)),{render:Y,hydrate:Z,createApp:cs(Y,Z)}}function Ps({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function Rs({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Ms(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Ls(e,t,n=!1){const o=e.children,r=t.children;if(f(o)&&f(r))for(let e=0;eds(js);function Hs(e,t){return Ws(e,null,t)}function Vs(e,t){return Ws(e,null,{flush:"post"})}function Us(e,t){return Ws(e,null,{flush:"sync"})}function qs(e,t,n){return Ws(e,t,n)}function Ws(e,t,n=o){const{immediate:r,deep:i,flush:l,once:c}=n,d=a({},n);let p;if(tl)if("sync"===l){const e=$s();p=e.__watcherHandles||(e.__watcherHandles=[])}else{if(t&&!r){const e=()=>{};return e.stop=s,e.resume=s,e.pause=s,e}d.once=!0}const h=Gi;d.call=(e,t,n)=>Tn(e,h,t,n);let m=!1;"post"===l?d.scheduler=e=>{Ds(e,h&&h.suspense)}:"sync"!==l&&(m=!0,d.scheduler=(e,t)=>{t?e():jn(e)}),d.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,h&&(e.id=h.uid,e.i=h))};const g=function(e,t,n=o){const{immediate:r,deep:i,once:l,scheduler:c,augmentJob:a,call:d}=n,p=e=>i?e:qt(e)||!1===i||0===i?xn(e,1):xn(e);let h,m,g,y,b=!1,S=!1;if(Xt(e)?(m=()=>e.value,b=qt(e)):Vt(e)?(m=()=>p(e),b=!0):f(e)?(S=!0,b=e.some((e=>Vt(e)||qt(e))),m=()=>e.map((e=>Xt(e)?e.value:Vt(e)?p(e):v(e)?d?d(e,2):e():void 0))):m=v(e)?t?d?()=>d(e,2):e:()=>{if(g){Pe();try{g()}finally{Re()}}const t=bn;bn=h;try{return d?d(e,3,[y]):e(y)}finally{bn=t}}:s,t&&i){const e=m,t=!0===i?1/0:i;m=()=>xn(e(),t)}const _=he(),x=()=>{h.stop(),_&&u(_.effects,h)};if(l&&t){const e=t;t=(...t)=>{e(...t),x()}}let C=S?new Array(e.length).fill(vn):vn;const w=e=>{if(1&h.flags&&(h.dirty||e))if(t){const e=h.run();if(i||b||(S?e.some(((e,t)=>L(e,C[t]))):L(e,C))){g&&g();const n=bn;bn=h;try{const n=[e,C===vn?void 0:S&&C[0]===vn?[]:C,y];d?d(t,3,n):t(...n),C=e}finally{bn=n}}}else h.run()};return a&&a(w),h=new ve(m),h.scheduler=c?()=>c(w,!1):w,y=e=>_n(e,!1,h),g=h.onStop=()=>{const e=yn.get(h);if(e){if(d)d(e,4);else for(const t of e)t();yn.delete(h)}},t?r?w(!0):C=h.run():c?c(w.bind(null,!0),!0):h.run(),x.pause=h.pause.bind(h),x.resume=h.resume.bind(h),x.stop=x,x}(e,t,d);return p&&p.push(g),g}function Gs(e,t,n){const o=this.proxy,r=y(e)?e.includes(".")?zs(o,e):()=>o[e]:e.bind(o,o);let s;v(t)?s=t:(s=t.handler,n=t);const i=Xi(this),l=Ws(r,s.bind(o),n);return i(),l}function zs(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{let a,u,d=o;return Us((()=>{const n=e[t];L(a,n)&&(a=n,c())})),{get:()=>(l(),n.get?n.get(a):a),set(e){const l=n.set?n.set(e):e;if(!(L(l,a)||d!==o&&L(e,d)))return;const p=r.vnode.props;p&&(t in p||s in p||i in p)&&(`onUpdate:${t}`in p||`onUpdate:${s}`in p||`onUpdate:${i}`in p)||(a=e,c()),r.emit(`update:${t}`,l),L(e,l)&&L(e,d)&&!L(l,u)&&c(),d=e,u=l}}}));return c[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?l||o:c,done:!1}:{done:!0}}},c}const Js=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${N(t)}Modifiers`]||e[`${P(t)}Modifiers`];function Xs(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||o;let s=n;const i=t.startsWith("update:"),l=i&&Js(r,t.slice(7));let c;l&&(l.trim&&(s=n.map((e=>y(e)?e.trim():e))),l.number&&(s=n.map(j)));let a=r[c=M(t)]||r[c=M(N(t))];!a&&i&&(a=r[c=M(P(t))]),a&&Tn(a,e,6,s);const u=r[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,Tn(u,e,6,s)}}function Ys(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},l=!1;if(!v(e)){const o=e=>{const n=Ys(e,t,!0);n&&(l=!0,a(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(f(s)?s.forEach((e=>i[e]=null)):a(i,s),S(e)&&o.set(e,i),i):(S(e)&&o.set(e,null),null)}function Qs(e,t){return!(!e||!l(t))&&(t=t.slice(2).replace(/Once$/,""),p(e,t[0].toLowerCase()+t.slice(1))||p(e,P(t))||p(e,t))}function Zs(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[s],slots:i,attrs:l,emit:a,render:u,renderCache:d,props:p,data:f,setupState:h,ctx:m,inheritAttrs:g}=e,v=Yn(e);let y,b;try{if(4&n.shapeFlag){const e=r||o,t=e;y=Bi(u.call(t,e,d,p,h,f,m)),b=l}else{const e=t;y=Bi(e.length>1?e(p,{attrs:l,slots:i,emit:a}):e(p,null)),b=t.props?l:ei(l)}}catch(t){gi.length=0,En(t,e,1),y=Oi(hi)}let S=y;if(b&&!1!==g){const e=Object.keys(b),{shapeFlag:t}=S;e.length&&7&t&&(s&&e.some(c)&&(b=ti(b,s)),S=Ri(S,b,!1,!0))}return n.dirs&&(S=Ri(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&To(S,n.transition),y=S,Yn(v),y}const ei=e=>{let t;for(const n in e)("class"===n||"style"===n||l(n))&&((t||(t={}))[n]=e[n]);return t},ti=(e,t)=>{const n={};for(const o in e)c(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function ni(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;re.__isSuspense;let si=0;const ii={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){if(null==e)!function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,d=u("div"),p=e.suspense=ci(e,r,o,t,d,n,s,i,l,c);a(null,p.pendingBranch=e.ssContent,d,null,o,p,s,i),p.deps>0?(li(e,"onPending"),li(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),di(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,o,r,s,i,l,c,a);else{if(s&&s.deps>0&&!e.suspense.isInFallback)return t.suspense=e.suspense,t.suspense.vnode=t,void(t.el=e.el);!function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,f=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=d;if(m)d.pendingBranch=p,Ti(p,m)?(c(m,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():g&&(v||(c(h,f,n,o,r,null,s,i,l),di(d,f)))):(d.pendingId=si++,v?(d.isHydrating=!1,d.activeBranch=m):a(m,r,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():(c(h,f,n,o,r,null,s,i,l),di(d,f))):h&&Ti(p,h)?(c(h,p,n,o,r,d,s,i,l),d.resolve(!0)):(c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0&&d.resolve()));else if(h&&Ti(p,h))c(h,p,n,o,r,d,s,i,l),di(d,p);else if(li(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=si++,c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0)d.resolve();else{const{timeout:e,pendingId:t}=d;e>0?setTimeout((()=>{d.pendingId===t&&d.fallback(f)}),e):0===e&&d.fallback(f)}}(e,t,n,o,r,i,l,c,a)}},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=ci(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);return 0===a.deps&&a.resolve(!1,!0),u},normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=ai(o?n.default:n),e.ssFallback=o?ai(n.fallback):Oi(hi)}};function li(e,t){const n=e.props&&e.props[t];v(n)&&n()}function ci(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:d,m:p,um:f,n:h,o:{parentNode:m,remove:g}}=a;let v;const y=function(e){const t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);y&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const b=e.props?H(e.props.timeout):void 0,S=s,_={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:si++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:r,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=_;let d=!1;_.isHydrating?_.isHydrating=!1:e||(d=r&&i.transition&&"out-in"===i.transition.mode,d&&(r.transition.afterLeave=()=>{l===_.pendingId&&(p(i,u,s===S?h(r):s,0),Hn(c))}),r&&(m(r.el)===u&&(s=h(r)),f(r,a,_,!0)),d||p(i,u,s,0)),di(_,i),_.pendingBranch=null,_.isInFallback=!1;let g=_.parent,b=!1;for(;g;){if(g.pendingBranch){g.effects.push(...c),b=!0;break}g=g.parent}b||d||Hn(c),_.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),li(o,"onResolve")},fallback(e){if(!_.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,namespace:s}=_;li(t,"onFallback");const i=h(n),a=()=>{_.isInFallback&&(d(null,e,r,i,o,null,s,l,c),di(_,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),_.isInFallback=!0,f(n,o,null,!0),u||a()},move(e,t,n){_.activeBranch&&p(_.activeBranch,e,t,n),_.container=e},next:()=>_.activeBranch&&h(_.activeBranch),registerDep(e,t,n){const o=!!_.pendingBranch;o&&_.deps++;const r=e.vnode.el;e.asyncDep.catch((t=>{En(t,e,0)})).then((s=>{if(e.isUnmounted||_.isUnmounted||_.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:l}=e;ol(e,s,!1),r&&(l.el=r);const c=!r&&e.subTree.el;t(e,l,m(r||e.subTree.el),r?null:h(e.subTree),_,i,n),c&&g(c),oi(e,l.el),o&&0==--_.deps&&_.resolve()}))},unmount(e,t){_.isUnmounted=!0,_.activeBranch&&f(_.activeBranch,n,e,t),_.pendingBranch&&f(_.pendingBranch,n,e,t)}};return _}function ai(e){let t;if(v(e)){const n=_i&&e._c;n&&(e._d=!1,yi()),e=e(),n&&(e._d=!0,t=vi,bi())}if(f(e)){const t=function(e){let t;for(let n=0;nt!==e))),e}function ui(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):Hn(e)}function di(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,oi(o,r))}const pi=Symbol.for("v-fgt"),fi=Symbol.for("v-txt"),hi=Symbol.for("v-cmt"),mi=Symbol.for("v-stc"),gi=[];let vi=null;function yi(e=!1){gi.push(vi=e?null:[])}function bi(){gi.pop(),vi=gi[gi.length-1]||null}let Si,_i=1;function xi(e){_i+=e,e<0&&vi&&(vi.hasOnce=!0)}function Ci(e){return e.dynamicChildren=_i>0?vi||r:null,bi(),_i>0&&vi&&vi.push(e),e}function wi(e,t,n,o,r,s){return Ci(Ni(e,t,n,o,r,s,!0))}function ki(e,t,n,o,r){return Ci(Oi(e,t,n,o,r,!0))}function Ii(e){return!!e&&!0===e.__v_isVNode}function Ti(e,t){return e.type===t.type&&e.key===t.key}function Ei(e){Si=e}const Di=({key:e})=>null!=e?e:null,Ai=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?y(e)||Xt(e)||v(e)?{i:Jn,r:e,k:t,f:!!n}:e:null);function Ni(e,t=null,n=null,o=0,r=null,s=(e===pi?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Di(t),ref:t&&Ai(t),scopeId:Xn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Jn};return l?($i(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=y(n)?8:16),_i>0&&!i&&vi&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&vi.push(c),c}const Oi=function(e,t=null,n=null,o=0,r=null,s=!1){if(e&&e!==br||(e=hi),Ii(e)){const o=Ri(e,t,!0);return n&&$i(o,n),_i>0&&!s&&vi&&(6&o.shapeFlag?vi[vi.indexOf(e)]=o:vi.push(o)),o.patchFlag=-2,o}if(i=e,v(i)&&"__vccOpts"in i&&(e=e.__vccOpts),t){t=Pi(t);let{class:e,style:n}=t;e&&!y(e)&&(t.class=X(e)),S(n)&&(Wt(n)&&!f(n)&&(n=a({},n)),t.style=W(n))}var i;return Ni(e,t,n,o,r,y(e)?1:ri(e)?128:so(e)?64:S(e)?4:v(e)?2:0,s,!0)};function Pi(e){return e?Wt(e)||ms(e)?a({},e):e:null}function Ri(e,t,n=!1,o=!1){const{props:r,ref:s,patchFlag:i,children:l,transition:c}=e,a=t?Hi(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&Di(a),ref:t&&t.ref?n&&s?f(s)?s.concat(Ai(t)):[s,Ai(t)]:Ai(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==pi?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ri(e.ssContent),ssFallback:e.ssFallback&&Ri(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&o&&To(u,c.clone(u)),u}function Mi(e=" ",t=0){return Oi(fi,null,e,t)}function Li(e,t){const n=Oi(mi,null,e);return n.staticCount=t,n}function Fi(e="",t=!1){return t?(yi(),ki(hi,null,e)):Oi(hi,null,e)}function Bi(e){return null==e||"boolean"==typeof e?Oi(hi):f(e)?Oi(pi,null,e.slice()):Ii(e)?ji(e):Oi(fi,null,String(e))}function ji(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:Ri(e)}function $i(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(f(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),$i(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||ms(t)?3===o&&Jn&&(1===Jn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Jn}}else v(t)?(t={default:t,_ctx:Jn},n=32):(t=String(t),64&o?(n=16,t=[Mi(t)]):n=8);e.children=t,e.shapeFlag|=n}function Hi(...e){const t={};for(let n=0;nGi||Jn;let Ki,Ji;{const e=U(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach((t=>t(e))):o[0](e)}};Ki=t("__VUE_INSTANCE_SETTERS__",(e=>Gi=e)),Ji=t("__VUE_SSR_SETTERS__",(e=>tl=e))}const Xi=e=>{const t=Gi;return Ki(e),e.scope.on(),()=>{e.scope.off(),Ki(t)}},Yi=()=>{Gi&&Gi.scope.off(),Ki(null)};function Qi(e){return 4&e.vnode.shapeFlag}let Zi,el,tl=!1;function nl(e,t=!1,n=!1){t&&Ji(t);const{props:o,children:r}=e.vnode,s=Qi(e);!function(e,t,n,o=!1){const r={},s=hs();e.propsDefaults=Object.create(null),gs(e,t,r,s);for(const t in e.propsOptions[0])t in r||(r[t]=void 0);n?e.props=o?r:Bt(r):e.type.props?e.props=r:e.props=s,e.attrs=s}(e,o,s,t),Ts(e,r,n);const i=s?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,Or);const{setup:o}=n;if(o){const n=e.setupContext=o.length>1?cl(e):null,r=Xi(e);Pe();const s=In(o,e,0,[e.props,n]);if(Re(),r(),_(s)){if(Go(e)||No(e),s.then(Yi,Yi),t)return s.then((n=>{ol(e,n,t)})).catch((t=>{En(t,e,0)}));e.asyncDep=s}else ol(e,s,t)}else il(e,t)}(e,t):void 0;return t&&Ji(!1),i}function ol(e,t,n){v(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:S(t)&&(e.setupState=sn(t)),il(e,n)}function rl(e){Zi=e,el=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Pr))}}const sl=()=>!Zi;function il(e,t,n){const o=e.type;if(!e.render){if(!t&&Zi&&!o.render){const t=o.template||Qr(e).template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,l=a(a({isCustomElement:n,delimiters:s},r),i);o.render=Zi(t,l)}}e.render=o.render||s,el&&el(e)}{const t=Xi(e);Pe();try{!function(e){const t=Qr(e),n=e.proxy,o=e.ctx;Jr=!1,t.beforeCreate&&Xr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:l,watch:c,provide:a,inject:u,created:d,beforeMount:p,mounted:h,beforeUpdate:m,updated:g,activated:y,deactivated:b,beforeDestroy:_,beforeUnmount:x,destroyed:C,unmounted:w,render:k,renderTracked:I,renderTriggered:T,errorCaptured:E,serverPrefetch:D,expose:A,inheritAttrs:N,components:O,directives:P,filters:R}=t;if(u&&function(e,t){f(e)&&(e=ns(e));for(const n in e){const o=e[n];let r;r=S(o)?"default"in o?ds(o.from||n,o.default,!0):ds(o.from||n):ds(o),Xt(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(u,o),l)for(const e in l){const t=l[e];v(t)&&(o[e]=t.bind(n))}if(r){const t=r.call(n,n);S(t)&&(e.data=Ft(t))}if(Jr=!0,i)for(const e in i){const t=i[e],r=v(t)?t.bind(n,n):v(t.get)?t.get.bind(n,n):s,l=!v(t)&&v(t.set)?t.set.bind(n):s,c=dl({get:r,set:l});Object.defineProperty(o,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(c)for(const e in c)Yr(c[e],o,n,e);if(a){const e=v(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{us(t,e[t])}))}function M(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&Xr(d,e,"c"),M(ir,p),M(lr,h),M(cr,m),M(ar,g),M(Qo,y),M(Zo,b),M(mr,E),M(hr,I),M(fr,T),M(ur,x),M(dr,w),M(pr,D),f(A))if(A.length){const t=e.exposed||(e.exposed={});A.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});k&&e.render===s&&(e.render=k),null!=N&&(e.inheritAttrs=N),O&&(e.components=O),P&&(e.directives=P),D&&No(e)}(e)}finally{Re(),t()}}}const ll={get:(e,t)=>(qe(e,0,""),e[t])};function cl(e){return{attrs:new Proxy(e.attrs,ll),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function al(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(sn(zt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in Ar?Ar[n](e):void 0,has:(e,t)=>t in e||t in Ar})):e.proxy}function ul(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}const dl=(e,t)=>{const n=function(e,t,n=!1){let o,r;return v(e)?o=e:(o=e.get,r=e.set),new hn(o,r,n)}(e,0,tl);return n};function pl(e,t,n){const o=arguments.length;return 2===o?S(t)&&!f(t)?Ii(t)?Oi(e,null,[t]):Oi(e,t):Oi(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&Ii(n)&&(n=[n]),Oi(e,t,n))}function fl(){}function hl(e,t,n,o){const r=n[o];if(r&&ml(r,e))return r;const s=t();return s.memo=e.slice(),s.cacheIndex=o,n[o]=s}function ml(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&vi&&vi.push(e),!0}const gl="3.5.9",vl=s,yl={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"},bl=Gn,Sl=function e(t,n){var o,r;Gn=t,Gn?(Gn.enabled=!0,zn.forEach((({event:e,args:t})=>Gn.emit(e,...t))),zn=[]):"undefined"!=typeof window&&window.HTMLElement&&!(null==(r=null==(o=window.navigator)?void 0:o.userAgent)?void 0:r.includes("jsdom"))?((n.__VUE_DEVTOOLS_HOOK_REPLAY__=n.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((t=>{e(t,n)})),setTimeout((()=>{Gn||(n.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Kn=!0,zn=[])}),3e3)):(Kn=!0,zn=[])},_l={createComponentInstance:Wi,setupComponent:nl,renderComponentRoot:Zs,setCurrentRenderingInstance:Yn,isVNode:Ii,normalizeVNode:Bi,getComponentPublicInstance:al,ensureValidVNode:Tr,pushWarningContext:function(e){Cn.push(e)},popWarningContext:function(){Cn.pop()}},xl=null,Cl=null,wl=null;let kl;const Il="undefined"!=typeof window&&window.trustedTypes;if(Il)try{kl=Il.createPolicy("vue",{createHTML:e=>e})}catch(e){}const Tl=kl?e=>kl.createHTML(e):e=>e,El="undefined"!=typeof document?document:null,Dl=El&&El.createElement("template"),Al={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r="svg"===t?El.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?El.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?El.createElement(e,{is:n}):El.createElement(e);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>El.createTextNode(e),createComment:e=>El.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>El.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{Dl.innerHTML=Tl("svg"===o?`${e}`:"mathml"===o?`${e}`:e);const r=Dl.content;if("svg"===o||"mathml"===o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Nl="transition",Ol="animation",Pl=Symbol("_vtc"),Rl={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Ml=a({},bo,Rl),Ll=(e=>(e.displayName="Transition",e.props=Ml,e))(((e,{slots:t})=>pl(xo,jl(e),t))),Fl=(e,t=[])=>{f(e)?e.forEach((e=>e(...t))):e&&e(...t)},Bl=e=>!!e&&(f(e)?e.some((e=>e.length>1)):e.length>1);function jl(e){const t={};for(const n in e)n in Rl||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:u=i,appearToClass:d=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(S(e))return[$l(e.enter),$l(e.leave)];{const t=$l(e);return[t,t]}}(r),g=m&&m[0],v=m&&m[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:_,onLeave:x,onLeaveCancelled:C,onBeforeAppear:w=y,onAppear:k=b,onAppearCancelled:I=_}=t,T=(e,t,n)=>{Vl(e,t?d:l),Vl(e,t?u:i),n&&n()},E=(e,t)=>{e._isLeaving=!1,Vl(e,p),Vl(e,h),Vl(e,f),t&&t()},D=e=>(t,n)=>{const r=e?k:b,i=()=>T(t,e,n);Fl(r,[t,i]),Ul((()=>{Vl(t,e?c:s),Hl(t,e?d:l),Bl(r)||Wl(t,o,g,i)}))};return a(t,{onBeforeEnter(e){Fl(y,[e]),Hl(e,s),Hl(e,i)},onBeforeAppear(e){Fl(w,[e]),Hl(e,c),Hl(e,u)},onEnter:D(!1),onAppear:D(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>E(e,t);Hl(e,p),Hl(e,f),Jl(),Ul((()=>{e._isLeaving&&(Vl(e,p),Hl(e,h),Bl(x)||Wl(e,o,v,n))})),Fl(x,[e,n])},onEnterCancelled(e){T(e,!1),Fl(_,[e])},onAppearCancelled(e){T(e,!0),Fl(I,[e])},onLeaveCancelled(e){E(e),Fl(C,[e])}})}function $l(e){return H(e)}function Hl(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Pl]||(e[Pl]=new Set)).add(t)}function Vl(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Pl];n&&(n.delete(t),n.size||(e[Pl]=void 0))}function Ul(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let ql=0;function Wl(e,t,n,o){const r=e._endId=++ql,s=()=>{r===e._endId&&o()};if(null!=n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=Gl(e,t);if(!i)return o();const a=i+"end";let u=0;const d=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&d()};setTimeout((()=>{u(n[e]||"").split(", "),r=o(`${Nl}Delay`),s=o(`${Nl}Duration`),i=zl(r,s),l=o(`${Ol}Delay`),c=o(`${Ol}Duration`),a=zl(l,c);let u=null,d=0,p=0;return t===Nl?i>0&&(u=Nl,d=i,p=s.length):t===Ol?a>0&&(u=Ol,d=a,p=c.length):(d=Math.max(i,a),u=d>0?i>a?Nl:Ol:null,p=u?u===Nl?s.length:c.length:0),{type:u,timeout:d,propCount:p,hasTransform:u===Nl&&/\b(transform|all)(,|$)/.test(o(`${Nl}Property`).toString())}}function zl(e,t){for(;e.lengthKl(t)+Kl(e[n]))))}function Kl(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Jl(){return document.body.offsetHeight}const Xl=Symbol("_vod"),Yl=Symbol("_vsh"),Ql={beforeMount(e,{value:t},{transition:n}){e[Xl]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):Zl(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),Zl(e,!0),o.enter(e)):o.leave(e,(()=>{Zl(e,!1)})):Zl(e,t))},beforeUnmount(e,{value:t}){Zl(e,t)}};function Zl(e,t){e.style.display=t?e[Xl]:"none",e[Yl]=!t}const ec=Symbol("");function tc(e){const t=zi();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>oc(e,n)))},o=()=>{const o=e(t.proxy);t.ce?oc(t.ce,o):nc(t.subTree,o),n(o)};ir((()=>{Vs(o)})),lr((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),dr((()=>e.disconnect()))}))}function nc(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{nc(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)oc(e.el,t);else if(e.type===pi)e.children.forEach((e=>nc(e,t)));else if(e.type===mi){let{el:n,anchor:o}=e;for(;n&&(oc(n,t),n!==o);)n=n.nextSibling}}function oc(e,t){if(1===e.nodeType){const n=e.style;let o="";for(const e in t)n.setProperty(`--${e}`,t[e]),o+=`--${e}: ${t[e]};`;n[ec]=o}}const rc=/(^|;)\s*display\s*:/,sc=/\s*!important$/;function ic(e,t,n){if(f(n))n.forEach((n=>ic(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=cc[t];if(n)return n;let o=N(t);if("filter"!==o&&o in e)return cc[t]=o;o=R(o);for(let n=0;nhc||(mc.then((()=>hc=0)),hc=Date.now()),vc=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,yc={};function bc(e,t,n){const o=Do(e,t);k(o)&&a(o,t);class r extends xc{constructor(e){super(o,e,n)}}return r.def=o,r}const Sc=(e,t)=>bc(e,t,ca),_c="undefined"!=typeof HTMLElement?HTMLElement:class{};class xc extends _c{constructor(e,t={},n=la){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==la?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof xc){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then((()=>{this._pendingResolve=void 0,this._resolveDef()})):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,Bn((()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)}))}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:n,styles:o}=e;let r;if(n&&!f(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=H(this._props[e])),(r||(r=Object.create(null)))[N(e)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(o),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then((t=>e(this._def=t,!0))):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const t=this._instance&&this._instance.exposed;if(t)for(const e in t)p(this,e)||Object.defineProperty(this,e,{get:()=>nn(t[e])})}_resolveProps(e){const{props:t}=e,n=f(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(const e of n.map(N))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const t=this.hasAttribute(e);let n=t?this.getAttribute(e):yc;const o=N(e);t&&this._numberProps&&this._numberProps[o]&&(n=H(n)),this._setProp(o,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!1){t!==this._props[e]&&(t===yc?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(P(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(P(e),t+""):t||this.removeAttribute(P(e))))}_update(){sa(this._createVNode(),this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const t=Oi(this._def,a(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,k(t[0])?a({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),P(e)!==e&&t(P(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}const n=this._nonce;for(let t=e.length-1;t>=0;t--){const o=document.createElement("style");n&&o.setAttribute("nonce",n),o.textContent=e[t],this.shadowRoot.prepend(o)}}_parseSlots(){const e=this._slots={};let t;for(;t=this.firstChild;){const n=1===t.nodeType&&t.getAttribute("slot")||"default";(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){const e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n(delete e.props.mode,e))({name:"TransitionGroup",props:a({},Ml,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=zi(),o=vo();let r,s;return ar((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode(),r=e[Pl];r&&r.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))})),n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(o);const{hasTransform:i}=Gl(o);return s.removeChild(o),i}(r[0].el,n.vnode.el,t))return;r.forEach(Nc),r.forEach(Oc);const o=r.filter(Pc);Jl(),o.forEach((e=>{const n=e.el,o=n.style;Hl(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n[Ec]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n[Ec]=null,Vl(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=Gt(e),l=jl(i);let c=i.tag||pi;if(r=[],s)for(let e=0;e{const t=e.props["onUpdate:modelValue"]||!1;return f(t)?e=>F(t,e):t};function Mc(e){e.target.composing=!0}function Lc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const Fc=Symbol("_assign"),Bc={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[Fc]=Rc(r);const s=o||r.props&&"number"===r.props.type;dc(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=j(o)),e[Fc](o)})),n&&dc(e,"change",(()=>{e.value=e.value.trim()})),t||(dc(e,"compositionstart",Mc),dc(e,"compositionend",Lc),dc(e,"change",Lc))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:s}},i){if(e[Fc]=Rc(i),e.composing)return;const l=null==t?"":t;if((!s&&"number"!==e.type||/^0\d/.test(e.value)?e.value:j(e.value))!==l){if(document.activeElement===e&&"range"!==e.type){if(o&&t===n)return;if(r&&e.value.trim()===l)return}e.value=l}}},jc={deep:!0,created(e,t,n){e[Fc]=Rc(n),dc(e,"change",(()=>{const t=e._modelValue,n=qc(e),o=e.checked,r=e[Fc];if(f(t)){const e=se(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(m(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(Wc(e,o))}))},mounted:$c,beforeUpdate(e,t,n){e[Fc]=Rc(n),$c(e,t,n)}};function $c(e,{value:t},n){let o;e._modelValue=t,o=f(t)?se(t,n.props.value)>-1:m(t)?t.has(n.props.value):re(t,Wc(e,!0)),e.checked!==o&&(e.checked=o)}const Hc={created(e,{value:t},n){e.checked=re(t,n.props.value),e[Fc]=Rc(n),dc(e,"change",(()=>{e[Fc](qc(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e[Fc]=Rc(o),t!==n&&(e.checked=re(t,o.props.value))}},Vc={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=m(t);dc(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?j(qc(e)):qc(e)));e[Fc](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,Bn((()=>{e._assigning=!1}))})),e[Fc]=Rc(o)},mounted(e,{value:t}){Uc(e,t)},beforeUpdate(e,t,n){e[Fc]=Rc(n)},updated(e,{value:t}){e._assigning||Uc(e,t)}};function Uc(e,t){const n=e.multiple,o=f(t);if(!n||o||m(t)){for(let r=0,s=e.options.length;rString(e)===String(i))):se(t,i)>-1}else s.selected=t.has(i);else if(re(qc(s),t))return void(e.selectedIndex!==r&&(e.selectedIndex=r))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function qc(e){return"_value"in e?e._value:e.value}function Wc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Gc={created(e,t,n){Kc(e,t,n,null,"created")},mounted(e,t,n){Kc(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Kc(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Kc(e,t,n,o,"updated")}};function zc(e,t){switch(e){case"SELECT":return Vc;case"TEXTAREA":return Bc;default:switch(t){case"checkbox":return jc;case"radio":return Hc;default:return Bc}}}function Kc(e,t,n,o,r){const s=zc(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const Jc=["ctrl","shift","alt","meta"],Xc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Jc.some((n=>e[`${n}Key`]&&!t.includes(n)))},Yc=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=P(n.key);return t.some((e=>e===o||Qc[e]===o))?e(n):void 0})},ea=a({patchProp:(e,t,n,o,r,s)=>{const i="svg"===r;"class"===t?function(e,t,n){const o=e[Pl];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,i):"style"===t?function(e,t,n){const o=e.style,r=y(n);let s=!1;if(n&&!r){if(t)if(y(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&ic(o,t,"")}else for(const e in t)null==n[e]&&ic(o,e,"");for(const e in n)"display"===e&&(s=!0),ic(o,e,n[e])}else if(r){if(t!==n){const e=o[ec];e&&(n+=";"+e),o.cssText=n,s=rc.test(n)}}else t&&e.removeAttribute("style");Xl in e&&(e[Xl]=s?o.display:"",e[Yl]&&(o.display="none"))}(e,n,o):l(t)?c(t)||function(e,t,n,o,r=null){const s=e[pc]||(e[pc]={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(fc.test(e)){let n;for(t={};n=e.match(fc);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):P(e.slice(2)),t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();Tn(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=gc(),n}(o,r);dc(e,n,i,l)}else i&&(function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}(e,t,0,o,s):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&vc(t)&&v(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!vc(t)||!y(n))&&(t in e||!(!e._isVueCE||!/[A-Z]/.test(t)&&y(n)))}(e,t,o,i))?(function(e,t,n){if("innerHTML"===t||"textContent"===t)return void(null!=n&&(e[t]="innerHTML"===t?Tl(n):n));const o=e.tagName;if("value"===t&&"PROGRESS"!==o&&!o.includes("-")){const r="OPTION"===o?e.getAttribute("value")||"":e.value,s=null==n?"checkbox"===e.type?"on":"":String(n);return r===s&&"_value"in e||(e.value=s),null==n&&e.removeAttribute(t),void(e._value=n)}let r=!1;if(""===n||null==n){const o=typeof e[t];"boolean"===o?n=oe(n):null==n&&"string"===o?(n="",r=!0):"number"===o&&(n=0,r=!0)}try{e[t]=n}catch(e){}r&&e.removeAttribute(t)}(e,t,o),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||uc(e,t,o,i,0,"value"!==t)):("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),uc(e,t,o,i))}},Al);let ta,na=!1;function oa(){return ta||(ta=As(ea))}function ra(){return ta=na?ta:Ns(ea),na=!0,ta}const sa=(...e)=>{oa().render(...e)},ia=(...e)=>{ra().hydrate(...e)},la=(...e)=>{const t=oa().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=ua(e);if(!o)return;const r=t._component;v(r)||r.render||r.template||(r.template=o.innerHTML),1===o.nodeType&&(o.textContent="");const s=n(o,!1,aa(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},ca=(...e)=>{const t=ra().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=ua(e);if(t)return n(t,!0,aa(t))},t};function aa(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function ua(e){return y(e)?document.querySelector(e):e}let da=!1;const pa=()=>{da||(da=!0,Bc.getSSRProps=({value:e})=>({value:e}),Hc.getSSRProps=({value:e},t)=>{if(t.props&&re(t.props.value,e))return{checked:!0}},jc.getSSRProps=({value:e},t)=>{if(f(e)){if(t.props&&se(e,t.props.value)>-1)return{checked:!0}}else if(m(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Gc.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=zc(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},Ql.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})},fa=Symbol(""),ha=Symbol(""),ma=Symbol(""),ga=Symbol(""),va=Symbol(""),ya=Symbol(""),ba=Symbol(""),Sa=Symbol(""),_a=Symbol(""),xa=Symbol(""),Ca=Symbol(""),wa=Symbol(""),ka=Symbol(""),Ia=Symbol(""),Ta=Symbol(""),Ea=Symbol(""),Da=Symbol(""),Aa=Symbol(""),Na=Symbol(""),Oa=Symbol(""),Pa=Symbol(""),Ra=Symbol(""),Ma=Symbol(""),La=Symbol(""),Fa=Symbol(""),Ba=Symbol(""),ja=Symbol(""),$a=Symbol(""),Ha=Symbol(""),Va=Symbol(""),Ua=Symbol(""),qa=Symbol(""),Wa=Symbol(""),Ga=Symbol(""),za=Symbol(""),Ka=Symbol(""),Ja=Symbol(""),Xa=Symbol(""),Ya=Symbol(""),Qa={[fa]:"Fragment",[ha]:"Teleport",[ma]:"Suspense",[ga]:"KeepAlive",[va]:"BaseTransition",[ya]:"openBlock",[ba]:"createBlock",[Sa]:"createElementBlock",[_a]:"createVNode",[xa]:"createElementVNode",[Ca]:"createCommentVNode",[wa]:"createTextVNode",[ka]:"createStaticVNode",[Ia]:"resolveComponent",[Ta]:"resolveDynamicComponent",[Ea]:"resolveDirective",[Da]:"resolveFilter",[Aa]:"withDirectives",[Na]:"renderList",[Oa]:"renderSlot",[Pa]:"createSlots",[Ra]:"toDisplayString",[Ma]:"mergeProps",[La]:"normalizeClass",[Fa]:"normalizeStyle",[Ba]:"normalizeProps",[ja]:"guardReactiveProps",[$a]:"toHandlers",[Ha]:"camelize",[Va]:"capitalize",[Ua]:"toHandlerKey",[qa]:"setBlockTracking",[Wa]:"pushScopeId",[Ga]:"popScopeId",[za]:"withCtx",[Ka]:"unref",[Ja]:"isRef",[Xa]:"withMemo",[Ya]:"isMemoSame"},Za={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function eu(e,t,n,o,r,s,i,l=!1,c=!1,a=!1,u=Za){return e&&(l?(e.helper(ya),e.helper(uu(e.inSSR,a))):e.helper(au(e.inSSR,a)),i&&e.helper(Aa)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function tu(e,t=Za){return{type:17,loc:t,elements:e}}function nu(e,t=Za){return{type:15,loc:t,properties:e}}function ou(e,t){return{type:16,loc:Za,key:y(e)?ru(e,!0):e,value:t}}function ru(e,t=!1,n=Za,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function su(e,t=Za){return{type:8,loc:t,children:e}}function iu(e,t=[],n=Za){return{type:14,loc:n,callee:e,arguments:t}}function lu(e,t=void 0,n=!1,o=!1,r=Za){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function cu(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:Za}}function au(e,t){return e||t?_a:xa}function uu(e,t){return e||t?ba:Sa}function du(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(au(o,e.isComponent)),t(ya),t(uu(o,e.isComponent)))}const pu=new Uint8Array([123,123]),fu=new Uint8Array([125,125]);function hu(e){return e>=97&&e<=122||e>=65&&e<=90}function mu(e){return 32===e||10===e||9===e||12===e||13===e}function gu(e){return 47===e||62===e||mu(e)}function vu(e){const t=new Uint8Array(e.length);for(let n=0;n4===e.type&&e.isStatic;function Iu(e){switch(e){case"Teleport":case"teleport":return ha;case"Suspense":case"suspense":return ma;case"KeepAlive":case"keep-alive":return ga;case"BaseTransition":case"base-transition":return va}}const Tu=/^\d|[^\$\w\xA0-\uFFFF]/,Eu=e=>!Tu.test(e),Du=/[A-Za-z_$\xA0-\uFFFF]/,Au=/[\.\?\w$\xA0-\uFFFF]/,Nu=/\s+[.[]\s*|\s*[.[]\s+/g,Ou=e=>4===e.type?e.content:e.loc.source,Pu=e=>{const t=Ou(e).trim().replace(Nu,(e=>e.trim()));let n=0,o=[],r=0,s=0,i=null;for(let e=0;e|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;function Mu(e,t,n=!1){for(let o=0;o4===e.key.type&&e.key.content===o))}return n}function Gu(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}const zu=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Ku={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:i,isPreTag:i,isIgnoreNewlineTag:i,isCustomElement:i,onError:xu,onWarn:Cu,comments:!1,prefixIdentifiers:!1};let Ju=Ku,Xu=null,Yu="",Qu=null,Zu=null,ed="",td=-1,nd=-1,od=0,rd=!1,sd=null;const id=[],ld=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=pu,this.delimiterClose=fu,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=pu,this.delimiterClose=fu}getPos(e){let t=1,n=e+1;for(let o=this.newlines.length-1;o>=0;o--){const r=this.newlines[o];if(e>r){t=o+2,n=e-r;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?gu(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||mu(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart=e||(28===this.state?this.currentSequence===yu.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(id,{onerr:Td,ontext(e,t){pd(ud(e,t),e,t)},ontextentity(e,t,n){pd(e,t,n)},oninterpolation(e,t){if(rd)return pd(ud(e,t),e,t);let n=e+ld.delimiterOpen.length,o=t-ld.delimiterClose.length;for(;mu(Yu.charCodeAt(n));)n++;for(;mu(Yu.charCodeAt(o-1));)o--;let r=ud(n,o);r.includes("&")&&(r=Ju.decodeEntities(r,!1)),xd({type:5,content:Id(r,!1,Cd(n,o)),loc:Cd(e,t)})},onopentagname(e,t){const n=ud(e,t);Qu={type:1,tag:n,ns:Ju.getNamespace(n,id[0],Ju.ns),tagType:0,props:[],children:[],loc:Cd(e-1,t),codegenNode:void 0}},onopentagend(e){dd(e)},onclosetag(e,t){const n=ud(e,t);if(!Ju.isVoidTag(n)){let o=!1;for(let e=0;e0&&Td(24,id[0].loc.start.offset);for(let n=0;n<=e;n++)fd(id.shift(),t,n(7===e.type?e.rawName:e.name)===n))&&Td(2,t)},onattribend(e,t){if(Qu&&Zu){if(wd(Zu.loc,t),0!==e)if(ed.includes("&")&&(ed=Ju.decodeEntities(ed,!0)),6===Zu.type)"class"===Zu.name&&(ed=_d(ed).trim()),1!==e||ed||Td(13,t),Zu.value={type:2,content:ed,loc:1===e?Cd(td,nd):Cd(td-1,nd+1)},ld.inSFCRoot&&"template"===Qu.tag&&"lang"===Zu.name&&ed&&"html"!==ed&&ld.enterRCDATA(vu("{const r=t.start.offset+n;return Id(e,!1,Cd(r,r+e.length),0,o?1:0)},l={source:i(s.trim(),n.indexOf(s,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(ad,"").trim();const a=r.indexOf(c),u=c.match(cd);if(u){c=c.replace(cd,"").trim();const e=u[1].trim();let t;if(e&&(t=n.indexOf(e,a+c.length),l.key=i(e,t,!0)),u[2]){const o=u[2].trim();o&&(l.index=i(o,n.indexOf(o,l.key?t+e.length:a+c.length),!0))}}return c&&(l.value=i(c,a,!0)),l}(Zu.exp));let t=-1;"bind"===Zu.name&&(t=Zu.modifiers.findIndex((e=>"sync"===e.content)))>-1&&_u("COMPILER_V_BIND_SYNC",Ju,Zu.loc,Zu.rawName)&&(Zu.name="model",Zu.modifiers.splice(t,1))}7===Zu.type&&"pre"===Zu.name||Qu.props.push(Zu)}ed="",td=nd=-1},oncomment(e,t){Ju.comments&&xd({type:3,content:ud(e,t),loc:Cd(e-4,t+3)})},onend(){const e=Yu.length;for(let t=0;t64&&n<91||Iu(e)||Ju.isBuiltInComponent&&Ju.isBuiltInComponent(e)||Ju.isNativeTag&&!Ju.isNativeTag(e))return!0;var n;for(let e=0;e6===e.type&&"inline-template"===e.name));n&&_u("COMPILER_INLINE_TEMPLATE",Ju,n.loc)&&e.children.length&&(n.value={type:2,content:ud(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function hd(e,t){let n=e;for(;Yu.charCodeAt(n)!==t&&n>=0;)n--;return n}const md=new Set(["if","else","else-if","for","slot"]);function gd({tag:e,props:t}){if("template"===e)for(let e=0;e0){if(e>=2){l.codegenNode.patchFlag=-1,i.push(l);continue}}else{const e=l.codegenNode;if(13===e.type){const t=e.patchFlag;if((void 0===t||512===t||1===t)&&Rd(l,n)>=2){const t=Md(l);t&&(e.props=n.hoist(t))}e.dynamicProps&&(e.dynamicProps=n.hoist(e.dynamicProps))}}}else if(12===l.type&&(o?0:Nd(l,n))>=2){i.push(l);continue}if(1===l.type){const t=1===l.tagType;t&&n.scopes.vSlot++,Ad(l,e,n,!1,r),t&&n.scopes.vSlot--}else if(11===l.type)Ad(l,e,n,1===l.children.length,!0);else if(9===l.type)for(let t=0;te.key===t||e.key.content===t));return n&&n.value}}i.length&&n.transformHoist&&n.transformHoist(s,n,e)}function Nd(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const o=n.get(e);if(void 0!==o)return o;const r=e.codegenNode;if(13!==r.type)return 0;if(r.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0===r.patchFlag){let o=3;const s=Rd(e,t);if(0===s)return n.set(e,0),0;s1)for(let r=0;r`_${Qa[T.helper(e)]}`,replaceNode(e){T.parent.children[T.childIndex]=T.currentNode=e},removeNode(e){const t=T.parent.children,n=e?t.indexOf(e):T.currentNode?T.childIndex:-1;e&&e!==T.currentNode?T.childIndex>n&&(T.childIndex--,T.onNodeRemoved()):(T.currentNode=null,T.onNodeRemoved()),T.parent.children.splice(n,1)},onNodeRemoved:s,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){y(e)&&(e=ru(e)),T.hoists.push(e);const t=ru(`_hoisted_${T.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){const n=function(e,t,n=!1){return{type:20,index:e,value:t,needPauseTracking:n,needArraySpread:!1,loc:Za}}(T.cached.length,e,t);return T.cached.push(n),n}};return T.filters=new Set,T}(e,t);Fd(e,n),t.hoistStatic&&Ed(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(Dd(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&du(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;e.codegenNode=eu(t,n(fa),void 0,e.children,o,void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function Fd(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let r=0;r{n--};for(;nt===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(ju))return;const s=[];for(let i=0;i`${Qa[e]}: _${Qa[e]}`;function Hd(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("filter"===t?Da:"component"===t?Ia:Ea);for(let n=0;n3||!1;t.push("["),n&&t.indent(),Ud(e,t,n),n&&t.deindent(),t.push("]")}function Ud(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;ie||"null"))}([s,i,l,h,a]),t),n(")"),d&&n(")"),u&&(n(", "),qd(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=y(e.callee)?e.callee:o(e.callee);r&&n(jd),n(s+"(",-2,e),Ud(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",-2,e);const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let e=0;e "),(c||l)&&(n("{"),o()),i?(c&&n("return "),f(i)?Vd(i,t):qd(i,t)):l&&qd(l,t),(c||l)&&(r(),n("}")),a&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!Eu(n.content);e&&i("("),Wd(n,t),e&&i(")")}else i("("),qd(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),qd(o,t),t.indentLevel--,s&&a(),s||i(" "),i(": ");const u=19===r.type;u||t.indentLevel++,qd(r,t),u||t.indentLevel--,s&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t,{needPauseTracking:l,needArraySpread:c}=e;c&&n("[...("),n(`_cache[${e.index}] || (`),l&&(r(),n(`${o(qa)}(-1),`),i(),n("(")),n(`_cache[${e.index}] = `),qd(e.value,t),l&&(n(`).cacheIndex = ${e.index},`),i(),n(`${o(qa)}(1),`),i(),n(`_cache[${e.index}]`),s()),n(")"),c&&n(")]")}(e,t);break;case 21:Ud(e.body,t,!0,!1)}}function Wd(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,-3,e)}function Gd(e,t){for(let n=0;nfunction(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const o=t.exp?t.exp.loc:e.loc;n.onError(wu(28,t.loc)),t.exp=ru("true",!1,o)}if("if"===t.name){const r=Jd(e,t),s={type:9,loc:e.loc,branches:[r]};if(n.replaceNode(s),o)return o(s,r,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(wu(30,e.loc)),n.removeNode();const r=Jd(e,t);i.branches.push(r);const s=o&&o(i,r,!1);Fd(r,n),s&&s(),n.currentNode=null}else n.onError(wu(30,e.loc));break}n.removeNode(i)}}}}(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=Xd(t,i,n);else{const o=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);o.alternate=Xd(t,i+e.branches.length-1,n)}}}))));function Jd(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Mu(e,"for")?e.children:[e],userKey:Lu(e,"key"),isTemplateIf:n}}function Xd(e,t,n){return e.condition?cu(e.condition,Yd(e,t,n),iu(n.helper(Ca),['""',"true"])):Yd(e,t,n)}function Yd(e,t,n){const{helper:o}=n,r=ou("key",ru(`${t}`,!1,Za,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return qu(e,r,n),e}{let t=64;return eu(n,o(fa),nu([r]),s,t,void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===Xa?l.arguments[1].returns:l;return 13===t.type&&du(t,n),qu(t,r,n),e}var l}const Qd=(e,t,n)=>{const{modifiers:o,loc:r}=e,s=e.arg;let{exp:i}=e;if(i&&4===i.type&&!i.content.trim()&&(i=void 0),!i){if(4!==s.type||!s.isStatic)return n.onError(wu(52,s.loc)),{props:[ou(s,ru("",!0,r))]};Zd(e),i=e.exp}return 4!==s.type?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=`${s.content} || ""`),o.some((e=>"camel"===e.content))&&(4===s.type?s.isStatic?s.content=N(s.content):s.content=`${n.helperString(Ha)}(${s.content})`:(s.children.unshift(`${n.helperString(Ha)}(`),s.children.push(")"))),n.inSSR||(o.some((e=>"prop"===e.content))&&ep(s,"."),o.some((e=>"attr"===e.content))&&ep(s,"^")),{props:[ou(s,i)]}},Zd=(e,t)=>{const n=e.arg,o=N(n.content);e.exp=ru(o,!1,n.loc)},ep=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},tp=Bd("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return function(e,t,n,o){if(!t.exp)return void n.onError(wu(31,t.loc));const r=t.forParseResult;if(!r)return void n.onError(wu(32,t.loc));np(r);const{addIdentifiers:s,removeIdentifiers:i,scopes:l}=n,{source:c,value:a,key:u,index:d}=r,p={type:11,loc:t.loc,source:c,valueAlias:a,keyAlias:u,objectIndexAlias:d,parseResult:r,children:$u(e)?e.children:[e]};n.replaceNode(p),l.vFor++;const f=o&&o(p);return()=>{l.vFor--,f&&f()}}(e,t,n,(t=>{const s=iu(o(Na),[t.source]),i=$u(e),l=Mu(e,"memo"),c=Lu(e,"key",!1,!0);c&&7===c.type&&!c.exp&&Zd(c);const a=c&&(6===c.type?c.value?ru(c.value.content,!0):void 0:c.exp),u=c&&a?ou("key",a):null,d=4===t.source.type&&t.source.constType>0,p=d?64:c?128:256;return t.codegenNode=eu(n,o(fa),void 0,s,p,void 0,void 0,!0,!d,!1,e.loc),()=>{let c;const{children:p}=t,f=1!==p.length||1!==p[0].type,h=Hu(e)?e:i&&1===e.children.length&&Hu(e.children[0])?e.children[0]:null;if(h?(c=h.codegenNode,i&&u&&qu(c,u,n)):f?c=eu(n,o(fa),u?nu([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(c=p[0].codegenNode,i&&u&&qu(c,u,n),c.isBlock!==!d&&(c.isBlock?(r(ya),r(uu(n.inSSR,c.isComponent))):r(au(n.inSSR,c.isComponent))),c.isBlock=!d,c.isBlock?(o(ya),o(uu(n.inSSR,c.isComponent))):o(au(n.inSSR,c.isComponent))),l){const e=lu(op(t.parseResult,[ru("_cached")]));e.body={type:21,body:[su(["const _memo = (",l.exp,")"]),su(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(Ya)}(_cached, _memo)) return _cached`]),su(["const _item = ",c]),ru("_item.memo = _memo"),ru("return _item")],loc:Za},s.arguments.push(e,ru("_cache"),ru(String(n.cached.length))),n.cached.push(null)}else s.arguments.push(lu(op(t.parseResult),c,!0))}}))}));function np(e,t){e.finalized||(e.finalized=!0)}function op({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||ru("_".repeat(t+1),!1)))}([e,t,n,...o])}const rp=ru("undefined",!1),sp=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Mu(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},ip=(e,t,n,o)=>lu(e,n,!1,!0,n.length?n[0].loc:o);function lp(e,t,n=ip){t.helper(za);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=Mu(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!ku(e)&&(l=!0),s.push(ou(e||ru("default",!0),n(t,void 0,o,r)))}let a=!1,u=!1;const d=[],p=new Set;let f=0;for(let e=0;e{const s=n(e,void 0,o,r);return t.compatConfig&&(s.isNonScopedSlot=!0),ou("default",s)};a?d.length&&d.some((e=>up(e)))&&(u?t.onError(wu(39,d[0].loc)):s.push(e(void 0,d))):s.push(e(void 0,o))}const h=l?2:ap(e.children)?3:1;let m=nu(s.concat(ou("_",ru(h+"",!1))),r);return i.length&&(m=iu(t.helper(Pa),[m,tu(i)])),{slots:m,hasDynamicSlots:l}}function cp(e,t,n){const o=[ou("name",e),ou("fn",t)];return null!=n&&o.push(ou("key",ru(String(n),!0))),nu(o)}function ap(e){for(let t=0;tfunction(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?function(e,t,n=!1){let{tag:o}=e;const r=gp(o),s=Lu(e,"is",!1,!0);if(s)if(r||Su("COMPILER_IS_ON_ELEMENT",t)){let e;if(6===s.type?e=s.value&&ru(s.value.content,!0):(e=s.exp,e||(e=ru("is",!1,s.arg.loc))),e)return iu(t.helper(Ta),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=Iu(o)||t.isBuiltInComponent(o);return i?(n||t.helper(i),i):(t.helper(Ia),t.components.add(o),Gu(o,"component"))}(e,t):`"${n}"`;const i=S(s)&&s.callee===Ta;let l,c,a,u,d,p=0,f=i||s===ha||s===ma||!r&&("svg"===n||"foreignObject"===n||"math"===n);if(o.length>0){const n=fp(e,t,void 0,r,i);l=n.props,p=n.patchFlag,u=n.dynamicPropNames;const o=n.directives;d=o&&o.length?tu(o.map((e=>function(e,t){const n=[],o=dp.get(e);o?n.push(t.helperString(o)):(t.helper(Ea),t.directives.add(e.name),n.push(Gu(e.name,"directive")));const{loc:r}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=ru("true",!1,r);n.push(nu(e.modifiers.map((e=>ou(e,t))),r))}return tu(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(f=!0)}if(e.children.length>0)if(s===ga&&(f=!0,p|=1024),r&&s!==ha&&s!==ga){const{slots:n,hasDynamicSlots:o}=lp(e,t);c=n,o&&(p|=1024)}else if(1===e.children.length&&s!==ha){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===Nd(n,t)&&(p|=1),c=r||2===o?n:e.children}else c=e.children;u&&u.length&&(a=function(e){let t="[";for(let n=0,o=e.length;n0;let h=!1,m=0,g=!1,v=!1,y=!1,S=!1,_=!1,x=!1;const C=[],w=e=>{u.length&&(d.push(nu(hp(u),c)),u=[]),e&&d.push(e)},k=()=>{t.scopes.vFor>0&&u.push(ou(ru("ref_for",!0),ru("true")))},I=({key:e,value:n})=>{if(ku(e)){const s=e.content,i=l(s);if(!i||o&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||T(s)||(S=!0),i&&T(s)&&(x=!0),i&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&Nd(n,t)>0)return;"ref"===s?g=!0:"class"===s?v=!0:"style"===s?y=!0:"key"===s||C.includes(s)||C.push(s),!o||"class"!==s&&"style"!==s||C.includes(s)||C.push(s)}else _=!0};for(let r=0;r"prop"===e.content))&&(m|=32);const x=t.directiveTransforms[n];if(x){const{props:n,needRuntime:o}=x(l,e,t);!s&&n.forEach(I),S&&r&&!ku(r)?w(nu(n,c)):u.push(...n),o&&(p.push(l),b(o)&&dp.set(l,o))}else E(n)||(p.push(l),f&&(h=!0))}}let D;if(d.length?(w(),D=d.length>1?iu(t.helper(Ma),d,c):d[0]):u.length&&(D=nu(hp(u),c)),_?m|=16:(v&&!o&&(m|=2),y&&!o&&(m|=4),C.length&&(m|=8),S&&(m|=32)),h||0!==m&&32!==m||!(g||x||p.length>0)||(m|=512),!t.inSSR&&D)switch(D.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t{if(Hu(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=function(e,t){let n,o='"default"';const r=[];for(let t=0;t0){const{props:o,directives:s}=fp(e,t,r,!1,!1);n=o,s.length&&t.onError(wu(36,s[0].loc))}return{slotName:o,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let l=2;s&&(i[2]=s,l=3),n.length&&(i[3]=lu([],n,!1,!1,o),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=iu(t.helper(Oa),i,o)}},yp=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let l;if(e.exp||s.length||n.onError(wu(35,r)),4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),l=ru(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?M(N(e)):`on:${e}`,!0,i.loc)}else l=su([`${n.helperString(Ua)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(Ua)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=Pu(c),t=!(e||(e=>Ru.test(Ou(e)))(c)),n=c.content.includes(";");(t||a&&e)&&(c=su([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[ou(l,c||ru("() => {}",!1,r))]};return o&&(u=o(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},bp=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e{if(1===e.type&&Mu(e,"once",!0)){if(Sp.has(e)||t.inVOnce||t.inSSR)return;return Sp.add(e),t.inVOnce=!0,t.helper(qa),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},xp=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return n.onError(wu(41,e.loc)),Cp();const s=o.loc.source.trim(),i=4===o.type?o.content:s,l=n.bindingMetadata[s];if("props"===l||"props-aliased"===l)return n.onError(wu(44,o.loc)),Cp();if(!i.trim()||!Pu(o))return n.onError(wu(42,o.loc)),Cp();const c=r||ru("modelValue",!0),a=r?ku(r)?`onUpdate:${N(r.content)}`:su(['"onUpdate:" + ',r]):"onUpdate:modelValue";let u;u=su([(n.isTS?"($event: any)":"$event")+" => ((",o,") = $event)"]);const d=[ou(c,e.exp),ou(a,u)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>e.content)).map((e=>(Eu(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?ku(r)?`${r.content}Modifiers`:su([r,' + "Modifiers"']):"modelModifiers";d.push(ou(n,ru(`{ ${t} }`,!1,e.loc,2)))}return Cp(d)};function Cp(e=[]){return{props:e}}const wp=/[\w).+\-_$\]]/,kp=(e,t)=>{Su("COMPILER_FILTERS",t)&&(5===e.type?Ip(e.content,t):1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&Ip(e.exp,t)})))};function Ip(e,t){if(4===e.type)Tp(e,t);else for(let n=0;n=0&&(e=n.charAt(t)," "===e);t--);e&&wp.test(e)||(u=!0)}}else void 0===i?(h=s+1,i=n.slice(0,s).trim()):g();function g(){m.push(n.slice(h,s).trim()),h=s+1}if(void 0===i?i=n.slice(0,s).trim():0!==h&&g(),m.length){for(s=0;s{if(1===e.type){const n=Mu(e,"memo");if(!n||Dp.has(e))return;return Dp.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&du(o,t),e.codegenNode=iu(t.helper(Xa),[n.exp,lu(void 0,o),"_cache",String(t.cached.length)]),t.cached.push(null))}}};function Np(e,t={}){const n=t.onError||xu,o="module"===t.mode;!0===t.prefixIdentifiers?n(wu(47)):o&&n(wu(48)),t.cacheHandlers&&n(wu(49)),t.scopeId&&!o&&n(wu(50));const r=a({},t,{prefixIdentifiers:!1}),s=y(e)?function(e,t){if(ld.reset(),Qu=null,Zu=null,ed="",td=-1,nd=-1,id.length=0,Yu=e,Ju=a({},Ku),t){let e;for(e in t)null!=t[e]&&(Ju[e]=t[e])}ld.mode="html"===Ju.parseMode?1:"sfc"===Ju.parseMode?2:0,ld.inXML=1===Ju.ns||2===Ju.ns;const n=t&&t.delimiters;n&&(ld.delimiterOpen=vu(n[0]),ld.delimiterClose=vu(n[1]));const o=Xu=function(e,t=""){return{type:0,source:t,children:[],helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Za}}(0,e);return ld.parse(Yu),o.loc=Cd(0,e.length),o.children=yd(o.children),Xu=null,o}(e,r):e,[i,l]=[[_p,Kd,Ap,tp,kp,vp,pp,sp,bp],{on:yp,bind:Qd,model:xp}];return Ld(s,a({},r,{nodeTransforms:[...i,...t.nodeTransforms||[]],directiveTransforms:a({},l,t.directiveTransforms||{})})),function(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){const f={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:a,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${Qa[e]}`,push(e,t=-2,n){f.code+=e},indent(){h(++f.indentLevel)},deindent(e=!1){e?--f.indentLevel:h(--f.indentLevel)},newline(){h(f.indentLevel)}};function h(e){f.push("\n"+" ".repeat(e),0)}return f}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:c,scopeId:a,ssr:u}=n,d=Array.from(e.helpers),p=d.length>0,f=!s&&"module"!==o;if(function(e,t){const{ssr:n,prefixIdentifiers:o,push:r,newline:s,runtimeModuleName:i,runtimeGlobalName:l,ssrRuntimeModuleName:c}=t,a=l,u=Array.from(e.helpers);u.length>0&&(r(`const _Vue = ${a}\n`,-1),e.hoists.length)&&r(`const { ${[_a,xa,Ca,wa,ka].filter((e=>u.includes(e))).map($d).join(", ")} } = _Vue\n`,-1),function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o}=t;o();for(let r=0;r0)&&c()),e.directives.length&&(Hd(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Hd(e.filters,"filter",n),c()),e.temps>0){r("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n",0),c()),u||r("return "),e.codegenNode?qd(e.codegenNode,n):r("null"),f&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(s,r)}const Op=Symbol(""),Pp=Symbol(""),Rp=Symbol(""),Mp=Symbol(""),Lp=Symbol(""),Fp=Symbol(""),Bp=Symbol(""),jp=Symbol(""),$p=Symbol(""),Hp=Symbol("");var Vp;let Up;Vp={[Op]:"vModelRadio",[Pp]:"vModelCheckbox",[Rp]:"vModelText",[Mp]:"vModelSelect",[Lp]:"vModelDynamic",[Fp]:"withModifiers",[Bp]:"withKeys",[jp]:"vShow",[$p]:"Transition",[Hp]:"TransitionGroup"},Object.getOwnPropertySymbols(Vp).forEach((e=>{Qa[e]=Vp[e]}));const qp={parseMode:"html",isVoidTag:te,isNativeTag:e=>Q(e)||Z(e)||ee(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,t=!1){return Up||(Up=document.createElement("div")),t?(Up.innerHTML=`
`,Up.children[0].getAttribute("foo")):(Up.innerHTML=e,Up.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?$p:"TransitionGroup"===e||"transition-group"===e?Hp:void 0,getNamespace(e,t,n){let o=t?t.ns:n;if(t&&2===o)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(o=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(o=0);else t&&1===o&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(o=0));if(0===o){if("svg"===e)return 1;if("math"===e)return 2}return o}},Wp=(e,t)=>{const n=J(e);return ru(JSON.stringify(n),!1,t,3)};function Gp(e,t){return wu(e,t)}const zp=n("passive,once,capture"),Kp=n("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Jp=n("left,right"),Xp=n("onkeyup,onkeydown,onkeypress"),Yp=(e,t)=>ku(e)&&"onclick"===e.content.toLowerCase()?ru(t,!0):4!==e.type?su(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,Qp=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},Zp=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:ru("style",!0,t.loc),exp:Wp(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],ef={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Gp(53,r)),t.children.length&&(n.onError(Gp(54,r)),t.children.length=0),{props:[ou(ru("innerHTML",!0,r),o||ru("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Gp(55,r)),t.children.length&&(n.onError(Gp(56,r)),t.children.length=0),{props:[ou(ru("textContent",!0),o?Nd(o,n)>0?o:iu(n.helperString(Ra),[o],r):ru("",!0))]}},model:(e,t,n)=>{const o=xp(e,t,n);if(!o.props.length||1===t.tagType)return o;e.arg&&n.onError(Gp(58,e.arg.loc));const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let i=Rp,l=!1;if("input"===r||s){const o=Lu(t,"type");if(o){if(7===o.type)i=Lp;else if(o.value)switch(o.value.content){case"radio":i=Op;break;case"checkbox":i=Pp;break;case"file":l=!0,n.onError(Gp(59,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=Lp)}else"select"===r&&(i=Mp);l||(o.needRuntime=n.helper(i))}else n.onError(Gp(57,e.loc));return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>yp(e,t,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n)=>{const o=[],r=[],s=[];for(let i=0;i{const{exp:o,loc:r}=e;return o||n.onError(Gp(61,r)),{props:[],needRuntime:n.helper(jp)}}},tf=Object.create(null);rl((function(e,n){if(!y(e)){if(!e.nodeType)return s;e=e.innerHTML}const o=function(e,t){return e+JSON.stringify(t,((e,t)=>"function"==typeof t?t.toString():t))}(e,n),r=tf[o];if(r)return r;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const i=a({hoistStatic:!0,onError:void 0,onWarn:s},n);i.isCustomElement||"undefined"==typeof customElements||(i.isCustomElement=e=>!!customElements.get(e));const{code:l}=function(e,t={}){return Np(e,a({},qp,t,{nodeTransforms:[Qp,...Zp,...t.nodeTransforms||[]],directiveTransforms:a({},ef,t.directiveTransforms||{}),transformHoist:null}))}(e,i),c=new Function("Vue",l)(t);return c._rc=!0,tf[o]=c}));const nf={data:function(){return{CSRFToken,APIroot,rootPath:"../",libsPath,orgchartPath,userID,designData:{},customizableTemplates:["homepage"],views:["homepage","testview"],custom_page_select:"homepage",appIsGettingData:!0,appIsPublishing:!1,isEditingMode:!0,iconList:[],tagsToRemove:["script","img","a","link","br"],dialogTitle:"",dialogFormContent:"",dialogButtonText:{confirm:"Save",cancel:"Cancel"},formSaveFunction:"",showFormDialog:!1}},provide:function(){var e=this;return{iconList:dl((function(){return e.iconList})),appIsGettingData:dl((function(){return e.appIsGettingData})),appIsPublishing:dl((function(){return e.appIsPublishing})),isEditingMode:dl((function(){return e.isEditingMode})),designData:dl((function(){return e.designData})),CSRFToken:this.CSRFToken,APIroot:this.APIroot,rootPath:this.rootPath,libsPath:this.libsPath,orgchartPath:this.orgchartPath,userID:this.userID,getDesignData:this.getDesignData,tagsToRemove:this.tagsToRemove,setCustom_page_select:this.setCustom_page_select,toggleEnableTemplate:this.toggleEnableTemplate,updateLocalDesignData:this.updateLocalDesignData,openDialog:this.openDialog,closeFormDialog:this.closeFormDialog,setDialogTitleHTML:this.setDialogTitleHTML,setDialogButtonText:this.setDialogButtonText,setDialogContent:this.setDialogContent,setDialogSaveFunction:this.setDialogSaveFunction,showFormDialog:dl((function(){return e.showFormDialog})),dialogTitle:dl((function(){return e.dialogTitle})),dialogFormContent:dl((function(){return e.dialogFormContent})),dialogButtonText:dl((function(){return e.dialogButtonText})),formSaveFunction:dl((function(){return e.formSaveFunction}))}},created:function(){this.getIconList()},methods:{setEditMode:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isEditingMode=e},setCustom_page_select:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"homepage";this.custom_page_select=e},getIconList:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"iconPicker/list"),success:function(t){return e.iconList=t||[]},error:function(e){return console.log(e)}})},toggleEnableTemplate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.customizableTemplates.includes(t)){var n=this.designData["".concat(t,"_enabled")],o=void 0===n||0===parseInt(n)?1:0;this.appIsPublishing=!0,$.ajax({type:"POST",url:"".concat(this.APIroot,"site/settings/enable_").concat(t),data:{CSRFToken:this.CSRFToken,enabled:o},success:function(n){1!=+(null==n?void 0:n.code)?console.log("unexpected response returned:",n):e.designData["".concat(t,"_enabled")]=o,e.appIsPublishing=!1},error:function(e){return console.log(e)}})}},getDesignData:function(){var e=this;this.appIsGettingData=!0,$.ajax({type:"GET",url:"".concat(this.APIroot,"system/settings"),success:function(t){e.designData=t,e.appIsGettingData=!1},error:function(e){console.log(e)}})},updateLocalDesignData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"{}";this.designData["".concat(e,"_design_json")]=t},openDialog:function(){this.showFormDialog=!0},closeFormDialog:function(){this.showFormDialog=!1,this.dialogTitle="",this.dialogFormContent="",this.dialogButtonText={confirm:"Save",cancel:"Cancel"}},setDialogTitleHTML:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogTitle=e},setDialogButtonText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirm,n=void 0===t?"":t,o=e.cancel,r=void 0===o?"":o;this.dialogButtonText={confirm:n,cancel:r}},setDialogContent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogFormContent=e},setDialogSaveFunction:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";"function"==typeof e&&(this.formSaveFunction=e)}},watch:{custom_page_select:function(e,t){this.views.includes(e)&&this.$router.push({name:this.custom_page_select})}}},of="undefined"!=typeof document;function rf(e){return"object"==typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}const sf=Object.assign;function lf(e,t){const n={};for(const o in t){const r=t[o];n[o]=af(r)?r.map(e):e(r)}return n}const cf=()=>{},af=Array.isArray,uf=/#/g,df=/&/g,pf=/\//g,ff=/=/g,hf=/\?/g,mf=/\+/g,gf=/%5B/g,vf=/%5D/g,yf=/%5E/g,bf=/%60/g,Sf=/%7B/g,_f=/%7C/g,xf=/%7D/g,Cf=/%20/g;function wf(e){return encodeURI(""+e).replace(_f,"|").replace(gf,"[").replace(vf,"]")}function kf(e){return wf(e).replace(mf,"%2B").replace(Cf,"+").replace(uf,"%23").replace(df,"%26").replace(bf,"`").replace(Sf,"{").replace(xf,"}").replace(yf,"^")}function If(e){return null==e?"":function(e){return wf(e).replace(uf,"%23").replace(hf,"%3F")}(e).replace(pf,"%2F")}function Tf(e){try{return decodeURIComponent(""+e)}catch(e){}return""+e}const Ef=/\/$/;function Df(e,t,n="/"){let o,r={},s="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(o=t.slice(0,c),s=t.slice(c+1,l>-1?l:t.length),r=e(s)),l>-1&&(o=o||t.slice(0,l),i=t.slice(l,t.length)),o=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];".."!==r&&"."!==r||o.push("");let s,i,l=n.length-1;for(s=0;s1&&l--}return n.slice(0,l).join("/")+"/"+o.slice(s).join("/")}(null!=o?o:t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:Tf(i)}}function Af(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function Nf(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Of(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!Pf(e[n],t[n]))return!1;return!0}function Pf(e,t){return af(e)?Rf(e,t):af(t)?Rf(t,e):e===t}function Rf(e,t){return af(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}const Mf={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Lf,Ff;!function(e){e.pop="pop",e.push="push"}(Lf||(Lf={})),function(e){e.back="back",e.forward="forward",e.unknown=""}(Ff||(Ff={}));const Bf=/^[^#]+#/;function jf(e,t){return e.replace(Bf,"#")+t}const $f=()=>({left:window.scrollX,top:window.scrollY});function Hf(e,t){return(history.state?history.state.position-t:-1)+e}const Vf=new Map;let Uf=()=>location.protocol+"//"+location.host;function qf(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let t=r.includes(e.slice(s))?e.slice(s).length:1,n=r.slice(t);return"/"!==n[0]&&(n="/"+n),Af(n,"")}return Af(n,e)+o+r}function Wf(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?$f():null}}function Gf(e){return"string"==typeof e||"symbol"==typeof e}const zf=Symbol("");var Kf;function Jf(e,t){return sf(new Error,{type:e,[zf]:!0},t)}function Xf(e,t){return e instanceof Error&&zf in e&&(null==t||!!(e.type&t))}!function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"}(Kf||(Kf={}));const Yf="[^/]+?",Qf={sensitive:!1,strict:!1,start:!0,end:!0},Zf=/[.+*?^${}()[\]/\\]/g;function eh(e,t){let n=0;for(;nt.length?1===t.length&&80===t[0]?1:-1:0}function th(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const oh={type:0,value:""},rh=/[a-zA-Z0-9_]/;function sh(e,t,n){const o=function(e,t){const n=sf({},Qf,t),o=[];let r=n.start?"^":"";const s=[];for(const t of e){const e=t.length?[]:[90];n.strict&&!t.length&&(r+="/");for(let o=0;o1&&("*"===l||"+"===l)&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:a,regexp:u,repeatable:"*"===l||"+"===l,optional:"*"===l||"?"===l})):t("Invalid state to consume buffer"),a="")}function p(){a+=l}for(;csf(e,t.meta)),{})}function dh(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function ph({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function fh(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let e=0;ee&&kf(e))):[o&&kf(o)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))})):void 0!==o&&(t+=(t.length?"&":"")+n)}return t}function mh(e){const t={};for(const n in e){const o=e[n];void 0!==o&&(t[n]=af(o)?o.map((e=>null==e?null:""+e)):null==o?o:""+o)}return t}const gh=Symbol(""),vh=Symbol(""),yh=Symbol(""),bh=Symbol(""),Sh=Symbol("");function _h(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function xh(e,t,n,o,r,s=e=>e()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise(((l,c)=>{const a=e=>{var s;!1===e?c(Jf(4,{from:n,to:t})):e instanceof Error?c(e):"string"==typeof(s=e)||s&&"object"==typeof s?c(Jf(2,{from:t,to:e})):(i&&o.enterCallbacks[r]===i&&"function"==typeof e&&i.push(e),l())},u=s((()=>e.call(o&&o.instances[r],t,n,a)));let d=Promise.resolve(u);e.length<3&&(d=d.then(a)),d.catch((e=>c(e)))}))}function Ch(e,t,n,o,r=e=>e()){const s=[];for(const i of e)for(const e in i.components){let l=i.components[e];if("beforeRouteEnter"===t||i.instances[e])if(rf(l)){const c=(l.__vccOpts||l)[t];c&&s.push(xh(c,n,o,i,e,r))}else{let c=l();s.push((()=>c.then((s=>{if(!s)throw new Error(`Couldn't resolve component "${e}" at "${i.path}"`);const l=(c=s).__esModule||"Module"===c[Symbol.toStringTag]||c.default&&rf(c.default)?s.default:s;var c;i.mods[e]=s,i.components[e]=l;const a=(l.__vccOpts||l)[t];return a&&xh(a,n,o,i,e,r)()}))))}}return s}function wh(e){const t=ds(yh),n=ds(bh),o=dl((()=>{const n=nn(e.to);return t.resolve(n)})),r=dl((()=>{const{matched:e}=o.value,{length:t}=e,r=e[t-1],s=n.matched;if(!r||!s.length)return-1;const i=s.findIndex(Nf.bind(null,r));if(i>-1)return i;const l=Ih(e[t-2]);return t>1&&Ih(r)===l&&s[s.length-1].path!==l?s.findIndex(Nf.bind(null,e[t-2])):i})),s=dl((()=>r.value>-1&&function(e,t){for(const n in t){const o=t[n],r=e[n];if("string"==typeof o){if(o!==r)return!1}else if(!af(r)||r.length!==o.length||o.some(((e,t)=>e!==r[t])))return!1}return!0}(n.params,o.value.params))),i=dl((()=>r.value>-1&&r.value===n.matched.length-1&&Of(n.params,o.value.params)));return{route:o,href:dl((()=>o.value.href)),isActive:s,isExactActive:i,navigate:function(n={}){return function(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}(n)?t[nn(e.replace)?"replace":"push"](nn(e.to)).catch(cf):Promise.resolve()}}}const kh=Do({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:wh,setup(e,{slots:t}){const n=Ft(wh(e)),{options:o}=ds(yh),r=dl((()=>({[Th(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[Th(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const o=t.default&&t.default(n);return e.custom?o:pl("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}});function Ih(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const Th=(e,t,n)=>null!=e?e:null!=t?t:n;function Eh(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const Dh=Do({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=ds(Sh),r=dl((()=>e.route||o.value)),s=ds(vh,0),i=dl((()=>{let e=nn(s);const{matched:t}=r.value;let n;for(;(n=t[e])&&!n.components;)e++;return e})),l=dl((()=>r.value.matched[i.value]));us(vh,dl((()=>i.value+1))),us(gh,l),us(Sh,r);const c=Yt();return qs((()=>[c.value,l.value,e.name]),(([e,t,n],[o,r,s])=>{t&&(t.instances[n]=e,r&&r!==t&&e&&e===o&&(t.leaveGuards.size||(t.leaveGuards=r.leaveGuards),t.updateGuards.size||(t.updateGuards=r.updateGuards))),!e||!t||r&&Nf(t,r)&&o||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=r.value,s=e.name,i=l.value,a=i&&i.components[s];if(!a)return Eh(n.default,{Component:a,route:o});const u=i.props[s],d=u?!0===u?o.params:"function"==typeof u?u(o):u:null,p=pl(a,sf({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(i.instances[s]=null)},ref:c}));return Eh(n.default,{Component:p,route:o})||p}}}),Ah={name:"custom-menu-item",data:function(){return{dyniconsPath:this.libsPath+"dynicons/svg/"}},props:{menuItem:{type:Object,required:!0}},inject:["libsPath","rootPath","builtInIDs","isEditingMode"],computed:{baseCardStyles:function(){return{backgroundColor:this.menuItem.bgColor}},anchorClasses:function(){var e;return"custom_menu_card"+(null!==(e=this.menuItem)&&void 0!==e&&e.link&&!1===this.isEditingMode?"":" disableClick")},href:function(){return this.builtInIDs.includes(this.menuItem.id)?this.rootPath+this.menuItem.link:this.menuItem.link}},template:'\n \n
\n

{{ menuItem.title }}

\n
{{ menuItem.subtitle }}
\n
\n
'};function Nh(e){return Nh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Nh(e)}function Oh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Ph(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=Array(t);n ( Emergency ) ':"",l=s?' style="background-color: red; color: black"':"",c=document.querySelector("#".concat(t.cellContainerID));null!==c&&(c.innerHTML='\n ').concat(t.recordID,'\n \n ').concat(n[t.recordID].title,'
\n ').concat(o,"").concat(i),c.addEventListener("click",(function(){window.location="".concat(e.rootPath,"index.php?a=printview&recordID=").concat(t.recordID)})))}},service:{name:"Service",indicatorID:"service",editable:!1,callback:function(t,n){var o=document.querySelector("#".concat(t.cellContainerID));null!==o&&(o.innerHTML=n[t.recordID].service,n[t.recordID].userID==e.userID&&(o.style.backgroundColor="#feffd1"))}},status:{name:"Status",indicatorID:"currentStatus",editable:!1,callback:function(t,n){var o=0==n[t.recordID].blockingStepID?"Pending ":"Waiting for ",r="";if(null==n[t.recordID].stepID&&"0"==n[t.recordID].submitted){var s=null==n[t.recordID].lastStatus?"Not Submitted":"Pending Re-submission";r=''.concat(s,"")}else if(null==n[t.recordID].stepID){var i=n[t.recordID].lastStatus;""==i&&(i='Check Status")),r=''+i+""}else r=o+n[t.recordID].stepTitle;n[t.recordID].deleted>0&&(r+=", Cancelled");var l=document.querySelector("#".concat(t.cellContainerID));null!==l&&(l.innerHTML=r,n[t.recordID].userID==e.userID&&(l.style.backgroundColor="#feffd1"))}},initiatorName:{name:"Initiator",indicatorID:"initiator",editable:!1,callback:function(e,t){var n=document.querySelector("#".concat(e.cellContainerID));null!==n&&(n.innerHTML=t[e.recordID].firstName+" "+t[e.recordID].lastName)}}},sort:{column:"recordID",direction:"desc"},headerOptions:["date","title","service","status","initiatorName"],chosenHeadersSelect:Bh(this.chosenHeaders),mostRecentHeaders:"",choicesSelectID:"choices_header_select",potentialJoins:["service","status","initiatorName","action_history","stepFulfillmentOnly","recordResolutionData"]}},mounted:function(){0===this.chosenHeadersSelect.length?(this.chosenHeadersSelect=["date","title","service","status"],this.createChoices(),this.postSearchSettings()):(this.createChoices(),this.main())},inject:["APIroot","CSRFToken","userID","rootPath","orgchartPath","isEditingMode","chosenHeaders"],methods:{createChoices:function(){var e=this,t=document.getElementById(this.choicesSelectID);if(null!==t&&!0===t.multiple&&"active"!==(null==t?void 0:t.getAttribute("data-choice"))){var n=Bh(this.chosenHeadersSelect);this.headerOptions.forEach((function(e){n.includes(e)||n.push(e)})),n=n.map((function(t){return{value:t,label:e.getLabel(t),selected:e.chosenHeadersSelect.includes(t)}}));var o=new Choices(t,{allowHTML:!1,removeItemButton:!0,editItems:!0,shouldSort:!1,choices:n});t.choicesjs=o}document.querySelector("#".concat(this.choicesSelectID," ~ input.choices__input")).setAttribute("aria-labelledby",this.choicesSelectID+"_label")},getLabel:function(e){var t="";switch(e.toLowerCase()){case"date":case"title":case"service":case"status":t=e;break;case"initiatorname":t="initiator"}return t},removeChoices:function(){var e=document.getElementById(this.choicesSelectID);void 0!==e.choicesjs&&"function"==typeof e.choicesjs.destroy&&e.choicesjs.destroy()},postSearchSettings:function(){var e=this;JSON.stringify(this.chosenHeadersSelect)!==this.mostRecentHeaders?(this.searchIsUpdating=!0,$.ajax({type:"POST",url:"".concat(this.APIroot,"site/settings/search_design_json"),data:{CSRFToken:this.CSRFToken,chosen_headers:this.chosenHeadersSelect},success:function(t){1!=+(null==t?void 0:t.code)&&console.log("unexpected response returned:",t),document.getElementById("searchContainer").innerHTML="",setTimeout((function(){e.main(),e.searchIsUpdating=!1}),150)},error:function(e){return console.log(e)}})):console.log("headers have not changed")},renderResult:function(e,t){var n=this,o=this.chosenHeadersSelect.map((function(e){return function(e){for(var t=1;t

'),document.querySelector("#btn_abortSearch").addEventListener("click",(function(){a=!0})),l+=c,t.setLimit(l,c),void t.execute();e.renderResult(n,i),window.scrollTo(0,u),document.querySelector("#searchContainer_getMoreResults").style.display=r?"none":"inline"}})),n.setSearchFunc((function(n){if(void 0===n||"undefined"===n){n="";var o=document.querySelector('input[id$="_searchtxt"]');null!==o&&(o.value="")}t.clearTerms(),i={},l=0,r=!1,u=0,a=!1;var s=!0,d={};try{d=JSON.parse(n)}catch(e){s=!1}if(""==(n=n?n.trim():""))t.addTerm("title","LIKE","*");else if(!isNaN(parseFloat(n))&&isFinite(n))t.addTerm("recordID","=",n);else if(s)for(var p in d)"data"!=d[p].id&&"dependencyID"!=d[p].id?t.addTerm(d[p].id,d[p].operator,d[p].match,d[p].gate):t.addDataTerm(d[p].id,d[p].indicatorID,d[p].operator,d[p].match,d[p].gate);else t.addTerm("title","LIKE","*"+n+"*");var f=!1;for(var h in t.getQuery().terms)if("stepID"==t.getQuery().terms[h].id&&"="==t.getQuery().terms[h].operator&&"deleted"==t.getQuery().terms[h].match){f=!0;break}return f||t.addTerm("deleted","=",0),t.setLimit(c),t.join("categoryName"),e.potentialJoins.forEach((function(n){e.chosenHeadersSelect.includes(n)&&t.join(n)})),t.sort("date","DESC"),t.execute()})),n.init(),document.querySelector("#"+n.getResultContainerID()).innerHTML="

Searching for records...

",document.querySelector("#searchContainer_getMoreResults").addEventListener("click",(function(){if(r=!0,u=window.scrollY,""==n.getSearchInput()){var e=t.getQuery();for(var o in e.terms)"userID"==e.terms[o].id&&e.terms.splice(o,1);t.setQuery(e)}l+=c,t.setLimit(l,c),t.execute()}))}},template:'
\n
\n
\n \n \n
\n \n
\n
\n \n
'};function Hh(e){return Hh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Hh(e)}function Vh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Uh(e,t,n){return(t=function(e){var t=function(e){if("object"!=Hh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Hh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Hh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qh,Wh=[{path:"/",redirect:{name:"homepage"}},{path:"/homepage",name:"homepage",component:{name:"homepage",data:function(){return{menuIsUpdating:!1,builtInIDs:["btn_reports","btn_bookmarks","btn_inbox","btn_new_request"],menuItem:{}}},created:function(){console.log("homepage view created, getting design data"),this.getDesignData()},mounted:function(){console.log("homepage mounted")},inject:["CSRFToken","APIroot","appIsGettingData","appIsPublishing","toggleEnableTemplate","updateLocalDesignData","getDesignData","designData","isEditingMode","showFormDialog","dialogFormContent","setDialogTitleHTML","setDialogContent","openDialog"],provide:function(){var e=this;return{menuItem:dl((function(){return e.menuItem})),menuDirection:dl((function(){return e.menuDirection})),menuItemList:dl((function(){return e.menuItemList})),chosenHeaders:dl((function(){return e.chosenHeaders})),menuIsUpdating:dl((function(){return e.menuIsUpdating})),builtInIDs:this.builtInIDs,setMenuItem:this.setMenuItem,updateMenuItemList:this.updateMenuItemList,postHomeMenuSettings:this.postHomeMenuSettings,postSearchSettings:this.postSearchSettings}},components:{LeafFormDialog:{data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var n=document.getElementById(t);null!==n&&n.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),n=document.getElementById("next"),o=document.getElementById("button_cancelchange"),r=t||n||o;null!==r&&"function"==typeof r.focus&&(r.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=0,o=0,r=0,s=0,i=function(e){(e=e||window.event).preventDefault(),n=r-e.clientX,o=s-e.clientY,r=e.clientX,s=e.clientY,t.style.top=t.offsetTop-o+"px",t.style.left=t.offsetLeft-n+"px",c()},l=function(){document.onmouseup=null,document.onmousemove=null},c=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),r=e.clientX,s=e.clientY,document.onmouseup=l,document.onmousemove=i})}},template:'\n \n \n '},DesignCardDialog:{name:"design-card-dialog",data:function(){var e,t,n,o,r,s,i,l,c,a,u,d;return{id:this.menuItem.id,order:(null===(e=this.menuItem)||void 0===e?void 0:e.order)||0,title:XSSHelpers.stripAllTags((null===(t=this.menuItem)||void 0===t?void 0:t.title)||""),titleColor:(null===(n=this.menuItem)||void 0===n?void 0:n.titleColor)||"#000000",subtitle:XSSHelpers.stripAllTags((null===(o=this.menuItem)||void 0===o?void 0:o.subtitle)||""),subtitleColor:(null===(r=this.menuItem)||void 0===r?void 0:r.subtitleColor)||"#000000",bgColor:(null===(s=this.menuItem)||void 0===s?void 0:s.bgColor)||"#ffffff",icon:(null===(i=this.menuItem)||void 0===i?void 0:i.icon)||"",link:XSSHelpers.stripAllTags((null===(l=this.menuItem)||void 0===l?void 0:l.link)||""),enabled:1==+(null===(c=this.menuItem)||void 0===c?void 0:c.enabled),iconPreviewSize:"30px",useTitleColor:(null===(a=this.menuItem)||void 0===a?void 0:a.titleColor)===(null===(u=this.menuItem)||void 0===u?void 0:u.subtitleColor),useAnIcon:""!==(null===(d=this.menuItem)||void 0===d?void 0:d.icon),markedForDeletion:!1}},mounted:function(){this.setDialogSaveFunction(this.onSave)},components:{CustomMenuItem:Ah},inject:["libsPath","menuItem","builtInIDs","updateMenuItemList","iconList","closeFormDialog","setDialogSaveFunction","setDialogButtonText"],computed:{menuItemOBJ:function(){return{id:this.id,order:this.order,title:XSSHelpers.stripAllTags(this.title),titleColor:this.titleColor,subtitle:XSSHelpers.stripAllTags(this.subtitle),subtitleColor:this.useTitleColor?this.titleColor:this.subtitleColor,bgColor:this.bgColor,icon:!0===this.useAnIcon?this.icon:"",link:XSSHelpers.stripAllTags(this.link),enabled:+this.enabled}},isBuiltInCard:function(){return this.builtInIDs.includes(this.id)},linkNotSet:function(){return!this.isBuiltInCard&&1==+this.enabled&&0!==this.link.indexOf("https://")},linkAttentionStyle:function(){return this.linkNotSet?"border: 2px solid #c00000":""}},methods:{getIconSrc:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.indexOf("dynicons/");return this.libsPath+e.slice(t)},setIcon:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).target.id,t=e.indexOf("svg/");t>-1&&(this.icon=e.slice(t+4))},onSave:function(){this.updateMenuItemList(this.menuItemOBJ,this.markedForDeletion),this.closeFormDialog()}},watch:{markedForDeletion:function(e,t){var n=document.getElementById("button_save");!0===e?(this.setDialogButtonText({confirm:"Delete",cancel:"Cancel"}),n.setAttribute("title","Delete"),n.style.backgroundColor="#b00000"):(this.setDialogButtonText({confirm:"Save",cancel:"Cancel"}),n.setAttribute("title","Save"),n.style.backgroundColor="#005EA2")}},template:'
\n

Card Preview

\n
\n \n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n \n
\n
\n
\n \n \n
\n
\n \n
\n
\n Icon Selections\n
\n \n
\n
\n
'},CustomHomeMenu:{name:"custom-home-menu",data:function(){return{menuDirectionSelection:this.menuDirection,builtInButtons:[{id:"btn_reports",order:-1,title:"Report Builder",titleColor:"#ffffff",subtitle:"View saved links to requests",subtitleColor:"#ffffff",bgColor:"#000000",icon:"x-office-spreadsheet.svg",link:"?a=reports&v=3",enabled:1},{id:"btn_bookmarks",order:-2,title:"Bookmarks",titleColor:"#000000",subtitle:"View saved links to requests",subtitleColor:"#000000",bgColor:"#7eb2b3",icon:"bookmark.svg",link:"?a=bookmarks",enabled:1},{id:"btn_inbox",order:-3,title:"Inbox",titleColor:"#000000",subtitle:"Review and apply actions to active requests",subtitleColor:"#000000",bgColor:"#b6ef6d",icon:"document-open.svg",link:"?a=inbox",enabled:1},{id:"btn_new_request",order:-4,title:"New Request",titleColor:"#ffffff",subtitle:"Start a new request",subtitleColor:"#ffffff",bgColor:"#2372b0",icon:"document-new.svg",link:"?a=newform",enabled:1}]}},components:{CustomMenuItem:Ah},inject:["isEditingMode","builtInIDs","menuItemList","menuDirection","menuIsUpdating","updateMenuItemList","postHomeMenuSettings","setMenuItem"],computed:{wrapperStyles:function(){return this.isEditingMode?{maxWidth:"500px",marginRight:"3rem"}:{}},ulStyles:function(){return"v"===this.menuDirectionSelection||this.isEditingMode?{flexDirection:"column",maxWidth:"430px"}:{flexWrap:"wrap"}},menuItemListDisplay:function(){return this.isEditingMode?this.menuItemList:this.menuItemList.filter((function(e){return 1==+e.enabled}))},allBuiltinsPresent:function(){var e=this,t=!0;return this.builtInIDs.forEach((function(n){!0!==t||e.menuItemList.some((function(e){return e.id===n}))||(t=!1)})),t}},methods:{addStarterCards:function(){var e=this,t=0,n=this.menuItemList.map((function(e){return Ph({},e)}));this.builtInButtons.forEach((function(o){!e.menuItemList.some((function(e){return e.id===o.id}))&&(n.unshift(Ph({},o)),t+=1)})),t>0&&this.postHomeMenuSettings(n,this.menuDirection)},onDragStart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=e&&e.dataTransfer&&(e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id))},onDrop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=e&&e.dataTransfer&&"move"===e.dataTransfer.effectAllowed){var t=e.dataTransfer.getData("text"),n=e.currentTarget,o=Array.from(document.querySelectorAll("ul#menu > li")),r=document.getElementById(t),s=o.filter((function(e){return e.id!==t})).find((function(t){return window.scrollY+e.clientY<=t.offsetTop+t.offsetHeight/2}));n.insertBefore(r,s),this.updateMenuItemList()}},clickToMove:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];32===(null==e?void 0:e.keyCode)&&e.preventDefault();var o=e.currentTarget.closest("ul"),r=document.getElementById(t),s=Array.from(o.querySelectorAll("li")),i=s.indexOf(r),l=s.filter((function(e){return e!==r})),c=n?i-1:i+1;c>-1&&c0&&void 0!==arguments[0]?arguments[0]:{};console.log("direction updated via input");var n=(null==t||null===(e=t.target)||void 0===e?void 0:e.value)||"";""!==n&&n!==this.menuDirection&&this.postHomeMenuSettings(this.menuItemList,this.menuDirectionSelection)}},template:'
\n
\n

Drag-Drop cards or use the up and down buttons to change their order.  Use the card menu to edit text and other values.

\n
\n \n
\n \n \n \n
\n
'},CustomSearch:$h},computed:{enabled:function(){var e;return 1===parseInt(null===(e=this.designData)||void 0===e?void 0:e.homepage_enabled)},menuItemList:function(){var e;if(this.appIsGettingData)e=null;else{var t,n=JSON.parse((null===(t=this.designData)||void 0===t?void 0:t.homepage_design_json)||"{}"),o=(null==n?void 0:n.menuCards)||[];o.map((function(e){e.link=XSSHelpers.decodeHTMLEntities(e.link),e.title=XSSHelpers.decodeHTMLEntities(e.title),e.subtitle=XSSHelpers.decodeHTMLEntities(e.subtitle)})),e=o.sort((function(e,t){return e.order-t.order}))}return e},menuDirection:function(){var e;if(this.appIsGettingData)e=null;else{var t,n=JSON.parse((null===(t=this.designData)||void 0===t?void 0:t.homepage_design_json)||"{}");e=(null==n?void 0:n.direction)||"v"}return e},chosenHeaders:function(){var e;if(this.appIsGettingData)e=null;else{var t,n=(null===(t=this.designData)||void 0===t?void 0:t.search_design_json)||"{}",o=JSON.parse(n);e=(null==o?void 0:o.chosenHeaders)||[]}return e}},methods:{openDesignButtonDialog:function(){this.setDialogTitleHTML("

Menu Editor

"),this.setDialogContent("design-card-dialog"),this.openDialog()},generateID:function(){var e="";do{for(var t=0;t<5;t++)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()))}while(this.buttonIDExists(e));return e},buttonIDExists:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.menuItemList.some((function(t){return(null==t?void 0:t.id)===e}))},setMenuItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.menuItem=null!==e?e:{id:this.generateID(),order:this.menuItemList.length,enabled:0},this.openDesignButtonDialog()},updateMenuItemList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.menuItemList.map((function(e){return function(e){for(var t=1;t li")).forEach((function(e){return o.push(e.id)})),n.forEach((function(e){var t=o.indexOf(e.id);t>-1&&(e.order=t)}))}else n=n.filter((function(t){return t.id!==e.id})),!0!==t&&n.push(e);this.postHomeMenuSettings(n,this.menuDirection)},postHomeMenuSettings:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.menuItemList,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuDirection;this.menuIsUpdating=!0,$.ajax({type:"POST",url:"".concat(this.APIroot,"site/settings/homepage_design_json"),data:{CSRFToken:this.CSRFToken,home_menu_list:t,menu_direction:n},success:function(o){if(1!=+(null==o?void 0:o.code))console.log("unexpected response returned:",o);else{var r=JSON.stringify({menuCards:t,direction:n});e.updateLocalDesignData("homepage",r)}e.menuIsUpdating=!1},error:function(e){return console.log(e)}})}},template:'
\n Loading... \n \n
\n
\n

\n {{ isEditingMode ? \'Editing the Homepage\' : \'Homepage Preview\'}}\n

\n

This page is {{ enabled ? \'\' : \'not\'}} enabled

\n \n
TODO banner section
\n
\n \n \n
\n \x3c!-- HOMEPAGE DIALOGS --\x3e\n \n \n \n
'}},{path:"/testview",name:"testview",component:{name:"testview",inject:["appIsGettingData","getDesignData","setCustom_page_select"],created:function(){console.log("testview created"),this.getDesignData(),this.setCustom_page_select("testview")},template:'
\n Loading... \n \n
\n

Test View

'}}],Gh=function(e){const t=function(e,t){const n=[],o=new Map;function r(e,n,o){const l=!o,c=lh(e);c.aliasOf=o&&o.record;const a=dh(t,e),u=[c];if("alias"in e){const t="string"==typeof e.alias?[e.alias]:e.alias;for(const e of t)u.push(lh(sf({},c,{components:o?o.record.components:c.components,path:e,aliasOf:o?o.record:c})))}let d,p;for(const t of u){const{path:u}=t;if(n&&"/"!==u[0]){const e=n.record.path,o="/"===e[e.length-1]?"":"/";t.path=n.record.path+(u&&o+u)}if(d=sh(t,n,a),o?o.alias.push(d):(p=p||d,p!==d&&p.alias.push(d),l&&e.name&&!ah(d)&&s(e.name)),ph(d)&&i(d),c.children){const e=c.children;for(let t=0;t{s(p)}:cf}function s(e){if(Gf(e)){const t=o.get(e);t&&(o.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(s),t.alias.forEach(s))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&o.delete(e.record.name),e.children.forEach(s),e.alias.forEach(s))}}function i(e){const t=function(e,t){let n=0,o=t.length;for(;n!==o;){const r=n+o>>1;th(e,t[r])<0?o=r:n=r+1}const r=function(e){let t=e;for(;t=t.parent;)if(ph(t)&&0===th(e,t))return t}(e);return r&&(o=t.lastIndexOf(r,o-1)),o}(e,n);n.splice(t,0,e),e.record.name&&!ah(e)&&o.set(e.record.name,e)}return t=dh({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>r(e))),{addRoute:r,resolve:function(e,t){let r,s,i,l={};if("name"in e&&e.name){if(r=o.get(e.name),!r)throw Jf(1,{location:e});i=r.record.name,l=sf(ih(t.params,r.keys.filter((e=>!e.optional)).concat(r.parent?r.parent.keys.filter((e=>e.optional)):[]).map((e=>e.name))),e.params&&ih(e.params,r.keys.map((e=>e.name)))),s=r.stringify(l)}else if(null!=e.path)s=e.path,r=n.find((e=>e.re.test(s))),r&&(l=r.parse(s),i=r.record.name);else{if(r=t.name?o.get(t.name):n.find((e=>e.re.test(t.path))),!r)throw Jf(1,{location:e,currentLocation:t});i=r.record.name,l=sf({},t.params,e.params),s=r.stringify(l)}const c=[];let a=r;for(;a;)c.unshift(a.record),a=a.parent;return{name:i,path:s,params:l,matched:c,meta:uh(c)}},removeRoute:s,clearRoutes:function(){n.length=0,o.clear()},getRoutes:function(){return n},getRecordMatcher:function(e){return o.get(e)}}}(e.routes,e),n=e.parseQuery||fh,o=e.stringifyQuery||hh,r=e.history,s=_h(),i=_h(),l=_h(),c=Qt(Mf);let a=Mf;of&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=lf.bind(null,(e=>""+e)),d=lf.bind(null,If),p=lf.bind(null,Tf);function f(e,s){if(s=sf({},s||c.value),"string"==typeof e){const o=Df(n,e,s.path),i=t.resolve({path:o.path},s),l=r.createHref(o.fullPath);return sf(o,i,{params:p(i.params),hash:Tf(o.hash),redirectedFrom:void 0,href:l})}let i;if(null!=e.path)i=sf({},e,{path:Df(n,e.path,s.path).path});else{const t=sf({},e.params);for(const e in t)null==t[e]&&delete t[e];i=sf({},e,{params:d(t)}),s.params=d(s.params)}const l=t.resolve(i,s),a=e.hash||"";l.params=u(p(l.params));const f=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,sf({},e,{hash:(h=a,wf(h).replace(Sf,"{").replace(xf,"}").replace(yf,"^")),path:l.path}));var h;const m=r.createHref(f);return sf({fullPath:f,hash:a,query:o===hh?mh(e.query):e.query||{}},l,{redirectedFrom:void 0,href:m})}function h(e){return"string"==typeof e?Df(n,e,c.value.path):sf({},e)}function m(e,t){if(a!==e)return Jf(8,{from:t,to:e})}function g(e){return y(e)}function v(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let o="function"==typeof n?n(e):n;return"string"==typeof o&&(o=o.includes("?")||o.includes("#")?o=h(o):{path:o},o.params={}),sf({query:e.query,hash:e.hash,params:null!=o.path?{}:e.params},o)}}function y(e,t){const n=a=f(e),r=c.value,s=e.state,i=e.force,l=!0===e.replace,u=v(n);if(u)return y(sf(h(u),{state:"object"==typeof u?sf({},s,u.state):s,force:i,replace:l}),t||n);const d=n;let p;return d.redirectedFrom=t,!i&&function(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Nf(t.matched[o],n.matched[r])&&Of(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,r,n)&&(p=Jf(16,{to:d,from:r}),A(r,r,!0,!1)),(p?Promise.resolve(p):_(d,r)).catch((e=>Xf(e)?Xf(e,2)?e:D(e):E(e,d,r))).then((e=>{if(e){if(Xf(e,2))return y(sf({replace:l},h(e.to),{state:"object"==typeof e.to?sf({},s,e.to.state):s,force:i}),t||d)}else e=C(d,r,!0,l,s);return x(d,r,e),e}))}function b(e,t){const n=m(e,t);return n?Promise.reject(n):Promise.resolve()}function S(e){const t=P.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function _(e,t){let n;const[o,r,l]=function(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;iNf(e,s)))?o.push(s):n.push(s));const l=e.matched[i];l&&(t.matched.find((e=>Nf(e,l)))||r.push(l))}return[n,o,r]}(e,t);n=Ch(o.reverse(),"beforeRouteLeave",e,t);for(const r of o)r.leaveGuards.forEach((o=>{n.push(xh(o,e,t))}));const c=b.bind(null,e,t);return n.push(c),M(n).then((()=>{n=[];for(const o of s.list())n.push(xh(o,e,t));return n.push(c),M(n)})).then((()=>{n=Ch(r,"beforeRouteUpdate",e,t);for(const o of r)o.updateGuards.forEach((o=>{n.push(xh(o,e,t))}));return n.push(c),M(n)})).then((()=>{n=[];for(const o of l)if(o.beforeEnter)if(af(o.beforeEnter))for(const r of o.beforeEnter)n.push(xh(r,e,t));else n.push(xh(o.beforeEnter,e,t));return n.push(c),M(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=Ch(l,"beforeRouteEnter",e,t,S),n.push(c),M(n)))).then((()=>{n=[];for(const o of i.list())n.push(xh(o,e,t));return n.push(c),M(n)})).catch((e=>Xf(e,8)?e:Promise.reject(e)))}function x(e,t,n){l.list().forEach((o=>S((()=>o(e,t,n)))))}function C(e,t,n,o,s){const i=m(e,t);if(i)return i;const l=t===Mf,a=of?history.state:{};n&&(o||l?r.replace(e.fullPath,sf({scroll:l&&a&&a.scroll},s)):r.push(e.fullPath,s)),c.value=e,A(e,t,n,l),D()}let w;let k,I=_h(),T=_h();function E(e,t,n){D(e);const o=T.list();return o.length?o.forEach((o=>o(e,t,n))):console.error(e),Promise.reject(e)}function D(e){return k||(k=!e,w||(w=r.listen(((e,t,n)=>{if(!R.listening)return;const o=f(e),s=v(o);if(s)return void y(sf(s,{replace:!0}),o).catch(cf);a=o;const i=c.value;var l,u;of&&(l=Hf(i.fullPath,n.delta),u=$f(),Vf.set(l,u)),_(o,i).catch((e=>Xf(e,12)?e:Xf(e,2)?(y(e.to,o).then((e=>{Xf(e,20)&&!n.delta&&n.type===Lf.pop&&r.go(-1,!1)})).catch(cf),Promise.reject()):(n.delta&&r.go(-n.delta,!1),E(e,o,i)))).then((e=>{(e=e||C(o,i,!1))&&(n.delta&&!Xf(e,8)?r.go(-n.delta,!1):n.type===Lf.pop&&Xf(e,20)&&r.go(-1,!1)),x(o,i,e)})).catch(cf)}))),I.list().forEach((([t,n])=>e?n(e):t())),I.reset()),e}function A(t,n,o,r){const{scrollBehavior:s}=e;if(!of||!s)return Promise.resolve();const i=!o&&function(e){const t=Vf.get(e);return Vf.delete(e),t}(Hf(t.fullPath,0))||(r||!o)&&history.state&&history.state.scroll||null;return Bn().then((()=>s(t,n,i))).then((e=>e&&function(e){let t;if("el"in e){const n=e.el,o="string"==typeof n&&n.startsWith("#"),r="string"==typeof n?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=function(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}(e))).catch((e=>E(e,t,n)))}const N=e=>r.go(e);let O;const P=new Set,R={currentRoute:c,listening:!0,addRoute:function(e,n){let o,r;return Gf(e)?(o=t.getRecordMatcher(e),r=n):r=e,t.addRoute(r,o)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},clearRoutes:t.clearRoutes,hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:f,options:e,push:g,replace:function(e){return g(sf(h(e),{replace:!0}))},go:N,back:()=>N(-1),forward:()=>N(1),beforeEach:s.add,beforeResolve:i.add,afterEach:l.add,onError:T.add,isReady:function(){return k&&c.value!==Mf?Promise.resolve():new Promise(((e,t)=>{I.add([e,t])}))},install(e){e.component("RouterLink",kh),e.component("RouterView",Dh),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>nn(c)}),of&&!O&&c.value===Mf&&(O=!0,g(r.location).catch((e=>{})));const t={};for(const e in Mf)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(yh,this),e.provide(bh,Bt(t)),e.provide(Sh,c);const n=e.unmount;P.add(e),e.unmount=function(){P.delete(e),P.size<1&&(a=Mf,w&&w(),w=null,c.value=Mf,O=!1,k=!1),n()}}};function M(e){return e.reduce(((e,t)=>e.then((()=>S(t)))),Promise.resolve())}return R}({history:((qh=location.host?qh||location.pathname+location.search:"").includes("#")||(qh+="#"),function(e){const t=function(e){const{history:t,location:n}=window,o={value:qf(e,n)},r={value:t.state};function s(o,s,i){const l=e.indexOf("#"),c=l>-1?(n.host&&document.querySelector("base")?e:e.slice(l))+o:Uf()+e+o;try{t[i?"replaceState":"pushState"](s,"",c),r.value=s}catch(e){console.error(e),n[i?"replace":"assign"](c)}}return r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:o,state:r,push:function(e,n){const i=sf({},r.value,t.state,{forward:e,scroll:$f()});s(i.current,i,!0),s(e,sf({},Wf(o.value,e,null),{position:i.position+1},n),!1),o.value=e},replace:function(e,n){s(e,sf({},t.state,Wf(r.value.back,e,r.value.forward,!0),n,{position:r.value.position}),!0),o.value=e}}}(e=function(e){if(!e)if(of){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(Ef,"")}(e)),n=function(e,t,n,o){let r=[],s=[],i=null;const l=({state:s})=>{const l=qf(e,location),c=n.value,a=t.value;let u=0;if(s){if(n.value=l,t.value=s,i&&i===c)return void(i=null);u=a?s.position-a.position:0}else o(l);r.forEach((e=>{e(n.value,c,{delta:u,type:Lf.pop,direction:u?u>0?Ff.forward:Ff.back:Ff.unknown})}))};function c(){const{history:e}=window;e.state&&e.replaceState(sf({},e.state,{scroll:$f()}),"")}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:function(){i=n.value},listen:function(e){r.push(e);const t=()=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)};return s.push(t),t},destroy:function(){for(const e of s)e();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}}}(e,t.state,t.location,t.replace),o=sf({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:jf.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}(qh)),routes:Wh});const zh=Gh;var Kh=la(nf);Kh.use(zh),Kh.mount("#site-designer-app")})(); \ No newline at end of file +(()=>{"use strict";var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};function n(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return e=>e in t}e.r(t),e.d(t,{BaseTransition:()=>io,BaseTransitionPropsValidators:()=>oo,Comment:()=>ti,DeprecationTypes:()=>dl,EffectScope:()=>pe,ErrorCodes:()=>pn,ErrorTypeStrings:()=>sl,Fragment:()=>Zs,KeepAlive:()=>Fo,ReactiveEffect:()=>ve,Static:()=>ni,Suspense:()=>Ks,Teleport:()=>Xn,Text:()=>ei,TrackOpTypes:()=>tn,Transition:()=>Cl,TransitionGroup:()=>yc,TriggerOpTypes:()=>nn,VueElement:()=>uc,assertNumber:()=>dn,callWithAsyncErrorHandling:()=>hn,callWithErrorHandling:()=>fn,camelize:()=>N,capitalize:()=>R,cloneVNode:()=>_i,compatUtils:()=>ul,computed:()=>Qi,createApp:()=>Jc,createBlock:()=>pi,createCommentVNode:()=>wi,createElementBlock:()=>di,createElementVNode:()=>yi,createHydrationRenderer:()=>ys,createPropsRestProxy:()=>Rr,createRenderer:()=>vs,createSSRApp:()=>Xc,createSlots:()=>pr,createStaticVNode:()=>Ci,createTextVNode:()=>xi,createVNode:()=>bi,customRef:()=>zt,defineAsyncComponent:()=>Ro,defineComponent:()=>ho,defineCustomElement:()=>lc,defineEmits:()=>xr,defineExpose:()=>Cr,defineModel:()=>Ir,defineOptions:()=>wr,defineProps:()=>_r,defineSSRCustomElement:()=>cc,defineSlots:()=>kr,devtools:()=>il,effect:()=>Ae,effectScope:()=>fe,getCurrentInstance:()=>Ri,getCurrentScope:()=>he,getCurrentWatcher:()=>ln,getTransitionRawChildren:()=>fo,guardReactiveProps:()=>Si,h:()=>Zi,handleError:()=>mn,hasInjectionContext:()=>Zr,hydrate:()=>zc,hydrateOnIdle:()=>Do,hydrateOnInteraction:()=>Oo,hydrateOnMediaQuery:()=>No,hydrateOnVisible:()=>Ao,initCustomFormatter:()=>el,initDirectivesForSSR:()=>ea,inject:()=>Qr,isMemoSame:()=>nl,isProxy:()=>Ot,isReactive:()=>Dt,isReadonly:()=>At,isRef:()=>Ft,isRuntimeOnly:()=>Gi,isShallow:()=>Nt,isVNode:()=>fi,markRaw:()=>Rt,mergeDefaults:()=>Or,mergeModels:()=>Pr,mergeProps:()=>Ei,nextTick:()=>Cn,normalizeClass:()=>X,normalizeProps:()=>Y,normalizeStyle:()=>W,onActivated:()=>jo,onBeforeMount:()=>Ko,onBeforeUnmount:()=>Yo,onBeforeUpdate:()=>Jo,onDeactivated:()=>$o,onErrorCaptured:()=>nr,onMounted:()=>zo,onRenderTracked:()=>tr,onRenderTriggered:()=>er,onScopeDispose:()=>me,onServerPrefetch:()=>Zo,onUnmounted:()=>Qo,onUpdated:()=>Xo,onWatcherCleanup:()=>cn,openBlock:()=>si,popScopeId:()=>Bn,provide:()=>Yr,proxyRefs:()=>Gt,pushScopeId:()=>Fn,queuePostFlushCb:()=>In,reactive:()=>wt,readonly:()=>It,ref:()=>Bt,registerRuntimeCompiler:()=>Wi,render:()=>Kc,renderList:()=>dr,renderSlot:()=>fr,resolveComponent:()=>sr,resolveDirective:()=>cr,resolveDynamicComponent:()=>lr,resolveFilter:()=>al,resolveTransitionHooks:()=>co,setBlockTracking:()=>ai,setDevtoolsHook:()=>ll,setTransitionHooks:()=>po,shallowReactive:()=>kt,shallowReadonly:()=>Tt,shallowRef:()=>jt,ssrContextKey:()=>Is,ssrUtils:()=>cl,stop:()=>Ne,toDisplayString:()=>le,toHandlerKey:()=>M,toHandlers:()=>mr,toRaw:()=>Pt,toRef:()=>Qt,toRefs:()=>Jt,toValue:()=>qt,transformVNodeArgs:()=>mi,triggerRef:()=>Ht,unref:()=>Ut,useAttrs:()=>Dr,useCssModule:()=>fc,useCssVars:()=>Hl,useHost:()=>dc,useId:()=>mo,useModel:()=>Ms,useSSRContext:()=>Ts,useShadowRoot:()=>pc,useSlots:()=>Er,useTemplateRef:()=>vo,useTransitionState:()=>to,vModelCheckbox:()=>Tc,vModelDynamic:()=>Rc,vModelRadio:()=>Dc,vModelSelect:()=>Ac,vModelText:()=>Ic,vShow:()=>jl,version:()=>ol,warn:()=>rl,watch:()=>Ns,watchEffect:()=>Es,watchPostEffect:()=>Ds,watchSyncEffect:()=>As,withAsyncContext:()=>Mr,withCtx:()=>$n,withDefaults:()=>Tr,withDirectives:()=>Vn,withKeys:()=>Vc,withMemo:()=>tl,withModifiers:()=>jc,withScopeId:()=>jn});const o={},r=[],s=()=>{},i=()=>!1,l=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),c=e=>e.startsWith("onUpdate:"),a=Object.assign,u=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},d=Object.prototype.hasOwnProperty,p=(e,t)=>d.call(e,t),f=Array.isArray,h=e=>"[object Map]"===C(e),m=e=>"[object Set]"===C(e),g=e=>"[object Date]"===C(e),v=e=>"function"==typeof e,y=e=>"string"==typeof e,b=e=>"symbol"==typeof e,S=e=>null!==e&&"object"==typeof e,_=e=>(S(e)||v(e))&&v(e.then)&&v(e.catch),x=Object.prototype.toString,C=e=>x.call(e),w=e=>C(e).slice(8,-1),k=e=>"[object Object]"===C(e),I=e=>y(e)&&"NaN"!==e&&"-"!==e[0]&&""+parseInt(e,10)===e,T=n(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),E=n("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),D=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},A=/-(\w)/g,N=D((e=>e.replace(A,((e,t)=>t?t.toUpperCase():"")))),O=/\B([A-Z])/g,P=D((e=>e.replace(O,"-$1").toLowerCase())),R=D((e=>e.charAt(0).toUpperCase()+e.slice(1))),M=D((e=>e?`on${R(e)}`:"")),L=(e,t)=>!Object.is(e,t),F=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:o,value:n})},j=e=>{const t=parseFloat(e);return isNaN(t)?e:t},V=e=>{const t=y(e)?Number(e):NaN;return isNaN(t)?e:t};let H;const U=()=>H||(H="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e.g?e.g:{}),q=n("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");function W(e){if(f(e)){const t={};for(let n=0;n{if(e){const n=e.split(K);n.length>1&&(t[n[0].trim()]=n[1].trim())}})),t}function X(e){let t="";if(y(e))t=e;else if(f(e))for(let n=0;nre(e,t)))}const ie=e=>!(!e||!0!==e.__v_isRef),le=e=>y(e)?e:null==e?"":f(e)||S(e)&&(e.toString===x||!v(e.toString))?ie(e)?le(e.value):JSON.stringify(e,ce,2):String(e),ce=(e,t)=>ie(t)?ce(e,t.value):h(t)?{[`Map(${t.size})`]:[...t.entries()].reduce(((e,[t,n],o)=>(e[ae(t,o)+" =>"]=n,e)),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map((e=>ae(e)))}:b(t)?ae(t):!S(t)||f(t)||k(t)?t:String(t),ae=(e,t="")=>{var n;return b(e)?`Symbol(${null!=(n=e.description)?n:t})`:e};let ue,de;class pe{constructor(e=!1){this.detached=e,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=ue,!e&&ue&&(this.index=(ue.scopes||(ue.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){let e,t;if(this._isPaused=!0,this.scopes)for(e=0,t=this.scopes.length;e0)return;if(be){let e=be;for(be=void 0;e;){const t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;ye;){let t=ye;for(ye=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,1&t.flags)try{t.trigger()}catch(t){e||(e=t)}t=n}}if(e)throw e}function we(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function ke(e){let t,n=e.depsTail,o=n;for(;o;){const e=o.prevDep;-1===o.version?(o===n&&(n=e),Ee(o),De(o)):t=o,o.dep.activeLink=o.prevActiveLink,o.prevActiveLink=void 0,o=e}e.deps=t,e.depsTail=n}function Ie(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Te(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Te(e){if(4&e.flags&&!(16&e.flags))return;if(e.flags&=-17,e.globalVersion===Fe)return;e.globalVersion=Fe;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!Ie(e))return void(e.flags&=-3);const n=de,o=Oe;de=e,Oe=!0;try{we(e);const n=e.fn(e._value);(0===t.version||L(n,e._value))&&(e._value=n,t.version++)}catch(e){throw t.version++,e}finally{de=n,Oe=o,ke(e),e.flags&=-3}}function Ee(e,t=!1){const{dep:n,prevSub:o,nextSub:r}=e;if(o&&(o.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=o,e.nextSub=void 0),n.subs===e&&(n.subs=o,!o&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)Ee(e,!0)}t||--n.sc||!n.map||n.map.delete(n.key)}function De(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function Ae(e,t){e.effect instanceof ve&&(e=e.effect.fn);const n=new ve(e);t&&a(n,t);try{n.run()}catch(e){throw n.stop(),e}const o=n.run.bind(n);return o.effect=n,o}function Ne(e){e.effect.stop()}let Oe=!0;const Pe=[];function Re(){Pe.push(Oe),Oe=!1}function Me(){const e=Pe.pop();Oe=void 0===e||e}function Le(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const e=de;de=void 0;try{t()}finally{de=e}}}let Fe=0;class Be{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class je{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(e){if(!de||!Oe||de===this.computed)return;let t=this.activeLink;if(void 0===t||t.sub!==de)t=this.activeLink=new Be(de,this),de.deps?(t.prevDep=de.depsTail,de.depsTail.nextDep=t,de.depsTail=t):de.deps=de.depsTail=t,$e(t);else if(-1===t.version&&(t.version=this.version,t.nextDep)){const e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=de.depsTail,t.nextDep=void 0,de.depsTail.nextDep=t,de.depsTail=t,de.deps===t&&(de.deps=e)}return t}trigger(e){this.version++,Fe++,this.notify(e)}notify(e){xe();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ce()}}}function $e(e){if(e.dep.sc++,4&e.sub.flags){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)$e(e)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Ve=new WeakMap,He=Symbol(""),Ue=Symbol(""),qe=Symbol("");function We(e,t,n){if(Oe&&de){let t=Ve.get(e);t||Ve.set(e,t=new Map);let o=t.get(n);o||(t.set(n,o=new je),o.map=t,o.key=n),o.track()}}function Ge(e,t,n,o,r,s){const i=Ve.get(e);if(!i)return void Fe++;const l=e=>{e&&e.trigger()};if(xe(),"clear"===t)i.forEach(l);else{const r=f(e),s=r&&I(n);if(r&&"length"===n){const e=Number(o);i.forEach(((t,n)=>{("length"===n||n===qe||!b(n)&&n>=e)&&l(t)}))}else switch((void 0!==n||i.has(void 0))&&l(i.get(n)),s&&l(i.get(qe)),t){case"add":r?s&&l(i.get("length")):(l(i.get(He)),h(e)&&l(i.get(Ue)));break;case"delete":r||(l(i.get(He)),h(e)&&l(i.get(Ue)));break;case"set":h(e)&&l(i.get(He))}}Ce()}function Ke(e){const t=Pt(e);return t===e?t:(We(t,0,qe),Nt(e)?t:t.map(Mt))}function ze(e){return We(e=Pt(e),0,qe),e}const Je={__proto__:null,[Symbol.iterator](){return Xe(this,Symbol.iterator,Mt)},concat(...e){return Ke(this).concat(...e.map((e=>f(e)?Ke(e):e)))},entries(){return Xe(this,"entries",(e=>(e[1]=Mt(e[1]),e)))},every(e,t){return Qe(this,"every",e,t,void 0,arguments)},filter(e,t){return Qe(this,"filter",e,t,(e=>e.map(Mt)),arguments)},find(e,t){return Qe(this,"find",e,t,Mt,arguments)},findIndex(e,t){return Qe(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return Qe(this,"findLast",e,t,Mt,arguments)},findLastIndex(e,t){return Qe(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return Qe(this,"forEach",e,t,void 0,arguments)},includes(...e){return et(this,"includes",e)},indexOf(...e){return et(this,"indexOf",e)},join(e){return Ke(this).join(e)},lastIndexOf(...e){return et(this,"lastIndexOf",e)},map(e,t){return Qe(this,"map",e,t,void 0,arguments)},pop(){return tt(this,"pop")},push(...e){return tt(this,"push",e)},reduce(e,...t){return Ze(this,"reduce",e,t)},reduceRight(e,...t){return Ze(this,"reduceRight",e,t)},shift(){return tt(this,"shift")},some(e,t){return Qe(this,"some",e,t,void 0,arguments)},splice(...e){return tt(this,"splice",e)},toReversed(){return Ke(this).toReversed()},toSorted(e){return Ke(this).toSorted(e)},toSpliced(...e){return Ke(this).toSpliced(...e)},unshift(...e){return tt(this,"unshift",e)},values(){return Xe(this,"values",Mt)}};function Xe(e,t,n){const o=ze(e),r=o[t]();return o===e||Nt(e)||(r._next=r.next,r.next=()=>{const e=r._next();return e.value&&(e.value=n(e.value)),e}),r}const Ye=Array.prototype;function Qe(e,t,n,o,r,s){const i=ze(e),l=i!==e&&!Nt(e),c=i[t];if(c!==Ye[t]){const t=c.apply(e,s);return l?Mt(t):t}let a=n;i!==e&&(l?a=function(t,o){return n.call(this,Mt(t),o,e)}:n.length>2&&(a=function(t,o){return n.call(this,t,o,e)}));const u=c.call(i,a,o);return l&&r?r(u):u}function Ze(e,t,n,o){const r=ze(e);let s=n;return r!==e&&(Nt(e)?n.length>3&&(s=function(t,o,r){return n.call(this,t,o,r,e)}):s=function(t,o,r){return n.call(this,t,Mt(o),r,e)}),r[t](s,...o)}function et(e,t,n){const o=Pt(e);We(o,0,qe);const r=o[t](...n);return-1!==r&&!1!==r||!Ot(n[0])?r:(n[0]=Pt(n[0]),o[t](...n))}function tt(e,t,n=[]){Re(),xe();const o=Pt(e)[t].apply(e,n);return Ce(),Me(),o}const nt=n("__proto__,__v_isRef,__isVue"),ot=new Set(Object.getOwnPropertyNames(Symbol).filter((e=>"arguments"!==e&&"caller"!==e)).map((e=>Symbol[e])).filter(b));function rt(e){b(e)||(e=String(e));const t=Pt(this);return We(t,0,e),t.hasOwnProperty(e)}class st{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){const o=this._isReadonly,r=this._isShallow;if("__v_isReactive"===t)return!o;if("__v_isReadonly"===t)return o;if("__v_isShallow"===t)return r;if("__v_raw"===t)return n===(o?r?Ct:xt:r?_t:St).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const s=f(e);if(!o){let e;if(s&&(e=Je[t]))return e;if("hasOwnProperty"===t)return rt}const i=Reflect.get(e,t,Ft(e)?e:n);return(b(t)?ot.has(t):nt(t))?i:(o||We(e,0,t),r?i:Ft(i)?s&&I(t)?i:i.value:S(i)?o?It(i):wt(i):i)}}class it extends st{constructor(e=!1){super(!1,e)}set(e,t,n,o){let r=e[t];if(!this._isShallow){const t=At(r);if(Nt(n)||At(n)||(r=Pt(r),n=Pt(n)),!f(e)&&Ft(r)&&!Ft(n))return!t&&(r.value=n,!0)}const s=f(e)&&I(t)?Number(t)e,ft=e=>Reflect.getPrototypeOf(e);function ht(e){return function(...t){return"delete"!==e&&("clear"===e?void 0:this)}}function mt(e,t){const n=function(e,t){const n={get(n){const o=this.__v_raw,r=Pt(o),s=Pt(n);e||(L(n,s)&&We(r,0,n),We(r,0,s));const{has:i}=ft(r),l=t?pt:e?Lt:Mt;return i.call(r,n)?l(o.get(n)):i.call(r,s)?l(o.get(s)):void(o!==r&&o.get(n))},get size(){const t=this.__v_raw;return!e&&We(Pt(t),0,He),Reflect.get(t,"size",t)},has(t){const n=this.__v_raw,o=Pt(n),r=Pt(t);return e||(L(t,r)&&We(o,0,t),We(o,0,r)),t===r?n.has(t):n.has(t)||n.has(r)},forEach(n,o){const r=this,s=r.__v_raw,i=Pt(s),l=t?pt:e?Lt:Mt;return!e&&We(i,0,He),s.forEach(((e,t)=>n.call(o,l(e),l(t),r)))}};return a(n,e?{add:ht("add"),set:ht("set"),delete:ht("delete"),clear:ht("clear")}:{add(e){t||Nt(e)||At(e)||(e=Pt(e));const n=Pt(this);return ft(n).has.call(n,e)||(n.add(e),Ge(n,"add",e,e)),this},set(e,n){t||Nt(n)||At(n)||(n=Pt(n));const o=Pt(this),{has:r,get:s}=ft(o);let i=r.call(o,e);i||(e=Pt(e),i=r.call(o,e));const l=s.call(o,e);return o.set(e,n),i?L(n,l)&&Ge(o,"set",e,n):Ge(o,"add",e,n),this},delete(e){const t=Pt(this),{has:n,get:o}=ft(t);let r=n.call(t,e);r||(e=Pt(e),r=n.call(t,e)),o&&o.call(t,e);const s=t.delete(e);return r&&Ge(t,"delete",e,void 0),s},clear(){const e=Pt(this),t=0!==e.size,n=e.clear();return t&&Ge(e,"clear",void 0,void 0),n}}),["keys","values","entries",Symbol.iterator].forEach((o=>{n[o]=function(e,t,n){return function(...o){const r=this.__v_raw,s=Pt(r),i=h(s),l="entries"===e||e===Symbol.iterator&&i,c="keys"===e&&i,a=r[e](...o),u=n?pt:t?Lt:Mt;return!t&&We(s,0,c?Ue:He),{next(){const{value:e,done:t}=a.next();return t?{value:e,done:t}:{value:l?[u(e[0]),u(e[1])]:u(e),done:t}},[Symbol.iterator](){return this}}}}(o,e,t)})),n}(e,t);return(t,o,r)=>"__v_isReactive"===o?!e:"__v_isReadonly"===o?e:"__v_raw"===o?t:Reflect.get(p(n,o)&&o in t?n:t,o,r)}const gt={get:mt(!1,!1)},vt={get:mt(!1,!0)},yt={get:mt(!0,!1)},bt={get:mt(!0,!0)},St=new WeakMap,_t=new WeakMap,xt=new WeakMap,Ct=new WeakMap;function wt(e){return At(e)?e:Et(e,!1,ct,gt,St)}function kt(e){return Et(e,!1,ut,vt,_t)}function It(e){return Et(e,!0,at,yt,xt)}function Tt(e){return Et(e,!0,dt,bt,Ct)}function Et(e,t,n,o,r){if(!S(e))return e;if(e.__v_raw&&(!t||!e.__v_isReactive))return e;const s=r.get(e);if(s)return s;const i=(l=e).__v_skip||!Object.isExtensible(l)?0:function(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}(w(l));var l;if(0===i)return e;const c=new Proxy(e,2===i?o:n);return r.set(e,c),c}function Dt(e){return At(e)?Dt(e.__v_raw):!(!e||!e.__v_isReactive)}function At(e){return!(!e||!e.__v_isReadonly)}function Nt(e){return!(!e||!e.__v_isShallow)}function Ot(e){return!!e&&!!e.__v_raw}function Pt(e){const t=e&&e.__v_raw;return t?Pt(t):e}function Rt(e){return!p(e,"__v_skip")&&Object.isExtensible(e)&&B(e,"__v_skip",!0),e}const Mt=e=>S(e)?wt(e):e,Lt=e=>S(e)?It(e):e;function Ft(e){return!!e&&!0===e.__v_isRef}function Bt(e){return $t(e,!1)}function jt(e){return $t(e,!0)}function $t(e,t){return Ft(e)?e:new Vt(e,t)}class Vt{constructor(e,t){this.dep=new je,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:Pt(e),this._value=t?e:Mt(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){const t=this._rawValue,n=this.__v_isShallow||Nt(e)||At(e);e=n?e:Pt(e),L(e,t)&&(this._rawValue=e,this._value=n?e:Mt(e),this.dep.trigger())}}function Ht(e){e.dep&&e.dep.trigger()}function Ut(e){return Ft(e)?e.value:e}function qt(e){return v(e)?e():Ut(e)}const Wt={get:(e,t,n)=>"__v_raw"===t?e:Ut(Reflect.get(e,t,n)),set:(e,t,n,o)=>{const r=e[t];return Ft(r)&&!Ft(n)?(r.value=n,!0):Reflect.set(e,t,n,o)}};function Gt(e){return Dt(e)?e:new Proxy(e,Wt)}class Kt{constructor(e){this.__v_isRef=!0,this._value=void 0;const t=this.dep=new je,{get:n,set:o}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=o}get value(){return this._value=this._get()}set value(e){this._set(e)}}function zt(e){return new Kt(e)}function Jt(e){const t=f(e)?new Array(e.length):{};for(const n in e)t[n]=Zt(e,n);return t}class Xt{constructor(e,t,n){this._object=e,this._key=t,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=void 0===e?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return function(e,t){const n=Ve.get(e);return n&&n.get(t)}(Pt(this._object),this._key)}}class Yt{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function Qt(e,t,n){return Ft(e)?e:v(e)?new Yt(e):S(e)&&arguments.length>1?Zt(e,t,n):Bt(e)}function Zt(e,t,n){const o=e[t];return Ft(o)?o:new Xt(e,t,n)}class en{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new je(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Fe-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(8&this.flags||de===this))return _e(this,!0),!0}get value(){const e=this.dep.track();return Te(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}const tn={GET:"get",HAS:"has",ITERATE:"iterate"},nn={SET:"set",ADD:"add",DELETE:"delete",CLEAR:"clear"},on={},rn=new WeakMap;let sn;function ln(){return sn}function cn(e,t=!1,n=sn){if(n){let t=rn.get(n);t||rn.set(n,t=[]),t.push(e)}}function an(e,t=1/0,n){if(t<=0||!S(e)||e.__v_skip)return e;if((n=n||new Set).has(e))return e;if(n.add(e),t--,Ft(e))an(e.value,t,n);else if(f(e))for(let o=0;o{an(e,t,n)}));else if(k(e)){for(const o in e)an(e[o],t,n);for(const o of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,o)&&an(e[o],t,n)}return e}const un=[];function dn(e,t){}const pn={SETUP_FUNCTION:0,0:"SETUP_FUNCTION",RENDER_FUNCTION:1,1:"RENDER_FUNCTION",NATIVE_EVENT_HANDLER:5,5:"NATIVE_EVENT_HANDLER",COMPONENT_EVENT_HANDLER:6,6:"COMPONENT_EVENT_HANDLER",VNODE_HOOK:7,7:"VNODE_HOOK",DIRECTIVE_HOOK:8,8:"DIRECTIVE_HOOK",TRANSITION_HOOK:9,9:"TRANSITION_HOOK",APP_ERROR_HANDLER:10,10:"APP_ERROR_HANDLER",APP_WARN_HANDLER:11,11:"APP_WARN_HANDLER",FUNCTION_REF:12,12:"FUNCTION_REF",ASYNC_COMPONENT_LOADER:13,13:"ASYNC_COMPONENT_LOADER",SCHEDULER:14,14:"SCHEDULER",COMPONENT_UPDATE:15,15:"COMPONENT_UPDATE",APP_UNMOUNT_CLEANUP:16,16:"APP_UNMOUNT_CLEANUP"};function fn(e,t,n,o){try{return o?e(...o):e()}catch(e){mn(e,t,n)}}function hn(e,t,n,o){if(v(e)){const r=fn(e,t,n,o);return r&&_(r)&&r.catch((e=>{mn(e,t,n)})),r}if(f(e)){const r=[];for(let s=0;s=Dn(n)?gn.push(e):gn.splice(function(e){let t=vn+1,n=gn.length;for(;t>>1,r=gn[o],s=Dn(r);sDn(e)-Dn(t)));if(yn.length=0,bn)return void bn.push(...e);for(bn=e,Sn=0;Snnull==e.id?2&e.flags?-1:1/0:e.id;function An(e){try{for(vn=0;vn$n;function $n(e,t=Rn,n){if(!t)return e;if(e._n)return e;const o=(...n)=>{o._d&&ai(-1);const r=Ln(t);let s;try{s=e(...n)}finally{Ln(r),o._d&&ai(1)}return s};return o._n=!0,o._c=!0,o._d=!0,o}function Vn(e,t){if(null===Rn)return e;const n=Xi(Rn),r=e.dirs||(e.dirs=[]);for(let e=0;ee.__isTeleport,Wn=e=>e&&(e.disabled||""===e.disabled),Gn=e=>"undefined"!=typeof SVGElement&&e instanceof SVGElement,Kn=e=>"function"==typeof MathMLElement&&e instanceof MathMLElement,zn=(e,t)=>{const n=e&&e.to;return y(n)?t?t(n):null:n};function Jn(e,t,n,{o:{insert:o},m:r},s=2){0===s&&o(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:a,props:u}=e,d=2===s;if(d&&o(i,t,n),(!d||Wn(u))&&16&c)for(let e=0;e{16&y&&(r&&r.isCE&&(r.ce._teleportTarget=e),u(b,e,t,r,s,i,l,c))},p=()=>{const e=t.target=zn(t.props,h),n=Qn(e,t,m,f);e&&("svg"!==i&&Gn(e)?i="svg":"mathml"!==i&&Kn(e)&&(i="mathml"),v||(d(e,n),Yn(t,!1)))};v&&(d(n,a),Yn(t,!0)),(_=t.props)&&(_.defer||""===_.defer)?gs(p,s):p()}else{t.el=e.el,t.targetStart=e.targetStart;const o=t.anchor=e.anchor,u=t.target=e.target,f=t.targetAnchor=e.targetAnchor,m=Wn(e.props),g=m?n:u,y=m?o:f;if("svg"===i||Gn(u)?i="svg":("mathml"===i||Kn(u))&&(i="mathml"),S?(p(e.dynamicChildren,S,g,r,s,i,l),Cs(e,t,!0)):c||d(e,t,g,y,r,s,i,l,!1),v)m?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Jn(t,n,o,a,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const e=t.target=zn(t.props,h);e&&Jn(t,e,null,a,0)}else m&&Jn(t,u,f,a,1);Yn(t,v)}var _},remove(e,t,n,{um:o,o:{remove:r}},s){const{shapeFlag:i,children:l,anchor:c,targetStart:a,targetAnchor:u,target:d,props:p}=e;if(d&&(r(a),r(u)),s&&r(c),16&i){const e=s||!Wn(p);for(let r=0;r{e.isMounted=!0})),Yo((()=>{e.isUnmounting=!0})),e}const no=[Function,Array],oo={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:no,onEnter:no,onAfterEnter:no,onEnterCancelled:no,onBeforeLeave:no,onLeave:no,onAfterLeave:no,onLeaveCancelled:no,onBeforeAppear:no,onAppear:no,onAfterAppear:no,onAppearCancelled:no},ro=e=>{const t=e.subTree;return t.component?ro(t.component):t};function so(e){let t=e[0];if(e.length>1){let n=!1;for(const o of e)if(o.type!==ti){t=o,n=!0;break}}return t}const io={name:"BaseTransition",props:oo,setup(e,{slots:t}){const n=Ri(),o=to();return()=>{const r=t.default&&fo(t.default(),!0);if(!r||!r.length)return;const s=so(r),i=Pt(e),{mode:l}=i;if(o.isLeaving)return ao(s);const c=uo(s);if(!c)return ao(s);let a=co(c,i,o,n,(e=>a=e));c.type!==ti&&po(c,a);const u=n.subTree,d=u&&uo(u);if(d&&d.type!==ti&&!hi(c,d)&&ro(n).type!==ti){const e=co(d,i,o,n);if(po(d,e),"out-in"===l&&c.type!==ti)return o.isLeaving=!0,e.afterLeave=()=>{o.isLeaving=!1,8&n.job.flags||n.update(),delete e.afterLeave},ao(s);"in-out"===l&&c.type!==ti&&(e.delayLeave=(e,t,n)=>{lo(o,d)[String(d.key)]=d,e[Zn]=()=>{t(),e[Zn]=void 0,delete a.delayedLeave},a.delayedLeave=n})}return s}}};function lo(e,t){const{leavingVNodes:n}=e;let o=n.get(t.type);return o||(o=Object.create(null),n.set(t.type,o)),o}function co(e,t,n,o,r){const{appear:s,mode:i,persisted:l=!1,onBeforeEnter:c,onEnter:a,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:h,onAfterLeave:m,onLeaveCancelled:g,onBeforeAppear:v,onAppear:y,onAfterAppear:b,onAppearCancelled:S}=t,_=String(e.key),x=lo(n,e),C=(e,t)=>{e&&hn(e,o,9,t)},w=(e,t)=>{const n=t[1];C(e,t),f(e)?e.every((e=>e.length<=1))&&n():e.length<=1&&n()},k={mode:i,persisted:l,beforeEnter(t){let o=c;if(!n.isMounted){if(!s)return;o=v||c}t[Zn]&&t[Zn](!0);const r=x[_];r&&hi(e,r)&&r.el[Zn]&&r.el[Zn](),C(o,[t])},enter(e){let t=a,o=u,r=d;if(!n.isMounted){if(!s)return;t=y||a,o=b||u,r=S||d}let i=!1;const l=e[eo]=t=>{i||(i=!0,C(t?r:o,[e]),k.delayedLeave&&k.delayedLeave(),e[eo]=void 0)};t?w(t,[e,l]):l()},leave(t,o){const r=String(e.key);if(t[eo]&&t[eo](!0),n.isUnmounting)return o();C(p,[t]);let s=!1;const i=t[Zn]=n=>{s||(s=!0,o(),C(n?g:m,[t]),t[Zn]=void 0,x[r]===e&&delete x[r])};x[r]=e,h?w(h,[t,i]):i()},clone(e){const s=co(e,t,n,o,r);return r&&r(s),s}};return k}function ao(e){if(Lo(e))return(e=_i(e)).children=null,e}function uo(e){if(!Lo(e))return qn(e.type)&&e.children?so(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(16&t)return n[0];if(32&t&&v(n.default))return n.default()}}function po(e,t){6&e.shapeFlag&&e.component?(e.transition=t,po(e.component.subTree,t)):128&e.shapeFlag?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function fo(e,t=!1,n){let o=[],r=0;for(let s=0;s1)for(let e=0;ea({name:e.name},t,{setup:e}))():e}function mo(){const e=Ri();return e?(e.appContext.config.idPrefix||"v")+"-"+e.ids[0]+e.ids[1]++:""}function go(e){e.ids=[e.ids[0]+e.ids[2]+++"-",0,0]}function vo(e){const t=Ri(),n=jt(null);if(t){const r=t.refs===o?t.refs={}:t.refs;Object.defineProperty(r,e,{enumerable:!0,get:()=>n.value,set:e=>n.value=e})}return n}function yo(e,t,n,r,s=!1){if(f(e))return void e.forEach(((e,o)=>yo(e,t&&(f(t)?t[o]:t),n,r,s)));if(Po(r)&&!s)return;const i=4&r.shapeFlag?Xi(r.component):r.el,l=s?null:i,{i:c,r:a}=e,d=t&&t.r,h=c.refs===o?c.refs={}:c.refs,m=c.setupState,g=Pt(m),b=m===o?()=>!1:e=>p(g,e);if(null!=d&&d!==a&&(y(d)?(h[d]=null,b(d)&&(m[d]=null)):Ft(d)&&(d.value=null)),v(a))fn(a,c,12,[l,h]);else{const t=y(a),o=Ft(a);if(t||o){const r=()=>{if(e.f){const n=t?b(a)?m[a]:h[a]:a.value;s?f(n)&&u(n,i):f(n)?n.includes(i)||n.push(i):t?(h[a]=[i],b(a)&&(m[a]=h[a])):(a.value=[i],e.k&&(h[e.k]=a.value))}else t?(h[a]=l,b(a)&&(m[a]=l)):o&&(a.value=l,e.k&&(h[e.k]=l))};l?(r.id=-1,gs(r,n)):r()}}}let bo=!1;const So=()=>{bo||(console.error("Hydration completed but contains mismatches."),bo=!0)},_o=e=>{if(1===e.nodeType)return(e=>e.namespaceURI.includes("svg")&&"foreignObject"!==e.tagName)(e)?"svg":(e=>e.namespaceURI.includes("MathML"))(e)?"mathml":void 0},xo=e=>8===e.nodeType;function Co(e){const{mt:t,p:n,o:{patchProp:o,createText:r,nextSibling:s,parentNode:i,remove:c,insert:a,createComment:u}}=e,d=(n,o,l,c,u,b=!1)=>{b=b||!!o.dynamicChildren;const S=xo(n)&&"["===n.data,_=()=>m(n,o,l,c,u,S),{type:x,ref:C,shapeFlag:w,patchFlag:k}=o;let I=n.nodeType;o.el=n,-2===k&&(b=!1,o.dynamicChildren=null);let T=null;switch(x){case ei:3!==I?""===o.children?(a(o.el=r(""),i(n),n),T=n):T=_():(n.data!==o.children&&(So(),n.data=o.children),T=s(n));break;case ti:y(n)?(T=s(n),v(o.el=n.content.firstChild,n,l)):T=8!==I||S?_():s(n);break;case ni:if(S&&(I=(n=s(n)).nodeType),1===I||3===I){T=n;const e=!o.children.length;for(let t=0;t{i=i||!!t.dynamicChildren;const{type:a,props:u,patchFlag:d,shapeFlag:p,dirs:h,transition:m}=t,g="input"===a||"option"===a;if(g||-1!==d){h&&Hn(t,null,n,"created");let a,b=!1;if(y(e)){b=xs(null,m)&&n&&n.vnode.props&&n.vnode.props.appear;const o=e.content.firstChild;b&&m.beforeEnter(o),v(o,e,n),t.el=e=o}if(16&p&&(!u||!u.innerHTML&&!u.textContent)){let o=f(e.firstChild,t,e,n,r,s,i);for(;o;){Io(e,1)||So();const t=o;o=o.nextSibling,c(t)}}else if(8&p){let n=t.children;"\n"!==n[0]||"PRE"!==e.tagName&&"TEXTAREA"!==e.tagName||(n=n.slice(1)),e.textContent!==n&&(Io(e,0)||So(),e.textContent=t.children)}if(u)if(g||!i||48&d){const t=e.tagName.includes("-");for(const r in u)(g&&(r.endsWith("value")||"indeterminate"===r)||l(r)&&!T(r)||"."===r[0]||t)&&o(e,r,null,u[r],void 0,n)}else if(u.onClick)o(e,"onClick",null,u.onClick,void 0,n);else if(4&d&&Dt(u.style))for(const e in u.style)u.style[e];(a=u&&u.onVnodeBeforeMount)&&Di(a,n,t),h&&Hn(t,null,n,"beforeMount"),((a=u&&u.onVnodeMounted)||h||b)&&Ys((()=>{a&&Di(a,n,t),b&&m.enter(e),h&&Hn(t,null,n,"mounted")}),r)}return e.nextSibling},f=(e,t,o,i,l,c,u)=>{u=u||!!t.dynamicChildren;const p=t.children,f=p.length;for(let t=0;t{const{slotScopeIds:c}=t;c&&(r=r?r.concat(c):c);const d=i(e),p=f(s(e),t,d,n,o,r,l);return p&&xo(p)&&"]"===p.data?s(t.anchor=p):(So(),a(t.anchor=u("]"),d,p),p)},m=(e,t,o,r,l,a)=>{if(Io(e.parentElement,1)||So(),t.el=null,a){const t=g(e);for(;;){const n=s(e);if(!n||n===t)break;c(n)}}const u=s(e),d=i(e);return c(e),n(null,t,d,u,o,r,_o(d),l),u},g=(e,t="[",n="]")=>{let o=0;for(;e;)if((e=s(e))&&xo(e)&&(e.data===t&&o++,e.data===n)){if(0===o)return s(e);o--}return e},v=(e,t,n)=>{const o=t.parentNode;o&&o.replaceChild(e,t);let r=n;for(;r;)r.vnode.el===t&&(r.vnode.el=r.subTree.el=e),r=r.parent},y=e=>1===e.nodeType&&"TEMPLATE"===e.tagName;return[(e,t)=>{if(!t.hasChildNodes())return n(null,e,t),En(),void(t._vnode=e);d(t.firstChild,e,null,null,null),En(),t._vnode=e},d]}const wo="data-allow-mismatch",ko={0:"text",1:"children",2:"class",3:"style",4:"attribute"};function Io(e,t){if(0===t||1===t)for(;e&&!e.hasAttribute(wo);)e=e.parentElement;const n=e&&e.getAttribute(wo);if(null==n)return!1;if(""===n)return!0;{const e=n.split(",");return!(0!==t||!e.includes("children"))||n.split(",").includes(ko[t])}}const To=U().requestIdleCallback||(e=>setTimeout(e,1)),Eo=U().cancelIdleCallback||(e=>clearTimeout(e)),Do=(e=1e4)=>t=>{const n=To(t,{timeout:e});return()=>Eo(n)},Ao=e=>(t,n)=>{const o=new IntersectionObserver((e=>{for(const n of e)if(n.isIntersecting){o.disconnect(),t();break}}),e);return n((e=>{if(e instanceof Element)return function(e){const{top:t,left:n,bottom:o,right:r}=e.getBoundingClientRect(),{innerHeight:s,innerWidth:i}=window;return(t>0&&t0&&o0&&n0&&ro.disconnect()},No=e=>t=>{if(e){const n=matchMedia(e);if(!n.matches)return n.addEventListener("change",t,{once:!0}),()=>n.removeEventListener("change",t);t()}},Oo=(e=[])=>(t,n)=>{y(e)&&(e=[e]);let o=!1;const r=e=>{o||(o=!0,s(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},s=()=>{n((t=>{for(const n of e)t.removeEventListener(n,r)}))};return n((t=>{for(const n of e)t.addEventListener(n,r,{once:!0})})),s},Po=e=>!!e.type.__asyncLoader;function Ro(e){v(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:o,delay:r=200,hydrate:s,timeout:i,suspensible:l=!0,onError:c}=e;let a,u=null,d=0;const p=()=>{let e;return u||(e=u=t().catch((e=>{if(e=e instanceof Error?e:new Error(String(e)),c)return new Promise(((t,n)=>{c(e,(()=>t((d++,u=null,p()))),(()=>n(e)),d+1)}));throw e})).then((t=>e!==u&&u?u:(t&&(t.__esModule||"Module"===t[Symbol.toStringTag])&&(t=t.default),a=t,t))))};return ho({name:"AsyncComponentWrapper",__asyncLoader:p,__asyncHydrate(e,t,n){const o=s?()=>{const o=s(n,(t=>function(e,t){if(xo(e)&&"["===e.data){let n=1,o=e.nextSibling;for(;o;){if(1===o.nodeType){if(!1===t(o))break}else if(xo(o))if("]"===o.data){if(0==--n)break}else"["===o.data&&n++;o=o.nextSibling}}else t(e)}(e,t)));o&&(t.bum||(t.bum=[])).push(o)}:n;a?o():p().then((()=>!t.isUnmounted&&o()))},get __asyncResolved(){return a},setup(){const e=Pi;if(go(e),a)return()=>Mo(a,e);const t=t=>{u=null,mn(t,e,13,!o)};if(l&&e.suspense||Hi)return p().then((t=>()=>Mo(t,e))).catch((e=>(t(e),()=>o?bi(o,{error:e}):null)));const s=Bt(!1),c=Bt(),d=Bt(!!r);return r&&setTimeout((()=>{d.value=!1}),r),null!=i&&setTimeout((()=>{if(!s.value&&!c.value){const e=new Error(`Async component timed out after ${i}ms.`);t(e),c.value=e}}),i),p().then((()=>{s.value=!0,e.parent&&Lo(e.parent.vnode)&&e.parent.update()})).catch((e=>{t(e),c.value=e})),()=>s.value&&a?Mo(a,e):c.value&&o?bi(o,{error:c.value}):n&&!d.value?bi(n):void 0}})}function Mo(e,t){const{ref:n,props:o,children:r,ce:s}=t.vnode,i=bi(e,o,r);return i.ref=n,i.ce=s,delete t.vnode.ce,i}const Lo=e=>e.type.__isKeepAlive,Fo={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Ri(),o=n.ctx;if(!o.renderer)return()=>{const e=t.default&&t.default();return e&&1===e.length?e[0]:e};const r=new Map,s=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:a,um:u,o:{createElement:d}}}=o,p=d("div");function f(e){Uo(e),u(e,n,l,!0)}function h(e){r.forEach(((t,n)=>{const o=Yi(t.type);o&&!e(o)&&m(n)}))}function m(e){const t=r.get(e);!t||i&&hi(t,i)?i&&Uo(i):f(t),r.delete(e),s.delete(e)}o.activate=(e,t,n,o,r)=>{const s=e.component;a(e,t,n,0,l),c(s.vnode,e,t,n,s,l,o,e.slotScopeIds,r),gs((()=>{s.isDeactivated=!1,s.a&&F(s.a);const t=e.props&&e.props.onVnodeMounted;t&&Di(t,s.parent,e)}),l)},o.deactivate=e=>{const t=e.component;ks(t.m),ks(t.a),a(e,p,null,1,l),gs((()=>{t.da&&F(t.da);const n=e.props&&e.props.onVnodeUnmounted;n&&Di(n,t.parent,e),t.isDeactivated=!0}),l)},Ns((()=>[e.include,e.exclude]),(([e,t])=>{e&&h((t=>Bo(e,t))),t&&h((e=>!Bo(t,e)))}),{flush:"post",deep:!0});let g=null;const v=()=>{null!=g&&(Ws(n.subTree.type)?gs((()=>{r.set(g,qo(n.subTree))}),n.subTree.suspense):r.set(g,qo(n.subTree)))};return zo(v),Xo(v),Yo((()=>{r.forEach((e=>{const{subTree:t,suspense:o}=n,r=qo(t);if(e.type!==r.type||e.key!==r.key)f(e);else{Uo(r);const e=r.component.da;e&&gs(e,o)}}))})),()=>{if(g=null,!t.default)return i=null;const n=t.default(),o=n[0];if(n.length>1)return i=null,n;if(!fi(o)||!(4&o.shapeFlag||128&o.shapeFlag))return i=null,o;let l=qo(o);if(l.type===ti)return i=null,l;const c=l.type,a=Yi(Po(l)?l.type.__asyncResolved||{}:c),{include:u,exclude:d,max:p}=e;if(u&&(!a||!Bo(u,a))||d&&a&&Bo(d,a))return l.shapeFlag&=-257,i=l,o;const f=null==l.key?c:l.key,h=r.get(f);return l.el&&(l=_i(l),128&o.shapeFlag&&(o.ssContent=l)),g=f,h?(l.el=h.el,l.component=h.component,l.transition&&po(l,l.transition),l.shapeFlag|=512,s.delete(f),s.add(f)):(s.add(f),p&&s.size>parseInt(p,10)&&m(s.values().next().value)),l.shapeFlag|=256,i=l,Ws(o.type)?o:l}}};function Bo(e,t){return f(e)?e.some((e=>Bo(e,t))):y(e)?e.split(",").includes(t):"[object RegExp]"===C(e)&&(e.lastIndex=0,e.test(t))}function jo(e,t){Vo(e,"a",t)}function $o(e,t){Vo(e,"da",t)}function Vo(e,t,n=Pi){const o=e.__wdc||(e.__wdc=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()});if(Wo(t,o,n),n){let e=n.parent;for(;e&&e.parent;)Lo(e.parent.vnode)&&Ho(o,t,n,e),e=e.parent}}function Ho(e,t,n,o){const r=Wo(t,e,o,!0);Qo((()=>{u(o[t],r)}),n)}function Uo(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function qo(e){return 128&e.shapeFlag?e.ssContent:e}function Wo(e,t,n=Pi,o=!1){if(n){const r=n[e]||(n[e]=[]),s=t.__weh||(t.__weh=(...o)=>{Re();const r=Fi(n),s=hn(t,n,e,o);return r(),Me(),s});return o?r.unshift(s):r.push(s),s}}const Go=e=>(t,n=Pi)=>{Hi&&"sp"!==e||Wo(e,((...e)=>t(...e)),n)},Ko=Go("bm"),zo=Go("m"),Jo=Go("bu"),Xo=Go("u"),Yo=Go("bum"),Qo=Go("um"),Zo=Go("sp"),er=Go("rtg"),tr=Go("rtc");function nr(e,t=Pi){Wo("ec",e,t)}const or="components",rr="directives";function sr(e,t){return ar(or,e,!0,t)||e}const ir=Symbol.for("v-ndc");function lr(e){return y(e)?ar(or,e,!1)||e:e||ir}function cr(e){return ar(rr,e)}function ar(e,t,n=!0,o=!1){const r=Rn||Pi;if(r){const n=r.type;if(e===or){const e=Yi(n,!1);if(e&&(e===t||e===N(t)||e===R(N(t))))return n}const s=ur(r[e]||n[e],t)||ur(r.appContext[e],t);return!s&&o?n:s}}function ur(e,t){return e&&(e[t]||e[N(t)]||e[R(N(t))])}function dr(e,t,n,o){let r;const s=n&&n[o],i=f(e);if(i||y(e)){let n=!1;i&&Dt(e)&&(n=!Nt(e),e=ze(e)),r=new Array(e.length);for(let o=0,i=e.length;ot(e,n,void 0,s&&s[n])));else{const n=Object.keys(e);r=new Array(n.length);for(let o=0,i=n.length;o{const t=o.fn(...e);return t&&(t.key=o.key),t}:o.fn)}return e}function fr(e,t,n={},o,r){if(Rn.ce||Rn.parent&&Po(Rn.parent)&&Rn.parent.ce)return"default"!==t&&(n.name=t),si(),pi(Zs,null,[bi("slot",n,o&&o())],64);let s=e[t];s&&s._c&&(s._d=!1),si();const i=s&&hr(s(n)),l=n.key||i&&i.key,c=pi(Zs,{key:(l&&!b(l)?l:`_${t}`)+(!i&&o?"_fb":"")},i||(o?o():[]),i&&1===e._?64:-2);return!r&&c.scopeId&&(c.slotScopeIds=[c.scopeId+"-s"]),s&&s._c&&(s._d=!0),c}function hr(e){return e.some((e=>!fi(e)||e.type!==ti&&!(e.type===Zs&&!hr(e.children))))?e:null}function mr(e,t){const n={};for(const o in e)n[t&&/[A-Z]/.test(o)?`on:${o}`:M(o)]=e[o];return n}const gr=e=>e?ji(e)?Xi(e):gr(e.parent):null,vr=a(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>gr(e.parent),$root:e=>gr(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>jr(e),$forceUpdate:e=>e.f||(e.f=()=>{wn(e.update)}),$nextTick:e=>e.n||(e.n=Cn.bind(e.proxy)),$watch:e=>Ps.bind(e)}),yr=(e,t)=>e!==o&&!e.__isScriptSetup&&p(e,t),br={get({_:e},t){if("__v_skip"===t)return!0;const{ctx:n,setupState:r,data:s,props:i,accessCache:l,type:c,appContext:a}=e;let u;if("$"!==t[0]){const c=l[t];if(void 0!==c)switch(c){case 1:return r[t];case 2:return s[t];case 4:return n[t];case 3:return i[t]}else{if(yr(r,t))return l[t]=1,r[t];if(s!==o&&p(s,t))return l[t]=2,s[t];if((u=e.propsOptions[0])&&p(u,t))return l[t]=3,i[t];if(n!==o&&p(n,t))return l[t]=4,n[t];Lr&&(l[t]=0)}}const d=vr[t];let f,h;return d?("$attrs"===t&&We(e.attrs,0,""),d(e)):(f=c.__cssModules)&&(f=f[t])?f:n!==o&&p(n,t)?(l[t]=4,n[t]):(h=a.config.globalProperties,p(h,t)?h[t]:void 0)},set({_:e},t,n){const{data:r,setupState:s,ctx:i}=e;return yr(s,t)?(s[t]=n,!0):r!==o&&p(r,t)?(r[t]=n,!0):!(p(e.props,t)||"$"===t[0]&&t.slice(1)in e||(i[t]=n,0))},has({_:{data:e,setupState:t,accessCache:n,ctx:r,appContext:s,propsOptions:i}},l){let c;return!!n[l]||e!==o&&p(e,l)||yr(t,l)||(c=i[0])&&p(c,l)||p(r,l)||p(vr,l)||p(s.config.globalProperties,l)},defineProperty(e,t,n){return null!=n.get?e._.accessCache[t]=0:p(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Sr=a({},br,{get(e,t){if(t!==Symbol.unscopables)return br.get(e,t,e)},has:(e,t)=>"_"!==t[0]&&!q(t)});function _r(){return null}function xr(){return null}function Cr(e){}function wr(e){}function kr(){return null}function Ir(){}function Tr(e,t){return null}function Er(){return Ar().slots}function Dr(){return Ar().attrs}function Ar(){const e=Ri();return e.setupContext||(e.setupContext=Ji(e))}function Nr(e){return f(e)?e.reduce(((e,t)=>(e[t]=null,e)),{}):e}function Or(e,t){const n=Nr(e);for(const e in t){if(e.startsWith("__skip"))continue;let o=n[e];o?f(o)||v(o)?o=n[e]={type:o,default:t[e]}:o.default=t[e]:null===o&&(o=n[e]={default:t[e]}),o&&t[`__skip_${e}`]&&(o.skipFactory=!0)}return n}function Pr(e,t){return e&&t?f(e)&&f(t)?e.concat(t):a({},Nr(e),Nr(t)):e||t}function Rr(e,t){const n={};for(const o in e)t.includes(o)||Object.defineProperty(n,o,{enumerable:!0,get:()=>e[o]});return n}function Mr(e){const t=Ri();let n=e();return Bi(),_(n)&&(n=n.catch((e=>{throw Fi(t),e}))),[n,()=>Fi(t)]}let Lr=!0;function Fr(e,t,n){hn(f(e)?e.map((e=>e.bind(t.proxy))):e.bind(t.proxy),t,n)}function Br(e,t,n,o){let r=o.includes(".")?Rs(n,o):()=>n[o];if(y(e)){const n=t[e];v(n)&&Ns(r,n)}else if(v(e))Ns(r,e.bind(n));else if(S(e))if(f(e))e.forEach((e=>Br(e,t,n,o)));else{const o=v(e.handler)?e.handler.bind(n):t[e.handler];v(o)&&Ns(r,o,e)}}function jr(e){const t=e.type,{mixins:n,extends:o}=t,{mixins:r,optionsCache:s,config:{optionMergeStrategies:i}}=e.appContext,l=s.get(t);let c;return l?c=l:r.length||n||o?(c={},r.length&&r.forEach((e=>$r(c,e,i,!0))),$r(c,t,i)):c=t,S(t)&&s.set(t,c),c}function $r(e,t,n,o=!1){const{mixins:r,extends:s}=t;s&&$r(e,s,n,!0),r&&r.forEach((t=>$r(e,t,n,!0)));for(const r in t)if(o&&"expose"===r);else{const o=Vr[r]||n&&n[r];e[r]=o?o(e[r],t[r]):t[r]}return e}const Vr={data:Hr,props:Gr,emits:Gr,methods:Wr,computed:Wr,beforeCreate:qr,created:qr,beforeMount:qr,mounted:qr,beforeUpdate:qr,updated:qr,beforeDestroy:qr,beforeUnmount:qr,destroyed:qr,unmounted:qr,activated:qr,deactivated:qr,errorCaptured:qr,serverPrefetch:qr,components:Wr,directives:Wr,watch:function(e,t){if(!e)return t;if(!t)return e;const n=a(Object.create(null),e);for(const o in t)n[o]=qr(e[o],t[o]);return n},provide:Hr,inject:function(e,t){return Wr(Ur(e),Ur(t))}};function Hr(e,t){return t?e?function(){return a(v(e)?e.call(this,this):e,v(t)?t.call(this,this):t)}:t:e}function Ur(e){if(f(e)){const t={};for(let n=0;n(s.has(e)||(e&&v(e.install)?(s.add(e),e.install(c,...t)):v(e)&&(s.add(e),e(c,...t))),c),mixin:e=>(r.mixins.includes(e)||r.mixins.push(e),c),component:(e,t)=>t?(r.components[e]=t,c):r.components[e],directive:(e,t)=>t?(r.directives[e]=t,c):r.directives[e],mount(s,i,a){if(!l){const u=c._ceVNode||bi(n,o);return u.appContext=r,!0===a?a="svg":!1===a&&(a=void 0),i&&t?t(u,s):e(u,s,a),l=!0,c._container=s,s.__vue_app__=c,Xi(u.component)}},onUnmount(e){i.push(e)},unmount(){l&&(hn(i,c._instance,16),e(null,c._container),delete c._container.__vue_app__)},provide:(e,t)=>(r.provides[e]=t,c),runWithContext(e){const t=Xr;Xr=c;try{return e()}finally{Xr=t}}};return c}}let Xr=null;function Yr(e,t){if(Pi){let n=Pi.provides;const o=Pi.parent&&Pi.parent.provides;o===n&&(n=Pi.provides=Object.create(o)),n[e]=t}}function Qr(e,t,n=!1){const o=Pi||Rn;if(o||Xr){const r=Xr?Xr._context.provides:o?null==o.parent?o.vnode.appContext&&o.vnode.appContext.provides:o.parent.provides:void 0;if(r&&e in r)return r[e];if(arguments.length>1)return n&&v(t)?t.call(o&&o.proxy):t}}function Zr(){return!!(Pi||Rn||Xr)}const es={},ts=()=>Object.create(es),ns=e=>Object.getPrototypeOf(e)===es;function os(e,t,n,r){const[s,i]=e.propsOptions;let l,c=!1;if(t)for(let o in t){if(T(o))continue;const a=t[o];let u;s&&p(s,u=N(o))?i&&i.includes(u)?(l||(l={}))[u]=a:n[u]=a:js(e.emitsOptions,o)||o in r&&a===r[o]||(r[o]=a,c=!0)}if(i){const t=Pt(n),r=l||o;for(let o=0;o{d=!0;const[n,o]=is(e,t,!0);a(c,n),o&&u.push(...o)};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}if(!l&&!d)return S(e)&&s.set(e,r),r;if(f(l))for(let e=0;e"_"===e[0]||"$stable"===e,as=e=>f(e)?e.map(ki):[ki(e)],us=(e,t,n)=>{if(t._n)return t;const o=$n(((...e)=>as(t(...e))),n);return o._c=!1,o},ds=(e,t,n)=>{const o=e._ctx;for(const n in e){if(cs(n))continue;const r=e[n];if(v(r))t[n]=us(0,r,o);else if(null!=r){const e=as(r);t[n]=()=>e}}},ps=(e,t)=>{const n=as(t);e.slots.default=()=>n},fs=(e,t,n)=>{for(const o in t)(n||"_"!==o)&&(e[o]=t[o])},hs=(e,t,n)=>{const o=e.slots=ts();if(32&e.vnode.shapeFlag){const e=t._;e?(fs(o,t,n),n&&B(o,"_",e,!0)):ds(t,o)}else t&&ps(e,t)},ms=(e,t,n)=>{const{vnode:r,slots:s}=e;let i=!0,l=o;if(32&r.shapeFlag){const e=t._;e?n&&1===e?i=!1:fs(s,t,n):(i=!t.$stable,ds(t,s)),l=t}else t&&(ps(e,t),l={default:1});if(i)for(const e in s)cs(e)||null!=l[e]||delete s[e]},gs=Ys;function vs(e){return bs(e)}function ys(e){return bs(e,Co)}function bs(e,t){U().__VUE__=!0;const{insert:n,remove:i,patchProp:l,createElement:c,createText:a,createComment:u,setText:d,setElementText:f,parentNode:h,nextSibling:m,setScopeId:g=s,insertStaticContent:v}=e,y=(e,t,n,o=null,r=null,s=null,i=void 0,l=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!hi(e,t)&&(o=J(e),q(e,r,s,!0),e=null),-2===t.patchFlag&&(c=!1,t.dynamicChildren=null);const{type:a,ref:u,shapeFlag:d}=t;switch(a){case ei:b(e,t,n,o);break;case ti:S(e,t,n,o);break;case ni:null==e&&_(t,n,o,i);break;case Zs:A(e,t,n,o,r,s,i,l,c);break;default:1&d?x(e,t,n,o,r,s,i,l,c):6&d?O(e,t,n,o,r,s,i,l,c):(64&d||128&d)&&a.process(e,t,n,o,r,s,i,l,c,Q)}null!=u&&r&&yo(u,e&&e.ref,s,t||e,!t)},b=(e,t,o,r)=>{if(null==e)n(t.el=a(t.children),o,r);else{const n=t.el=e.el;t.children!==e.children&&d(n,t.children)}},S=(e,t,o,r)=>{null==e?n(t.el=u(t.children||""),o,r):t.el=e.el},_=(e,t,n,o)=>{[e.el,e.anchor]=v(e.children,t,n,o,e.el,e.anchor)},x=(e,t,n,o,r,s,i,l,c)=>{"svg"===t.type?i="svg":"math"===t.type&&(i="mathml"),null==e?C(t,n,o,r,s,i,l,c):I(e,t,r,s,i,l,c)},C=(e,t,o,r,s,i,a,u)=>{let d,p;const{props:h,shapeFlag:m,transition:g,dirs:v}=e;if(d=e.el=c(e.type,i,h&&h.is,h),8&m?f(d,e.children):16&m&&k(e.children,d,null,r,s,Ss(e,i),a,u),v&&Hn(e,null,r,"created"),w(d,e,e.scopeId,a,r),h){for(const e in h)"value"===e||T(e)||l(d,e,null,h[e],i,r);"value"in h&&l(d,"value",null,h.value,i),(p=h.onVnodeBeforeMount)&&Di(p,r,e)}v&&Hn(e,null,r,"beforeMount");const y=xs(s,g);y&&g.beforeEnter(d),n(d,t,o),((p=h&&h.onVnodeMounted)||y||v)&&gs((()=>{p&&Di(p,r,e),y&&g.enter(d),v&&Hn(e,null,r,"mounted")}),s)},w=(e,t,n,o,r)=>{if(n&&g(e,n),o)for(let t=0;t{for(let a=c;a{const a=t.el=e.el;let{patchFlag:u,dynamicChildren:d,dirs:p}=t;u|=16&e.patchFlag;const h=e.props||o,m=t.props||o;let g;if(n&&_s(n,!1),(g=m.onVnodeBeforeUpdate)&&Di(g,n,t,e),p&&Hn(t,e,n,"beforeUpdate"),n&&_s(n,!0),(h.innerHTML&&null==m.innerHTML||h.textContent&&null==m.textContent)&&f(a,""),d?E(e.dynamicChildren,d,a,n,r,Ss(t,s),i):c||j(e,t,a,null,n,r,Ss(t,s),i,!1),u>0){if(16&u)D(a,h,m,n,s);else if(2&u&&h.class!==m.class&&l(a,"class",null,m.class,s),4&u&&l(a,"style",h.style,m.style,s),8&u){const e=t.dynamicProps;for(let t=0;t{g&&Di(g,n,t,e),p&&Hn(t,e,n,"updated")}),r)},E=(e,t,n,o,r,s,i)=>{for(let l=0;l{if(t!==n){if(t!==o)for(const o in t)T(o)||o in n||l(e,o,t[o],null,s,r);for(const o in n){if(T(o))continue;const i=n[o],c=t[o];i!==c&&"value"!==o&&l(e,o,c,i,s,r)}"value"in n&&l(e,"value",t.value,n.value,s)}},A=(e,t,o,r,s,i,l,c,u)=>{const d=t.el=e?e.el:a(""),p=t.anchor=e?e.anchor:a("");let{patchFlag:f,dynamicChildren:h,slotScopeIds:m}=t;m&&(c=c?c.concat(m):m),null==e?(n(d,o,r),n(p,o,r),k(t.children||[],o,p,s,i,l,c,u)):f>0&&64&f&&h&&e.dynamicChildren?(E(e.dynamicChildren,h,o,s,i,l,c),(null!=t.key||s&&t===s.subTree)&&Cs(e,t,!0)):j(e,t,o,p,s,i,l,c,u)},O=(e,t,n,o,r,s,i,l,c)=>{t.slotScopeIds=l,null==e?512&t.shapeFlag?r.ctx.activate(t,n,o,i,c):R(t,n,o,r,s,i,c):M(e,t,c)},R=(e,t,n,o,r,s,i)=>{const l=e.component=Oi(e,o,r);if(Lo(e)&&(l.ctx.renderer=Q),Ui(l,!1,i),l.asyncDep){if(r&&r.registerDep(l,L,i),!e.el){const e=l.subTree=bi(ti);S(null,e,t,n)}}else L(l,e,t,n,r,s,i)},M=(e,t,n)=>{const o=t.component=e.component;if(function(e,t,n){const{props:o,children:r,component:s}=e,{props:i,children:l,patchFlag:c}=t,a=s.emitsOptions;if(t.dirs||t.transition)return!0;if(!(n&&c>=0))return!(!r&&!l||l&&l.$stable)||o!==i&&(o?!i||Us(o,i,a):!!i);if(1024&c)return!0;if(16&c)return o?Us(o,i,a):!!i;if(8&c){const e=t.dynamicProps;for(let t=0;t{const l=()=>{if(e.isMounted){let{next:t,bu:n,u:o,parent:c,vnode:a}=e;{const n=ws(e);if(n)return t&&(t.el=a.el,B(e,t,i)),void n.asyncDep.then((()=>{e.isUnmounted||l()}))}let u,d=t;_s(e,!1),t?(t.el=a.el,B(e,t,i)):t=a,n&&F(n),(u=t.props&&t.props.onVnodeBeforeUpdate)&&Di(u,c,t,a),_s(e,!0);const p=$s(e),f=e.subTree;e.subTree=p,y(f,p,h(f.el),J(f),e,r,s),t.el=p.el,null===d&&qs(e,p.el),o&&gs(o,r),(u=t.props&&t.props.onVnodeUpdated)&&gs((()=>Di(u,c,t,a)),r)}else{let i;const{el:l,props:c}=t,{bm:a,m:u,parent:d,root:p,type:f}=e,h=Po(t);if(_s(e,!1),a&&F(a),!h&&(i=c&&c.onVnodeBeforeMount)&&Di(i,d,t),_s(e,!0),l&&ee){const t=()=>{e.subTree=$s(e),ee(l,e.subTree,e,r,null)};h&&f.__asyncHydrate?f.__asyncHydrate(l,e,t):t()}else{p.ce&&p.ce._injectChildStyle(f);const i=e.subTree=$s(e);y(null,i,n,o,e,r,s),t.el=i.el}if(u&&gs(u,r),!h&&(i=c&&c.onVnodeMounted)){const e=t;gs((()=>Di(i,d,e)),r)}(256&t.shapeFlag||d&&Po(d.vnode)&&256&d.vnode.shapeFlag)&&e.a&&gs(e.a,r),e.isMounted=!0,t=n=o=null}};e.scope.on();const c=e.effect=new ve(l);e.scope.off();const a=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>wn(u),_s(e,!0),a()},B=(e,t,n)=>{t.component=e;const o=e.vnode.props;e.vnode=t,e.next=null,function(e,t,n,o){const{props:r,attrs:s,vnode:{patchFlag:i}}=e,l=Pt(r),[c]=e.propsOptions;let a=!1;if(!(o||i>0)||16&i){let o;os(e,t,r,s)&&(a=!0);for(const s in l)t&&(p(t,s)||(o=P(s))!==s&&p(t,o))||(c?!n||void 0===n[s]&&void 0===n[o]||(r[s]=rs(c,l,s,void 0,e,!0)):delete r[s]);if(s!==l)for(const e in s)t&&p(t,e)||(delete s[e],a=!0)}else if(8&i){const n=e.vnode.dynamicProps;for(let o=0;o{const a=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:p,shapeFlag:h}=t;if(p>0){if(128&p)return void V(a,d,n,o,r,s,i,l,c);if(256&p)return void $(a,d,n,o,r,s,i,l,c)}8&h?(16&u&&z(a,r,s),d!==a&&f(n,d)):16&u?16&h?V(a,d,n,o,r,s,i,l,c):z(a,r,s,!0):(8&u&&f(n,""),16&h&&k(d,n,o,r,s,i,l,c))},$=(e,t,n,o,s,i,l,c,a)=>{t=t||r;const u=(e=e||r).length,d=t.length,p=Math.min(u,d);let f;for(f=0;fd?z(e,s,i,!0,!1,p):k(t,n,o,s,i,l,c,a,p)},V=(e,t,n,o,s,i,l,c,a)=>{let u=0;const d=t.length;let p=e.length-1,f=d-1;for(;u<=p&&u<=f;){const o=e[u],r=t[u]=a?Ii(t[u]):ki(t[u]);if(!hi(o,r))break;y(o,r,n,null,s,i,l,c,a),u++}for(;u<=p&&u<=f;){const o=e[p],r=t[f]=a?Ii(t[f]):ki(t[f]);if(!hi(o,r))break;y(o,r,n,null,s,i,l,c,a),p--,f--}if(u>p){if(u<=f){const e=f+1,r=ef)for(;u<=p;)q(e[u],s,i,!0),u++;else{const h=u,m=u,g=new Map;for(u=m;u<=f;u++){const e=t[u]=a?Ii(t[u]):ki(t[u]);null!=e.key&&g.set(e.key,u)}let v,b=0;const S=f-m+1;let _=!1,x=0;const C=new Array(S);for(u=0;u=S){q(o,s,i,!0);continue}let r;if(null!=o.key)r=g.get(o.key);else for(v=m;v<=f;v++)if(0===C[v-m]&&hi(o,t[v])){r=v;break}void 0===r?q(o,s,i,!0):(C[r-m]=u+1,r>=x?x=r:_=!0,y(o,t[r],n,null,s,i,l,c,a),b++)}const w=_?function(e){const t=e.slice(),n=[0];let o,r,s,i,l;const c=e.length;for(o=0;o>1,e[n[l]]0&&(t[o]=n[s-1]),n[s]=o)}}for(s=n.length,i=n[s-1];s-- >0;)n[s]=i,i=t[i];return n}(C):r;for(v=w.length-1,u=S-1;u>=0;u--){const e=m+u,r=t[e],p=e+1{const{el:i,type:l,transition:c,children:a,shapeFlag:u}=e;if(6&u)H(e.component.subTree,t,o,r);else if(128&u)e.suspense.move(t,o,r);else if(64&u)l.move(e,t,o,Q);else if(l!==Zs)if(l!==ni)if(2!==r&&1&u&&c)if(0===r)c.beforeEnter(i),n(i,t,o),gs((()=>c.enter(i)),s);else{const{leave:e,delayLeave:r,afterLeave:s}=c,l=()=>n(i,t,o),a=()=>{e(i,(()=>{l(),s&&s()}))};r?r(i,l,a):a()}else n(i,t,o);else(({el:e,anchor:t},o,r)=>{let s;for(;e&&e!==t;)s=m(e),n(e,o,r),e=s;n(t,o,r)})(e,t,o);else{n(i,t,o);for(let e=0;e{const{type:s,props:i,ref:l,children:c,dynamicChildren:a,shapeFlag:u,patchFlag:d,dirs:p,cacheIndex:f}=e;if(-2===d&&(r=!1),null!=l&&yo(l,null,n,e,!0),null!=f&&(t.renderCache[f]=void 0),256&u)return void t.ctx.deactivate(e);const h=1&u&&p,m=!Po(e);let g;if(m&&(g=i&&i.onVnodeBeforeUnmount)&&Di(g,t,e),6&u)K(e.component,n,o);else{if(128&u)return void e.suspense.unmount(n,o);h&&Hn(e,null,t,"beforeUnmount"),64&u?e.type.remove(e,t,n,Q,o):a&&!a.hasOnce&&(s!==Zs||d>0&&64&d)?z(a,t,n,!1,!0):(s===Zs&&384&d||!r&&16&u)&&z(c,t,n),o&&W(e)}(m&&(g=i&&i.onVnodeUnmounted)||h)&&gs((()=>{g&&Di(g,t,e),h&&Hn(e,null,t,"unmounted")}),n)},W=e=>{const{type:t,el:n,anchor:o,transition:r}=e;if(t===Zs)return void G(n,o);if(t===ni)return void(({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=m(e),i(e),e=n;i(t)})(e);const s=()=>{i(n),r&&!r.persisted&&r.afterLeave&&r.afterLeave()};if(1&e.shapeFlag&&r&&!r.persisted){const{leave:t,delayLeave:o}=r,i=()=>t(n,s);o?o(e.el,s,i):i()}else s()},G=(e,t)=>{let n;for(;e!==t;)n=m(e),i(e),e=n;i(t)},K=(e,t,n)=>{const{bum:o,scope:r,job:s,subTree:i,um:l,m:c,a}=e;ks(c),ks(a),o&&F(o),r.stop(),s&&(s.flags|=8,q(i,e,t,n)),l&&gs(l,t),gs((()=>{e.isUnmounted=!0}),t),t&&t.pendingBranch&&!t.isUnmounted&&e.asyncDep&&!e.asyncResolved&&e.suspenseId===t.pendingId&&(t.deps--,0===t.deps&&t.resolve())},z=(e,t,n,o=!1,r=!1,s=0)=>{for(let i=s;i{if(6&e.shapeFlag)return J(e.component.subTree);if(128&e.shapeFlag)return e.suspense.next();const t=m(e.anchor||e.el),n=t&&t[Un];return n?m(n):t};let X=!1;const Y=(e,t,n)=>{null==e?t._vnode&&q(t._vnode,null,null,!0):y(t._vnode||null,e,t,null,null,null,n),t._vnode=e,X||(X=!0,Tn(),En(),X=!1)},Q={p:y,um:q,m:H,r:W,mt:R,mc:k,pc:j,pbc:E,n:J,o:e};let Z,ee;return t&&([Z,ee]=t(Q)),{render:Y,hydrate:Z,createApp:Jr(Y,Z)}}function Ss({type:e,props:t},n){return"svg"===n&&"foreignObject"===e||"mathml"===n&&"annotation-xml"===e&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function _s({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function xs(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Cs(e,t,n=!1){const o=e.children,r=t.children;if(f(o)&&f(r))for(let e=0;eQr(Is);function Es(e,t){return Os(e,null,t)}function Ds(e,t){return Os(e,null,{flush:"post"})}function As(e,t){return Os(e,null,{flush:"sync"})}function Ns(e,t,n){return Os(e,t,n)}function Os(e,t,n=o){const{immediate:r,deep:i,flush:l,once:c}=n,d=a({},n),p=t&&r||!t&&"post"!==l;let h;if(Hi)if("sync"===l){const e=Ts();h=e.__watcherHandles||(e.__watcherHandles=[])}else if(!p){const e=()=>{};return e.stop=s,e.resume=s,e.pause=s,e}const m=Pi;d.call=(e,t,n)=>hn(e,m,t,n);let g=!1;"post"===l?d.scheduler=e=>{gs(e,m&&m.suspense)}:"sync"!==l&&(g=!0,d.scheduler=(e,t)=>{t?e():wn(e)}),d.augmentJob=e=>{t&&(e.flags|=4),g&&(e.flags|=2,m&&(e.id=m.uid,e.i=m))};const y=function(e,t,n=o){const{immediate:r,deep:i,once:l,scheduler:c,augmentJob:a,call:d}=n,p=e=>i?e:Nt(e)||!1===i||0===i?an(e,1):an(e);let h,m,g,y,b=!1,S=!1;if(Ft(e)?(m=()=>e.value,b=Nt(e)):Dt(e)?(m=()=>p(e),b=!0):f(e)?(S=!0,b=e.some((e=>Dt(e)||Nt(e))),m=()=>e.map((e=>Ft(e)?e.value:Dt(e)?p(e):v(e)?d?d(e,2):e():void 0))):m=v(e)?t?d?()=>d(e,2):e:()=>{if(g){Re();try{g()}finally{Me()}}const t=sn;sn=h;try{return d?d(e,3,[y]):e(y)}finally{sn=t}}:s,t&&i){const e=m,t=!0===i?1/0:i;m=()=>an(e(),t)}const _=he(),x=()=>{h.stop(),_&&u(_.effects,h)};if(l&&t){const e=t;t=(...t)=>{e(...t),x()}}let C=S?new Array(e.length).fill(on):on;const w=e=>{if(1&h.flags&&(h.dirty||e))if(t){const e=h.run();if(i||b||(S?e.some(((e,t)=>L(e,C[t]))):L(e,C))){g&&g();const n=sn;sn=h;try{const n=[e,C===on?void 0:S&&C[0]===on?[]:C,y];d?d(t,3,n):t(...n),C=e}finally{sn=n}}}else h.run()};return a&&a(w),h=new ve(m),h.scheduler=c?()=>c(w,!1):w,y=e=>cn(e,!1,h),g=h.onStop=()=>{const e=rn.get(h);if(e){if(d)d(e,4);else for(const t of e)t();rn.delete(h)}},t?r?w(!0):C=h.run():c?c(w.bind(null,!0),!0):h.run(),x.pause=h.pause.bind(h),x.resume=h.resume.bind(h),x.stop=x,x}(e,t,d);return Hi&&(h?h.push(y):p&&y()),y}function Ps(e,t,n){const o=this.proxy,r=y(e)?e.includes(".")?Rs(o,e):()=>o[e]:e.bind(o,o);let s;v(t)?s=t:(s=t.handler,n=t);const i=Fi(this),l=Os(r,s.bind(o),n);return i(),l}function Rs(e,t){const n=t.split(".");return()=>{let t=e;for(let e=0;e{let a,u,d=o;return As((()=>{const t=e[s];L(a,t)&&(a=t,c())})),{get:()=>(l(),n.get?n.get(a):a),set(e){const l=n.set?n.set(e):e;if(!(L(l,a)||d!==o&&L(e,d)))return;const p=r.vnode.props;p&&(t in p||s in p||i in p)&&(`onUpdate:${t}`in p||`onUpdate:${s}`in p||`onUpdate:${i}`in p)||(a=e,c()),r.emit(`update:${t}`,l),L(e,l)&&L(e,d)&&!L(l,u)&&c(),d=e,u=l}}}));return c[Symbol.iterator]=()=>{let e=0;return{next:()=>e<2?{value:e++?l||o:c,done:!1}:{done:!0}}},c}const Ls=(e,t)=>"modelValue"===t||"model-value"===t?e.modelModifiers:e[`${t}Modifiers`]||e[`${N(t)}Modifiers`]||e[`${P(t)}Modifiers`];function Fs(e,t,...n){if(e.isUnmounted)return;const r=e.vnode.props||o;let s=n;const i=t.startsWith("update:"),l=i&&Ls(r,t.slice(7));let c;l&&(l.trim&&(s=n.map((e=>y(e)?e.trim():e))),l.number&&(s=n.map(j)));let a=r[c=M(t)]||r[c=M(N(t))];!a&&i&&(a=r[c=M(P(t))]),a&&hn(a,e,6,s);const u=r[c+"Once"];if(u){if(e.emitted){if(e.emitted[c])return}else e.emitted={};e.emitted[c]=!0,hn(u,e,6,s)}}function Bs(e,t,n=!1){const o=t.emitsCache,r=o.get(e);if(void 0!==r)return r;const s=e.emits;let i={},l=!1;if(!v(e)){const o=e=>{const n=Bs(e,t,!0);n&&(l=!0,a(i,n))};!n&&t.mixins.length&&t.mixins.forEach(o),e.extends&&o(e.extends),e.mixins&&e.mixins.forEach(o)}return s||l?(f(s)?s.forEach((e=>i[e]=null)):a(i,s),S(e)&&o.set(e,i),i):(S(e)&&o.set(e,null),null)}function js(e,t){return!(!e||!l(t))&&(t=t.slice(2).replace(/Once$/,""),p(e,t[0].toLowerCase()+t.slice(1))||p(e,P(t))||p(e,t))}function $s(e){const{type:t,vnode:n,proxy:o,withProxy:r,propsOptions:[s],slots:i,attrs:l,emit:a,render:u,renderCache:d,props:p,data:f,setupState:h,ctx:m,inheritAttrs:g}=e,v=Ln(e);let y,b;try{if(4&n.shapeFlag){const e=r||o,t=e;y=ki(u.call(t,e,d,p,h,f,m)),b=l}else{const e=t;y=ki(e.length>1?e(p,{attrs:l,slots:i,emit:a}):e(p,null)),b=t.props?l:Vs(l)}}catch(t){oi.length=0,mn(t,e,1),y=bi(ti)}let S=y;if(b&&!1!==g){const e=Object.keys(b),{shapeFlag:t}=S;e.length&&7&t&&(s&&e.some(c)&&(b=Hs(b,s)),S=_i(S,b,!1,!0))}return n.dirs&&(S=_i(S,null,!1,!0),S.dirs=S.dirs?S.dirs.concat(n.dirs):n.dirs),n.transition&&po(S,n.transition),y=S,Ln(v),y}const Vs=e=>{let t;for(const n in e)("class"===n||"style"===n||l(n))&&((t||(t={}))[n]=e[n]);return t},Hs=(e,t)=>{const n={};for(const o in e)c(o)&&o.slice(9)in t||(n[o]=e[o]);return n};function Us(e,t,n){const o=Object.keys(t);if(o.length!==Object.keys(e).length)return!0;for(let r=0;re.__isSuspense;let Gs=0;const Ks={name:"Suspense",__isSuspense:!0,process(e,t,n,o,r,s,i,l,c,a){if(null==e)!function(e,t,n,o,r,s,i,l,c){const{p:a,o:{createElement:u}}=c,d=u("div"),p=e.suspense=Js(e,r,o,t,d,n,s,i,l,c);a(null,p.pendingBranch=e.ssContent,d,null,o,p,s,i),p.deps>0?(zs(e,"onPending"),zs(e,"onFallback"),a(null,e.ssFallback,t,n,o,null,s,i),Qs(p,e.ssFallback)):p.resolve(!1,!0)}(t,n,o,r,s,i,l,c,a);else{if(s&&s.deps>0&&!e.suspense.isInFallback)return t.suspense=e.suspense,t.suspense.vnode=t,void(t.el=e.el);!function(e,t,n,o,r,s,i,l,{p:c,um:a,o:{createElement:u}}){const d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;const p=t.ssContent,f=t.ssFallback,{activeBranch:h,pendingBranch:m,isInFallback:g,isHydrating:v}=d;if(m)d.pendingBranch=p,hi(p,m)?(c(m,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():g&&(v||(c(h,f,n,o,r,null,s,i,l),Qs(d,f)))):(d.pendingId=Gs++,v?(d.isHydrating=!1,d.activeBranch=m):a(m,r,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u("div"),g?(c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0?d.resolve():(c(h,f,n,o,r,null,s,i,l),Qs(d,f))):h&&hi(p,h)?(c(h,p,n,o,r,d,s,i,l),d.resolve(!0)):(c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0&&d.resolve()));else if(h&&hi(p,h))c(h,p,n,o,r,d,s,i,l),Qs(d,p);else if(zs(t,"onPending"),d.pendingBranch=p,512&p.shapeFlag?d.pendingId=p.component.suspenseId:d.pendingId=Gs++,c(null,p,d.hiddenContainer,null,r,d,s,i,l),d.deps<=0)d.resolve();else{const{timeout:e,pendingId:t}=d;e>0?setTimeout((()=>{d.pendingId===t&&d.fallback(f)}),e):0===e&&d.fallback(f)}}(e,t,n,o,r,i,l,c,a)}},hydrate:function(e,t,n,o,r,s,i,l,c){const a=t.suspense=Js(t,o,n,e.parentNode,document.createElement("div"),null,r,s,i,l,!0),u=c(e,a.pendingBranch=t.ssContent,n,a,s,i);return 0===a.deps&&a.resolve(!1,!0),u},normalize:function(e){const{shapeFlag:t,children:n}=e,o=32&t;e.ssContent=Xs(o?n.default:n),e.ssFallback=o?Xs(n.fallback):bi(ti)}};function zs(e,t){const n=e.props&&e.props[t];v(n)&&n()}function Js(e,t,n,o,r,s,i,l,c,a,u=!1){const{p:d,m:p,um:f,n:h,o:{parentNode:m,remove:g}}=a;let v;const y=function(e){const t=e.props&&e.props.suspensible;return null!=t&&!1!==t}(e);y&&t&&t.pendingBranch&&(v=t.pendingId,t.deps++);const b=e.props?V(e.props.timeout):void 0,S=s,_={vnode:e,parent:t,parentComponent:n,namespace:i,container:o,hiddenContainer:r,deps:0,pendingId:Gs++,timeout:"number"==typeof b?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){const{vnode:o,activeBranch:r,pendingBranch:i,pendingId:l,effects:c,parentComponent:a,container:u}=_;let d=!1;_.isHydrating?_.isHydrating=!1:e||(d=r&&i.transition&&"out-in"===i.transition.mode,d&&(r.transition.afterLeave=()=>{l===_.pendingId&&(p(i,u,s===S?h(r):s,0),In(c))}),r&&(m(r.el)===u&&(s=h(r)),f(r,a,_,!0)),d||p(i,u,s,0)),Qs(_,i),_.pendingBranch=null,_.isInFallback=!1;let g=_.parent,b=!1;for(;g;){if(g.pendingBranch){g.effects.push(...c),b=!0;break}g=g.parent}b||d||In(c),_.effects=[],y&&t&&t.pendingBranch&&v===t.pendingId&&(t.deps--,0!==t.deps||n||t.resolve()),zs(o,"onResolve")},fallback(e){if(!_.pendingBranch)return;const{vnode:t,activeBranch:n,parentComponent:o,container:r,namespace:s}=_;zs(t,"onFallback");const i=h(n),a=()=>{_.isInFallback&&(d(null,e,r,i,o,null,s,l,c),Qs(_,e))},u=e.transition&&"out-in"===e.transition.mode;u&&(n.transition.afterLeave=a),_.isInFallback=!0,f(n,o,null,!0),u||a()},move(e,t,n){_.activeBranch&&p(_.activeBranch,e,t,n),_.container=e},next:()=>_.activeBranch&&h(_.activeBranch),registerDep(e,t,n){const o=!!_.pendingBranch;o&&_.deps++;const r=e.vnode.el;e.asyncDep.catch((t=>{mn(t,e,0)})).then((s=>{if(e.isUnmounted||_.isUnmounted||_.pendingId!==e.suspenseId)return;e.asyncResolved=!0;const{vnode:l}=e;qi(e,s,!1),r&&(l.el=r);const c=!r&&e.subTree.el;t(e,l,m(r||e.subTree.el),r?null:h(e.subTree),_,i,n),c&&g(c),qs(e,l.el),o&&0==--_.deps&&_.resolve()}))},unmount(e,t){_.isUnmounted=!0,_.activeBranch&&f(_.activeBranch,n,e,t),_.pendingBranch&&f(_.pendingBranch,n,e,t)}};return _}function Xs(e){let t;if(v(e)){const n=ci&&e._c;n&&(e._d=!1,si()),e=e(),n&&(e._d=!0,t=ri,ii())}if(f(e)){const t=function(e){let t;for(let n=0;nt!==e))),e}function Ys(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):In(e)}function Qs(e,t){e.activeBranch=t;const{vnode:n,parentComponent:o}=e;let r=t.el;for(;!r&&t.component;)r=(t=t.component.subTree).el;n.el=r,o&&o.subTree===n&&(o.vnode.el=r,qs(o,r))}const Zs=Symbol.for("v-fgt"),ei=Symbol.for("v-txt"),ti=Symbol.for("v-cmt"),ni=Symbol.for("v-stc"),oi=[];let ri=null;function si(e=!1){oi.push(ri=e?null:[])}function ii(){oi.pop(),ri=oi[oi.length-1]||null}let li,ci=1;function ai(e){ci+=e,e<0&&ri&&(ri.hasOnce=!0)}function ui(e){return e.dynamicChildren=ci>0?ri||r:null,ii(),ci>0&&ri&&ri.push(e),e}function di(e,t,n,o,r,s){return ui(yi(e,t,n,o,r,s,!0))}function pi(e,t,n,o,r){return ui(bi(e,t,n,o,r,!0))}function fi(e){return!!e&&!0===e.__v_isVNode}function hi(e,t){return e.type===t.type&&e.key===t.key}function mi(e){li=e}const gi=({key:e})=>null!=e?e:null,vi=({ref:e,ref_key:t,ref_for:n})=>("number"==typeof e&&(e=""+e),null!=e?y(e)||Ft(e)||v(e)?{i:Rn,r:e,k:t,f:!!n}:e:null);function yi(e,t=null,n=null,o=0,r=null,s=(e===Zs?0:1),i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&gi(t),ref:t&&vi(t),scopeId:Mn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:s,patchFlag:o,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:Rn};return l?(Ti(c,n),128&s&&e.normalize(c)):n&&(c.shapeFlag|=y(n)?8:16),ci>0&&!i&&ri&&(c.patchFlag>0||6&s)&&32!==c.patchFlag&&ri.push(c),c}const bi=function(e,t=null,n=null,o=0,r=null,s=!1){if(e&&e!==ir||(e=ti),fi(e)){const o=_i(e,t,!0);return n&&Ti(o,n),ci>0&&!s&&ri&&(6&o.shapeFlag?ri[ri.indexOf(e)]=o:ri.push(o)),o.patchFlag=-2,o}if(i=e,v(i)&&"__vccOpts"in i&&(e=e.__vccOpts),t){t=Si(t);let{class:e,style:n}=t;e&&!y(e)&&(t.class=X(e)),S(n)&&(Ot(n)&&!f(n)&&(n=a({},n)),t.style=W(n))}var i;return yi(e,t,n,o,r,y(e)?1:Ws(e)?128:qn(e)?64:S(e)?4:v(e)?2:0,s,!0)};function Si(e){return e?Ot(e)||ns(e)?a({},e):e:null}function _i(e,t,n=!1,o=!1){const{props:r,ref:s,patchFlag:i,children:l,transition:c}=e,a=t?Ei(r||{},t):r,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:a,key:a&&gi(a),ref:t&&t.ref?n&&s?f(s)?s.concat(vi(t)):[s,vi(t)]:vi(t):s,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:l,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==Zs?-1===i?16:16|i:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&_i(e.ssContent),ssFallback:e.ssFallback&&_i(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&o&&po(u,c.clone(u)),u}function xi(e=" ",t=0){return bi(ei,null,e,t)}function Ci(e,t){const n=bi(ni,null,e);return n.staticCount=t,n}function wi(e="",t=!1){return t?(si(),pi(ti,null,e)):bi(ti,null,e)}function ki(e){return null==e||"boolean"==typeof e?bi(ti):f(e)?bi(Zs,null,e.slice()):fi(e)?Ii(e):bi(ei,null,String(e))}function Ii(e){return null===e.el&&-1!==e.patchFlag||e.memo?e:_i(e)}function Ti(e,t){let n=0;const{shapeFlag:o}=e;if(null==t)t=null;else if(f(t))n=16;else if("object"==typeof t){if(65&o){const n=t.default;return void(n&&(n._c&&(n._d=!1),Ti(e,n()),n._c&&(n._d=!0)))}{n=32;const o=t._;o||ns(t)?3===o&&Rn&&(1===Rn.slots._?t._=1:(t._=2,e.patchFlag|=1024)):t._ctx=Rn}}else v(t)?(t={default:t,_ctx:Rn},n=32):(t=String(t),64&o?(n=16,t=[xi(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ei(...e){const t={};for(let n=0;nPi||Rn;let Mi,Li;{const e=U(),t=(t,n)=>{let o;return(o=e[t])||(o=e[t]=[]),o.push(n),e=>{o.length>1?o.forEach((t=>t(e))):o[0](e)}};Mi=t("__VUE_INSTANCE_SETTERS__",(e=>Pi=e)),Li=t("__VUE_SSR_SETTERS__",(e=>Hi=e))}const Fi=e=>{const t=Pi;return Mi(e),e.scope.on(),()=>{e.scope.off(),Mi(t)}},Bi=()=>{Pi&&Pi.scope.off(),Mi(null)};function ji(e){return 4&e.vnode.shapeFlag}let $i,Vi,Hi=!1;function Ui(e,t=!1,n=!1){t&&Li(t);const{props:o,children:r}=e.vnode,s=ji(e);!function(e,t,n,o=!1){const r={},s=ts();e.propsDefaults=Object.create(null),os(e,t,r,s);for(const t in e.propsOptions[0])t in r||(r[t]=void 0);n?e.props=o?r:kt(r):e.type.props?e.props=r:e.props=s,e.attrs=s}(e,o,s,t),hs(e,r,n);const i=s?function(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,br);const{setup:o}=n;if(o){Re();const n=e.setupContext=o.length>1?Ji(e):null,r=Fi(e),s=fn(o,e,0,[e.props,n]),i=_(s);if(Me(),r(),!i&&!e.sp||Po(e)||go(e),i){if(s.then(Bi,Bi),t)return s.then((n=>{qi(e,n,t)})).catch((t=>{mn(t,e,0)}));e.asyncDep=s}else qi(e,s,t)}else Ki(e,t)}(e,t):void 0;return t&&Li(!1),i}function qi(e,t,n){v(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:S(t)&&(e.setupState=Gt(t)),Ki(e,n)}function Wi(e){$i=e,Vi=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Sr))}}const Gi=()=>!$i;function Ki(e,t,n){const o=e.type;if(!e.render){if(!t&&$i&&!o.render){const t=o.template||jr(e).template;if(t){const{isCustomElement:n,compilerOptions:r}=e.appContext.config,{delimiters:s,compilerOptions:i}=o,l=a(a({isCustomElement:n,delimiters:s},r),i);o.render=$i(t,l)}}e.render=o.render||s,Vi&&Vi(e)}{const t=Fi(e);Re();try{!function(e){const t=jr(e),n=e.proxy,o=e.ctx;Lr=!1,t.beforeCreate&&Fr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:l,watch:c,provide:a,inject:u,created:d,beforeMount:p,mounted:h,beforeUpdate:m,updated:g,activated:y,deactivated:b,beforeDestroy:_,beforeUnmount:x,destroyed:C,unmounted:w,render:k,renderTracked:I,renderTriggered:T,errorCaptured:E,serverPrefetch:D,expose:A,inheritAttrs:N,components:O,directives:P,filters:R}=t;if(u&&function(e,t){f(e)&&(e=Ur(e));for(const n in e){const o=e[n];let r;r=S(o)?"default"in o?Qr(o.from||n,o.default,!0):Qr(o.from||n):Qr(o),Ft(r)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>r.value,set:e=>r.value=e}):t[n]=r}}(u,o),l)for(const e in l){const t=l[e];v(t)&&(o[e]=t.bind(n))}if(r){const t=r.call(n,n);S(t)&&(e.data=wt(t))}if(Lr=!0,i)for(const e in i){const t=i[e],r=v(t)?t.bind(n,n):v(t.get)?t.get.bind(n,n):s,l=!v(t)&&v(t.set)?t.set.bind(n):s,c=Qi({get:r,set:l});Object.defineProperty(o,e,{enumerable:!0,configurable:!0,get:()=>c.value,set:e=>c.value=e})}if(c)for(const e in c)Br(c[e],o,n,e);if(a){const e=v(a)?a.call(n):a;Reflect.ownKeys(e).forEach((t=>{Yr(t,e[t])}))}function M(e,t){f(t)?t.forEach((t=>e(t.bind(n)))):t&&e(t.bind(n))}if(d&&Fr(d,e,"c"),M(Ko,p),M(zo,h),M(Jo,m),M(Xo,g),M(jo,y),M($o,b),M(nr,E),M(tr,I),M(er,T),M(Yo,x),M(Qo,w),M(Zo,D),f(A))if(A.length){const t=e.exposed||(e.exposed={});A.forEach((e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t})}))}else e.exposed||(e.exposed={});k&&e.render===s&&(e.render=k),null!=N&&(e.inheritAttrs=N),O&&(e.components=O),P&&(e.directives=P),D&&go(e)}(e)}finally{Me(),t()}}}const zi={get:(e,t)=>(We(e,0,""),e[t])};function Ji(e){return{attrs:new Proxy(e.attrs,zi),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function Xi(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(Gt(Rt(e.exposed)),{get:(t,n)=>n in t?t[n]:n in vr?vr[n](e):void 0,has:(e,t)=>t in e||t in vr})):e.proxy}function Yi(e,t=!0){return v(e)?e.displayName||e.name:e.name||t&&e.__name}const Qi=(e,t)=>{const n=function(e,t,n=!1){let o,r;return v(e)?o=e:(o=e.get,r=e.set),new en(o,r,n)}(e,0,Hi);return n};function Zi(e,t,n){const o=arguments.length;return 2===o?S(t)&&!f(t)?fi(t)?bi(e,null,[t]):bi(e,t):bi(e,null,t):(o>3?n=Array.prototype.slice.call(arguments,2):3===o&&fi(n)&&(n=[n]),bi(e,t,n))}function el(){}function tl(e,t,n,o){const r=n[o];if(r&&nl(r,e))return r;const s=t();return s.memo=e.slice(),s.cacheIndex=o,n[o]=s}function nl(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&ri&&ri.push(e),!0}const ol="3.5.12",rl=s,sl={sp:"serverPrefetch hook",bc:"beforeCreate hook",c:"created hook",bm:"beforeMount hook",m:"mounted hook",bu:"beforeUpdate hook",u:"updated",bum:"beforeUnmount hook",um:"unmounted hook",a:"activated hook",da:"deactivated hook",ec:"errorCaptured hook",rtc:"renderTracked hook",rtg:"renderTriggered hook",0:"setup function",1:"render function",2:"watcher getter",3:"watcher callback",4:"watcher cleanup function",5:"native event handler",6:"component event handler",7:"vnode hook",8:"directive hook",9:"transition hook",10:"app errorHandler",11:"app warnHandler",12:"ref function",13:"async component loader",14:"scheduler flush",15:"component update",16:"app unmount cleanup function"},il=Nn,ll=function e(t,n){var o,r;Nn=t,Nn?(Nn.enabled=!0,On.forEach((({event:e,args:t})=>Nn.emit(e,...t))),On=[]):"undefined"!=typeof window&&window.HTMLElement&&!(null==(r=null==(o=window.navigator)?void 0:o.userAgent)?void 0:r.includes("jsdom"))?((n.__VUE_DEVTOOLS_HOOK_REPLAY__=n.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push((t=>{e(t,n)})),setTimeout((()=>{Nn||(n.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Pn=!0,On=[])}),3e3)):(Pn=!0,On=[])},cl={createComponentInstance:Oi,setupComponent:Ui,renderComponentRoot:$s,setCurrentRenderingInstance:Ln,isVNode:fi,normalizeVNode:ki,getComponentPublicInstance:Xi,ensureValidVNode:hr,pushWarningContext:function(e){un.push(e)},popWarningContext:function(){un.pop()}},al=null,ul=null,dl=null;let pl;const fl="undefined"!=typeof window&&window.trustedTypes;if(fl)try{pl=fl.createPolicy("vue",{createHTML:e=>e})}catch(e){}const hl=pl?e=>pl.createHTML(e):e=>e,ml="undefined"!=typeof document?document:null,gl=ml&&ml.createElement("template"),vl={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,o)=>{const r="svg"===t?ml.createElementNS("http://www.w3.org/2000/svg",e):"mathml"===t?ml.createElementNS("http://www.w3.org/1998/Math/MathML",e):n?ml.createElement(e,{is:n}):ml.createElement(e);return"select"===e&&o&&null!=o.multiple&&r.setAttribute("multiple",o.multiple),r},createText:e=>ml.createTextNode(e),createComment:e=>ml.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>ml.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,o,r,s){const i=n?n.previousSibling:t.lastChild;if(r&&(r===s||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),r!==s&&(r=r.nextSibling););else{gl.innerHTML=hl("svg"===o?`${e}`:"mathml"===o?`${e}`:e);const r=gl.content;if("svg"===o||"mathml"===o){const e=r.firstChild;for(;e.firstChild;)r.appendChild(e.firstChild);r.removeChild(e)}t.insertBefore(r,n)}return[i?i.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},yl="transition",bl="animation",Sl=Symbol("_vtc"),_l={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},xl=a({},oo,_l),Cl=(e=>(e.displayName="Transition",e.props=xl,e))(((e,{slots:t})=>Zi(io,Il(e),t))),wl=(e,t=[])=>{f(e)?e.forEach((e=>e(...t))):e&&e(...t)},kl=e=>!!e&&(f(e)?e.some((e=>e.length>1)):e.length>1);function Il(e){const t={};for(const n in e)n in _l||(t[n]=e[n]);if(!1===e.css)return t;const{name:n="v",type:o,duration:r,enterFromClass:s=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=s,appearActiveClass:u=i,appearToClass:d=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:f=`${n}-leave-active`,leaveToClass:h=`${n}-leave-to`}=e,m=function(e){if(null==e)return null;if(S(e))return[Tl(e.enter),Tl(e.leave)];{const t=Tl(e);return[t,t]}}(r),g=m&&m[0],v=m&&m[1],{onBeforeEnter:y,onEnter:b,onEnterCancelled:_,onLeave:x,onLeaveCancelled:C,onBeforeAppear:w=y,onAppear:k=b,onAppearCancelled:I=_}=t,T=(e,t,n)=>{Dl(e,t?d:l),Dl(e,t?u:i),n&&n()},E=(e,t)=>{e._isLeaving=!1,Dl(e,p),Dl(e,h),Dl(e,f),t&&t()},D=e=>(t,n)=>{const r=e?k:b,i=()=>T(t,e,n);wl(r,[t,i]),Al((()=>{Dl(t,e?c:s),El(t,e?d:l),kl(r)||Ol(t,o,g,i)}))};return a(t,{onBeforeEnter(e){wl(y,[e]),El(e,s),El(e,i)},onBeforeAppear(e){wl(w,[e]),El(e,c),El(e,u)},onEnter:D(!1),onAppear:D(!0),onLeave(e,t){e._isLeaving=!0;const n=()=>E(e,t);El(e,p),El(e,f),Ll(),Al((()=>{e._isLeaving&&(Dl(e,p),El(e,h),kl(x)||Ol(e,o,v,n))})),wl(x,[e,n])},onEnterCancelled(e){T(e,!1),wl(_,[e])},onAppearCancelled(e){T(e,!0),wl(I,[e])},onLeaveCancelled(e){E(e),wl(C,[e])}})}function Tl(e){return V(e)}function El(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.add(t))),(e[Sl]||(e[Sl]=new Set)).add(t)}function Dl(e,t){t.split(/\s+/).forEach((t=>t&&e.classList.remove(t)));const n=e[Sl];n&&(n.delete(t),n.size||(e[Sl]=void 0))}function Al(e){requestAnimationFrame((()=>{requestAnimationFrame(e)}))}let Nl=0;function Ol(e,t,n,o){const r=e._endId=++Nl,s=()=>{r===e._endId&&o()};if(null!=n)return setTimeout(s,n);const{type:i,timeout:l,propCount:c}=Pl(e,t);if(!i)return o();const a=i+"end";let u=0;const d=()=>{e.removeEventListener(a,p),s()},p=t=>{t.target===e&&++u>=c&&d()};setTimeout((()=>{u(n[e]||"").split(", "),r=o(`${yl}Delay`),s=o(`${yl}Duration`),i=Rl(r,s),l=o(`${bl}Delay`),c=o(`${bl}Duration`),a=Rl(l,c);let u=null,d=0,p=0;return t===yl?i>0&&(u=yl,d=i,p=s.length):t===bl?a>0&&(u=bl,d=a,p=c.length):(d=Math.max(i,a),u=d>0?i>a?yl:bl:null,p=u?u===yl?s.length:c.length:0),{type:u,timeout:d,propCount:p,hasTransform:u===yl&&/\b(transform|all)(,|$)/.test(o(`${yl}Property`).toString())}}function Rl(e,t){for(;e.lengthMl(t)+Ml(e[n]))))}function Ml(e){return"auto"===e?0:1e3*Number(e.slice(0,-1).replace(",","."))}function Ll(){return document.body.offsetHeight}const Fl=Symbol("_vod"),Bl=Symbol("_vsh"),jl={beforeMount(e,{value:t},{transition:n}){e[Fl]="none"===e.style.display?"":e.style.display,n&&t?n.beforeEnter(e):$l(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:o}){!t!=!n&&(o?t?(o.beforeEnter(e),$l(e,!0),o.enter(e)):o.leave(e,(()=>{$l(e,!1)})):$l(e,t))},beforeUnmount(e,{value:t}){$l(e,t)}};function $l(e,t){e.style.display=t?e[Fl]:"none",e[Bl]=!t}const Vl=Symbol("");function Hl(e){const t=Ri();if(!t)return;const n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach((e=>ql(e,n)))},o=()=>{const o=e(t.proxy);t.ce?ql(t.ce,o):Ul(t.subTree,o),n(o)};Ko((()=>{Ds(o)})),zo((()=>{const e=new MutationObserver(o);e.observe(t.subTree.el.parentNode,{childList:!0}),Qo((()=>e.disconnect()))}))}function Ul(e,t){if(128&e.shapeFlag){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push((()=>{Ul(n.activeBranch,t)}))}for(;e.component;)e=e.component.subTree;if(1&e.shapeFlag&&e.el)ql(e.el,t);else if(e.type===Zs)e.children.forEach((e=>Ul(e,t)));else if(e.type===ni){let{el:n,anchor:o}=e;for(;n&&(ql(n,t),n!==o);)n=n.nextSibling}}function ql(e,t){if(1===e.nodeType){const n=e.style;let o="";for(const e in t)n.setProperty(`--${e}`,t[e]),o+=`--${e}: ${t[e]};`;n[Vl]=o}}const Wl=/(^|;)\s*display\s*:/,Gl=/\s*!important$/;function Kl(e,t,n){if(f(n))n.forEach((n=>Kl(e,t,n)));else if(null==n&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const o=function(e,t){const n=Jl[t];if(n)return n;let o=N(t);if("filter"!==o&&o in e)return Jl[t]=o;o=R(o);for(let n=0;nnc||(oc.then((()=>nc=0)),nc=Date.now()),sc=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,ic={};function lc(e,t,n){const o=ho(e,t);k(o)&&a(o,t);class r extends uc{constructor(e){super(o,e,n)}}return r.def=o,r}const cc=(e,t)=>lc(e,t,Xc),ac="undefined"!=typeof HTMLElement?HTMLElement:class{};class uc extends ac{constructor(e,t={},n=Jc){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._ob=null,this.shadowRoot&&n!==Jc?this._root=this.shadowRoot:!1!==e.shadowRoot?(this.attachShadow({mode:"open"}),this._root=this.shadowRoot):this._root=this,this._def.__asyncLoader||this._resolveProps(this._def)}connectedCallback(){if(!this.isConnected)return;this.shadowRoot||this._parseSlots(),this._connected=!0;let e=this;for(;e=e&&(e.parentNode||e.host);)if(e instanceof uc){this._parent=e;break}this._instance||(this._resolved?(this._setParent(),this._update()):e&&e._pendingResolve?this._pendingResolve=e._pendingResolve.then((()=>{this._pendingResolve=void 0,this._resolveDef()})):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._instance.provides=e._instance.provides)}disconnectedCallback(){this._connected=!1,Cn((()=>{this._connected||(this._ob&&(this._ob.disconnect(),this._ob=null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null)}))}_resolveDef(){if(this._pendingResolve)return;for(let e=0;e{for(const t of e)this._setAttr(t.attributeName)})),this._ob.observe(this,{attributes:!0});const e=(e,t=!1)=>{this._resolved=!0,this._pendingResolve=void 0;const{props:n,styles:o}=e;let r;if(n&&!f(n))for(const e in n){const t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=V(this._props[e])),(r||(r=Object.create(null)))[N(e)]=!0)}this._numberProps=r,t&&this._resolveProps(e),this.shadowRoot&&this._applyStyles(o),this._mount(e)},t=this._def.__asyncLoader;t?this._pendingResolve=t().then((t=>e(this._def=t,!0))):e(this._def)}_mount(e){this._app=this._createApp(e),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);const t=this._instance&&this._instance.exposed;if(t)for(const e in t)p(this,e)||Object.defineProperty(this,e,{get:()=>Ut(t[e])})}_resolveProps(e){const{props:t}=e,n=f(t)?t:Object.keys(t||{});for(const e of Object.keys(this))"_"!==e[0]&&n.includes(e)&&this._setProp(e,this[e]);for(const e of n.map(N))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!0)}})}_setAttr(e){if(e.startsWith("data-v-"))return;const t=this.hasAttribute(e);let n=t?this.getAttribute(e):ic;const o=N(e);t&&this._numberProps&&this._numberProps[o]&&(n=V(n)),this._setProp(o,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,o=!1){t!==this._props[e]&&(t===ic?delete this._props[e]:(this._props[e]=t,"key"===e&&this._app&&(this._app._ceVNode.key=t)),o&&this._instance&&this._update(),n&&(!0===t?this.setAttribute(P(e),""):"string"==typeof t||"number"==typeof t?this.setAttribute(P(e),t+""):t||this.removeAttribute(P(e))))}_update(){Kc(this._createVNode(),this._root)}_createVNode(){const e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));const t=bi(this._def,a(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;const t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,k(t[0])?a({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),P(e)!==e&&t(P(e),n)},this._setParent()}),t}_applyStyles(e,t){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}const n=this._nonce;for(let t=e.length-1;t>=0;t--){const o=document.createElement("style");n&&o.setAttribute("nonce",n),o.textContent=e[t],this.shadowRoot.prepend(o)}}_parseSlots(){const e=this._slots={};let t;for(;t=this.firstChild;){const n=1===t.nodeType&&t.getAttribute("slot")||"default";(e[n]||(e[n]=[])).push(t),this.removeChild(t)}}_renderSlots(){const e=(this._teleportTarget||this).querySelectorAll("slot"),t=this._instance.type.__scopeId;for(let n=0;n(delete e.props.mode,e))({name:"TransitionGroup",props:a({},xl,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Ri(),o=to();let r,s;return Xo((()=>{if(!r.length)return;const t=e.moveClass||`${e.name||"v"}-move`;if(!function(e,t,n){const o=e.cloneNode(),r=e[Sl];r&&r.forEach((e=>{e.split(/\s+/).forEach((e=>e&&o.classList.remove(e)))})),n.split(/\s+/).forEach((e=>e&&o.classList.add(e))),o.style.display="none";const s=1===t.nodeType?t:t.parentNode;s.appendChild(o);const{hasTransform:i}=Pl(o);return s.removeChild(o),i}(r[0].el,n.vnode.el,t))return;r.forEach(bc),r.forEach(Sc);const o=r.filter(_c);Ll(),o.forEach((e=>{const n=e.el,o=n.style;El(n,t),o.transform=o.webkitTransform=o.transitionDuration="";const r=n[gc]=e=>{e&&e.target!==n||e&&!/transform$/.test(e.propertyName)||(n.removeEventListener("transitionend",r),n[gc]=null,Dl(n,t))};n.addEventListener("transitionend",r)}))})),()=>{const i=Pt(e),l=Il(i);let c=i.tag||Zs;if(r=[],s)for(let e=0;e{const t=e.props["onUpdate:modelValue"]||!1;return f(t)?e=>F(t,e):t};function Cc(e){e.target.composing=!0}function wc(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const kc=Symbol("_assign"),Ic={created(e,{modifiers:{lazy:t,trim:n,number:o}},r){e[kc]=xc(r);const s=o||r.props&&"number"===r.props.type;Zl(e,t?"change":"input",(t=>{if(t.target.composing)return;let o=e.value;n&&(o=o.trim()),s&&(o=j(o)),e[kc](o)})),n&&Zl(e,"change",(()=>{e.value=e.value.trim()})),t||(Zl(e,"compositionstart",Cc),Zl(e,"compositionend",wc),Zl(e,"change",wc))},mounted(e,{value:t}){e.value=null==t?"":t},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:o,trim:r,number:s}},i){if(e[kc]=xc(i),e.composing)return;const l=null==t?"":t;if((!s&&"number"!==e.type||/^0\d/.test(e.value)?e.value:j(e.value))!==l){if(document.activeElement===e&&"range"!==e.type){if(o&&t===n)return;if(r&&e.value.trim()===l)return}e.value=l}}},Tc={deep:!0,created(e,t,n){e[kc]=xc(n),Zl(e,"change",(()=>{const t=e._modelValue,n=Oc(e),o=e.checked,r=e[kc];if(f(t)){const e=se(t,n),s=-1!==e;if(o&&!s)r(t.concat(n));else if(!o&&s){const n=[...t];n.splice(e,1),r(n)}}else if(m(t)){const e=new Set(t);o?e.add(n):e.delete(n),r(e)}else r(Pc(e,o))}))},mounted:Ec,beforeUpdate(e,t,n){e[kc]=xc(n),Ec(e,t,n)}};function Ec(e,{value:t,oldValue:n},o){let r;if(e._modelValue=t,f(t))r=se(t,o.props.value)>-1;else if(m(t))r=t.has(o.props.value);else{if(t===n)return;r=re(t,Pc(e,!0))}e.checked!==r&&(e.checked=r)}const Dc={created(e,{value:t},n){e.checked=re(t,n.props.value),e[kc]=xc(n),Zl(e,"change",(()=>{e[kc](Oc(e))}))},beforeUpdate(e,{value:t,oldValue:n},o){e[kc]=xc(o),t!==n&&(e.checked=re(t,o.props.value))}},Ac={deep:!0,created(e,{value:t,modifiers:{number:n}},o){const r=m(t);Zl(e,"change",(()=>{const t=Array.prototype.filter.call(e.options,(e=>e.selected)).map((e=>n?j(Oc(e)):Oc(e)));e[kc](e.multiple?r?new Set(t):t:t[0]),e._assigning=!0,Cn((()=>{e._assigning=!1}))})),e[kc]=xc(o)},mounted(e,{value:t}){Nc(e,t)},beforeUpdate(e,t,n){e[kc]=xc(n)},updated(e,{value:t}){e._assigning||Nc(e,t)}};function Nc(e,t){const n=e.multiple,o=f(t);if(!n||o||m(t)){for(let r=0,s=e.options.length;rString(e)===String(i))):se(t,i)>-1}else s.selected=t.has(i);else if(re(Oc(s),t))return void(e.selectedIndex!==r&&(e.selectedIndex=r))}n||-1===e.selectedIndex||(e.selectedIndex=-1)}}function Oc(e){return"_value"in e?e._value:e.value}function Pc(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const Rc={created(e,t,n){Lc(e,t,n,null,"created")},mounted(e,t,n){Lc(e,t,n,null,"mounted")},beforeUpdate(e,t,n,o){Lc(e,t,n,o,"beforeUpdate")},updated(e,t,n,o){Lc(e,t,n,o,"updated")}};function Mc(e,t){switch(e){case"SELECT":return Ac;case"TEXTAREA":return Ic;default:switch(t){case"checkbox":return Tc;case"radio":return Dc;default:return Ic}}}function Lc(e,t,n,o,r){const s=Mc(e.tagName,n.props&&n.props.type)[r];s&&s(e,t,n,o)}const Fc=["ctrl","shift","alt","meta"],Bc={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&0!==e.button,middle:e=>"button"in e&&1!==e.button,right:e=>"button"in e&&2!==e.button,exact:(e,t)=>Fc.some((n=>e[`${n}Key`]&&!t.includes(n)))},jc=(e,t)=>{const n=e._withMods||(e._withMods={}),o=t.join(".");return n[o]||(n[o]=(n,...o)=>{for(let e=0;e{const n=e._withKeys||(e._withKeys={}),o=t.join(".");return n[o]||(n[o]=n=>{if(!("key"in n))return;const o=P(n.key);return t.some((e=>e===o||$c[e]===o))?e(n):void 0})},Hc=a({patchProp:(e,t,n,o,r,s)=>{const i="svg"===r;"class"===t?function(e,t,n){const o=e[Sl];o&&(t=(t?[t,...o]:[...o]).join(" ")),null==t?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}(e,o,i):"style"===t?function(e,t,n){const o=e.style,r=y(n);let s=!1;if(n&&!r){if(t)if(y(t))for(const e of t.split(";")){const t=e.slice(0,e.indexOf(":")).trim();null==n[t]&&Kl(o,t,"")}else for(const e in t)null==n[e]&&Kl(o,e,"");for(const e in n)"display"===e&&(s=!0),Kl(o,e,n[e])}else if(r){if(t!==n){const e=o[Vl];e&&(n+=";"+e),o.cssText=n,s=Wl.test(n)}}else t&&e.removeAttribute("style");Fl in e&&(e[Fl]=s?o.display:"",e[Bl]&&(o.display="none"))}(e,n,o):l(t)?c(t)||function(e,t,n,o,r=null){const s=e[ec]||(e[ec]={}),i=s[t];if(o&&i)i.value=o;else{const[n,l]=function(e){let t;if(tc.test(e)){let n;for(t={};n=e.match(tc);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[":"===e[2]?e.slice(3):P(e.slice(2)),t]}(t);if(o){const i=s[t]=function(e,t){const n=e=>{if(e._vts){if(e._vts<=n.attached)return}else e._vts=Date.now();hn(function(e,t){if(f(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map((e=>t=>!t._stopped&&e&&e(t)))}return t}(e,n.value),t,5,[e])};return n.value=e,n.attached=rc(),n}(o,r);Zl(e,n,i,l)}else i&&(function(e,t,n,o){e.removeEventListener(t,n,o)}(e,n,i,l),s[t]=void 0)}}(e,t,0,o,s):("."===t[0]?(t=t.slice(1),1):"^"===t[0]?(t=t.slice(1),0):function(e,t,n,o){if(o)return"innerHTML"===t||"textContent"===t||!!(t in e&&sc(t)&&v(n));if("spellcheck"===t||"draggable"===t||"translate"===t)return!1;if("form"===t)return!1;if("list"===t&&"INPUT"===e.tagName)return!1;if("type"===t&&"TEXTAREA"===e.tagName)return!1;if("width"===t||"height"===t){const t=e.tagName;if("IMG"===t||"VIDEO"===t||"CANVAS"===t||"SOURCE"===t)return!1}return(!sc(t)||!y(n))&&t in e}(e,t,o,i))?(Ql(e,t,o),e.tagName.includes("-")||"value"!==t&&"checked"!==t&&"selected"!==t||Yl(e,t,o,i,0,"value"!==t)):!e._isVueCE||!/[A-Z]/.test(t)&&y(o)?("true-value"===t?e._trueValue=o:"false-value"===t&&(e._falseValue=o),Yl(e,t,o,i)):Ql(e,N(t),o,0,t)}},vl);let Uc,qc=!1;function Wc(){return Uc||(Uc=vs(Hc))}function Gc(){return Uc=qc?Uc:ys(Hc),qc=!0,Uc}const Kc=(...e)=>{Wc().render(...e)},zc=(...e)=>{Gc().hydrate(...e)},Jc=(...e)=>{const t=Wc().createApp(...e),{mount:n}=t;return t.mount=e=>{const o=Qc(e);if(!o)return;const r=t._component;v(r)||r.render||r.template||(r.template=o.innerHTML),1===o.nodeType&&(o.textContent="");const s=n(o,!1,Yc(o));return o instanceof Element&&(o.removeAttribute("v-cloak"),o.setAttribute("data-v-app","")),s},t},Xc=(...e)=>{const t=Gc().createApp(...e),{mount:n}=t;return t.mount=e=>{const t=Qc(e);if(t)return n(t,!0,Yc(t))},t};function Yc(e){return e instanceof SVGElement?"svg":"function"==typeof MathMLElement&&e instanceof MathMLElement?"mathml":void 0}function Qc(e){return y(e)?document.querySelector(e):e}let Zc=!1;const ea=()=>{Zc||(Zc=!0,Ic.getSSRProps=({value:e})=>({value:e}),Dc.getSSRProps=({value:e},t)=>{if(t.props&&re(t.props.value,e))return{checked:!0}},Tc.getSSRProps=({value:e},t)=>{if(f(e)){if(t.props&&se(e,t.props.value)>-1)return{checked:!0}}else if(m(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},Rc.getSSRProps=(e,t)=>{if("string"!=typeof t.type)return;const n=Mc(t.type.toUpperCase(),t.props&&t.props.type);return n.getSSRProps?n.getSSRProps(e,t):void 0},jl.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}})},ta=Symbol(""),na=Symbol(""),oa=Symbol(""),ra=Symbol(""),sa=Symbol(""),ia=Symbol(""),la=Symbol(""),ca=Symbol(""),aa=Symbol(""),ua=Symbol(""),da=Symbol(""),pa=Symbol(""),fa=Symbol(""),ha=Symbol(""),ma=Symbol(""),ga=Symbol(""),va=Symbol(""),ya=Symbol(""),ba=Symbol(""),Sa=Symbol(""),_a=Symbol(""),xa=Symbol(""),Ca=Symbol(""),wa=Symbol(""),ka=Symbol(""),Ia=Symbol(""),Ta=Symbol(""),Ea=Symbol(""),Da=Symbol(""),Aa=Symbol(""),Na=Symbol(""),Oa=Symbol(""),Pa=Symbol(""),Ra=Symbol(""),Ma=Symbol(""),La=Symbol(""),Fa=Symbol(""),Ba=Symbol(""),ja=Symbol(""),$a={[ta]:"Fragment",[na]:"Teleport",[oa]:"Suspense",[ra]:"KeepAlive",[sa]:"BaseTransition",[ia]:"openBlock",[la]:"createBlock",[ca]:"createElementBlock",[aa]:"createVNode",[ua]:"createElementVNode",[da]:"createCommentVNode",[pa]:"createTextVNode",[fa]:"createStaticVNode",[ha]:"resolveComponent",[ma]:"resolveDynamicComponent",[ga]:"resolveDirective",[va]:"resolveFilter",[ya]:"withDirectives",[ba]:"renderList",[Sa]:"renderSlot",[_a]:"createSlots",[xa]:"toDisplayString",[Ca]:"mergeProps",[wa]:"normalizeClass",[ka]:"normalizeStyle",[Ia]:"normalizeProps",[Ta]:"guardReactiveProps",[Ea]:"toHandlers",[Da]:"camelize",[Aa]:"capitalize",[Na]:"toHandlerKey",[Oa]:"setBlockTracking",[Pa]:"pushScopeId",[Ra]:"popScopeId",[Ma]:"withCtx",[La]:"unref",[Fa]:"isRef",[Ba]:"withMemo",[ja]:"isMemoSame"},Va={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function Ha(e,t,n,o,r,s,i,l=!1,c=!1,a=!1,u=Va){return e&&(l?(e.helper(ia),e.helper(Qa(e.inSSR,a))):e.helper(Ya(e.inSSR,a)),i&&e.helper(ya)),{type:13,tag:t,props:n,children:o,patchFlag:r,dynamicProps:s,directives:i,isBlock:l,disableTracking:c,isComponent:a,loc:u}}function Ua(e,t=Va){return{type:17,loc:t,elements:e}}function qa(e,t=Va){return{type:15,loc:t,properties:e}}function Wa(e,t){return{type:16,loc:Va,key:y(e)?Ga(e,!0):e,value:t}}function Ga(e,t=!1,n=Va,o=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:o}}function Ka(e,t=Va){return{type:8,loc:t,children:e}}function za(e,t=[],n=Va){return{type:14,loc:n,callee:e,arguments:t}}function Ja(e,t=void 0,n=!1,o=!1,r=Va){return{type:18,params:e,returns:t,newline:n,isSlot:o,loc:r}}function Xa(e,t,n,o=!0){return{type:19,test:e,consequent:t,alternate:n,newline:o,loc:Va}}function Ya(e,t){return e||t?aa:ua}function Qa(e,t){return e||t?la:ca}function Za(e,{helper:t,removeHelper:n,inSSR:o}){e.isBlock||(e.isBlock=!0,n(Ya(o,e.isComponent)),t(ia),t(Qa(o,e.isComponent)))}const eu=new Uint8Array([123,123]),tu=new Uint8Array([125,125]);function nu(e){return e>=97&&e<=122||e>=65&&e<=90}function ou(e){return 32===e||10===e||9===e||12===e||13===e}function ru(e){return 47===e||62===e||ou(e)}function su(e){const t=new Uint8Array(e.length);for(let n=0;n4===e.type&&e.isStatic;function hu(e){switch(e){case"Teleport":case"teleport":return na;case"Suspense":case"suspense":return oa;case"KeepAlive":case"keep-alive":return ra;case"BaseTransition":case"base-transition":return sa}}const mu=/^\d|[^\$\w\xA0-\uFFFF]/,gu=e=>!mu.test(e),vu=/[A-Za-z_$\xA0-\uFFFF]/,yu=/[\.\?\w$\xA0-\uFFFF]/,bu=/\s+[.[]\s*|\s*[.[]\s+/g,Su=e=>4===e.type?e.content:e.loc.source,_u=e=>{const t=Su(e).trim().replace(bu,(e=>e.trim()));let n=0,o=[],r=0,s=0,i=null;for(let e=0;e|^\s*(async\s+)?function(?:\s+[\w$]+)?\s*\(/;function Cu(e,t,n=!1){for(let o=0;o4===e.key.type&&e.key.content===o))}return n}function Ru(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}const Mu=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Lu={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:i,isPreTag:i,isIgnoreNewlineTag:i,isCustomElement:i,onError:uu,onWarn:du,comments:!1,prefixIdentifiers:!1};let Fu=Lu,Bu=null,ju="",$u=null,Vu=null,Hu="",Uu=-1,qu=-1,Wu=0,Gu=!1,Ku=null;const zu=[],Ju=new class{constructor(e,t){this.stack=e,this.cbs=t,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=eu,this.delimiterClose=tu,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=eu,this.delimiterClose=tu}getPos(e){let t=1,n=e+1;for(let o=this.newlines.length-1;o>=0;o--){const r=this.newlines[o];if(e>r){t=o+2,n=e-r;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inVPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?ru(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||ou(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart=e||(28===this.state?this.currentSequence===iu.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):6===this.state||11===this.state||18===this.state||17===this.state||12===this.state||13===this.state||14===this.state||15===this.state||16===this.state||20===this.state||19===this.state||21===this.state||9===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(zu,{onerr:md,ontext(e,t){ed(Qu(e,t),e,t)},ontextentity(e,t,n){ed(e,t,n)},oninterpolation(e,t){if(Gu)return ed(Qu(e,t),e,t);let n=e+Ju.delimiterOpen.length,o=t-Ju.delimiterClose.length;for(;ou(ju.charCodeAt(n));)n++;for(;ou(ju.charCodeAt(o-1));)o--;let r=Qu(n,o);r.includes("&")&&(r=Fu.decodeEntities(r,!1)),ud({type:5,content:hd(r,!1,dd(n,o)),loc:dd(e,t)})},onopentagname(e,t){const n=Qu(e,t);$u={type:1,tag:n,ns:Fu.getNamespace(n,zu[0],Fu.ns),tagType:0,props:[],children:[],loc:dd(e-1,t),codegenNode:void 0}},onopentagend(e){Zu(e)},onclosetag(e,t){const n=Qu(e,t);if(!Fu.isVoidTag(n)){let o=!1;for(let e=0;e0&&md(24,zu[0].loc.start.offset);for(let n=0;n<=e;n++)td(zu.shift(),t,n(7===e.type?e.rawName:e.name)===n))&&md(2,t)},onattribend(e,t){if($u&&Vu){if(pd(Vu.loc,t),0!==e)if(Hu.includes("&")&&(Hu=Fu.decodeEntities(Hu,!0)),6===Vu.type)"class"===Vu.name&&(Hu=ad(Hu).trim()),1!==e||Hu||md(13,t),Vu.value={type:2,content:Hu,loc:1===e?dd(Uu,qu):dd(Uu-1,qu+1)},Ju.inSFCRoot&&"template"===$u.tag&&"lang"===Vu.name&&Hu&&"html"!==Hu&&Ju.enterRCDATA(su("{const r=t.start.offset+n;return hd(e,!1,dd(r,r+e.length),0,o?1:0)},l={source:i(s.trim(),n.indexOf(s,r.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=r.trim().replace(Yu,"").trim();const a=r.indexOf(c),u=c.match(Xu);if(u){c=c.replace(Xu,"").trim();const e=u[1].trim();let t;if(e&&(t=n.indexOf(e,a+c.length),l.key=i(e,t,!0)),u[2]){const o=u[2].trim();o&&(l.index=i(o,n.indexOf(o,l.key?t+e.length:a+c.length),!0))}}return c&&(l.value=i(c,a,!0)),l}(Vu.exp));let t=-1;"bind"===Vu.name&&(t=Vu.modifiers.findIndex((e=>"sync"===e.content)))>-1&&au("COMPILER_V_BIND_SYNC",Fu,Vu.loc,Vu.rawName)&&(Vu.name="model",Vu.modifiers.splice(t,1))}7===Vu.type&&"pre"===Vu.name||$u.props.push(Vu)}Hu="",Uu=qu=-1},oncomment(e,t){Fu.comments&&ud({type:3,content:Qu(e,t),loc:dd(e-4,t+3)})},onend(){const e=ju.length;for(let t=0;t64&&n<91||hu(e)||Fu.isBuiltInComponent&&Fu.isBuiltInComponent(e)||Fu.isNativeTag&&!Fu.isNativeTag(e))return!0;var n;for(let e=0;e6===e.type&&"inline-template"===e.name));n&&au("COMPILER_INLINE_TEMPLATE",Fu,n.loc)&&e.children.length&&(n.value={type:2,content:Qu(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function nd(e,t){let n=e;for(;ju.charCodeAt(n)!==t&&n>=0;)n--;return n}const od=new Set(["if","else","else-if","for","slot"]);function rd({tag:e,props:t}){if("template"===e)for(let e=0;e0){if(e>=2){l.codegenNode.patchFlag=-1,i.push(l);continue}}else{const e=l.codegenNode;if(13===e.type){const t=e.patchFlag;if((void 0===t||512===t||1===t)&&xd(l,n)>=2){const t=Cd(l);t&&(e.props=n.hoist(t))}e.dynamicProps&&(e.dynamicProps=n.hoist(e.dynamicProps))}}}else if(12===l.type&&(o?0:bd(l,n))>=2){i.push(l);continue}if(1===l.type){const t=1===l.tagType;t&&n.scopes.vSlot++,yd(l,e,n,!1,r),t&&n.scopes.vSlot--}else if(11===l.type)yd(l,e,n,1===l.children.length,!0);else if(9===l.type)for(let t=0;te.key===t||e.key.content===t));return n&&n.value}}i.length&&n.transformHoist&&n.transformHoist(s,n,e)}function bd(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const o=n.get(e);if(void 0!==o)return o;const r=e.codegenNode;if(13!==r.type)return 0;if(r.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag&&"math"!==e.tag)return 0;if(void 0===r.patchFlag){let o=3;const s=xd(e,t);if(0===s)return n.set(e,0),0;s1)for(let r=0;r`_${$a[T.helper(e)]}`,replaceNode(e){T.parent.children[T.childIndex]=T.currentNode=e},removeNode(e){const t=T.parent.children,n=e?t.indexOf(e):T.currentNode?T.childIndex:-1;e&&e!==T.currentNode?T.childIndex>n&&(T.childIndex--,T.onNodeRemoved()):(T.currentNode=null,T.onNodeRemoved()),T.parent.children.splice(n,1)},onNodeRemoved:s,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){y(e)&&(e=Ga(e)),T.hoists.push(e);const t=Ga(`_hoisted_${T.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1){const n=function(e,t,n=!1){return{type:20,index:e,value:t,needPauseTracking:n,needArraySpread:!1,loc:Va}}(T.cached.length,e,t);return T.cached.push(n),n}};return T.filters=new Set,T}(e,t);kd(e,n),t.hoistStatic&&gd(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:o}=e;if(1===o.length){const n=o[0];if(vd(e,n)&&n.codegenNode){const o=n.codegenNode;13===o.type&&Za(o,t),e.codegenNode=o}else e.codegenNode=n}else if(o.length>1){let o=64;e.codegenNode=Ha(t,n(ta),void 0,e.children,o,void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function kd(e,t){t.currentNode=e;const{nodeTransforms:n}=t,o=[];for(let r=0;r{n--};for(;nt===e:t=>e.test(t);return(e,o)=>{if(1===e.type){const{props:r}=e;if(3===e.tagType&&r.some(Tu))return;const s=[];for(let i=0;i`${$a[e]}: _${$a[e]}`;function Dd(e,t,{helper:n,push:o,newline:r,isTS:s}){const i=n("filter"===t?va:"component"===t?ha:ga);for(let n=0;n3||!1;t.push("["),n&&t.indent(),Nd(e,t,n),n&&t.deindent(),t.push("]")}function Nd(e,t,n=!1,o=!0){const{push:r,newline:s}=t;for(let i=0;ie||"null"))}([s,i,l,h,a]),t),n(")"),d&&n(")"),u&&(n(", "),Od(u,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:o,pure:r}=t,s=y(e.callee)?e.callee:o(e.callee);r&&n(Td),n(s+"(",-2,e),Nd(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:o,deindent:r,newline:s}=t,{properties:i}=e;if(!i.length)return void n("{}",-2,e);const l=i.length>1||!1;n(l?"{":"{ "),l&&o();for(let e=0;e "),(c||l)&&(n("{"),o()),i?(c&&n("return "),f(i)?Ad(i,t):Od(i,t)):l&&Od(l,t),(c||l)&&(r(),n("}")),a&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:o,alternate:r,newline:s}=e,{push:i,indent:l,deindent:c,newline:a}=t;if(4===n.type){const e=!gu(n.content);e&&i("("),Pd(n,t),e&&i(")")}else i("("),Od(n,t),i(")");s&&l(),t.indentLevel++,s||i(" "),i("? "),Od(o,t),t.indentLevel--,s&&a(),s||i(" "),i(": ");const u=19===r.type;u||t.indentLevel++,Od(r,t),u||t.indentLevel--,s&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:o,indent:r,deindent:s,newline:i}=t,{needPauseTracking:l,needArraySpread:c}=e;c&&n("[...("),n(`_cache[${e.index}] || (`),l&&(r(),n(`${o(Oa)}(-1),`),i(),n("(")),n(`_cache[${e.index}] = `),Od(e.value,t),l&&(n(`).cacheIndex = ${e.index},`),i(),n(`${o(Oa)}(1),`),i(),n(`_cache[${e.index}]`),s()),n(")"),c&&n(")]")}(e,t);break;case 21:Nd(e.body,t,!0,!1)}}function Pd(e,t){const{content:n,isStatic:o}=e;t.push(o?JSON.stringify(n):n,-3,e)}function Rd(e,t){for(let n=0;nfunction(e,t,n,o){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const o=t.exp?t.exp.loc:e.loc;n.onError(pu(28,t.loc)),t.exp=Ga("true",!1,o)}if("if"===t.name){const s=Fd(e,t),i={type:9,loc:(r=e.loc,dd(r.start.offset,r.end.offset)),branches:[s]};if(n.replaceNode(i),o)return o(i,s,!0)}else{const r=n.parent.children;let s=r.indexOf(e);for(;s-- >=-1;){const i=r[s];if(i&&3===i.type)n.removeNode(i);else{if(!i||2!==i.type||i.content.trim().length){if(i&&9===i.type){"else-if"===t.name&&void 0===i.branches[i.branches.length-1].condition&&n.onError(pu(30,e.loc)),n.removeNode();const r=Fd(e,t);i.branches.push(r);const s=o&&o(i,r,!1);kd(r,n),s&&s(),n.currentNode=null}else n.onError(pu(30,e.loc));break}n.removeNode(i)}}}var r}(e,t,n,((e,t,o)=>{const r=n.parent.children;let s=r.indexOf(e),i=0;for(;s-- >=0;){const e=r[s];e&&9===e.type&&(i+=e.branches.length)}return()=>{if(o)e.codegenNode=Bd(t,i,n);else{const o=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);o.alternate=Bd(t,i+e.branches.length-1,n)}}}))));function Fd(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!Cu(e,"for")?e.children:[e],userKey:wu(e,"key"),isTemplateIf:n}}function Bd(e,t,n){return e.condition?Xa(e.condition,jd(e,t,n),za(n.helper(da),['""',"true"])):jd(e,t,n)}function jd(e,t,n){const{helper:o}=n,r=Wa("key",Ga(`${t}`,!1,Va,2)),{children:s}=e,i=s[0];if(1!==s.length||1!==i.type){if(1===s.length&&11===i.type){const e=i.codegenNode;return Ou(e,r,n),e}{let t=64;return Ha(n,o(ta),qa([r]),s,t,void 0,void 0,!0,!1,!1,e.loc)}}{const e=i.codegenNode,t=14===(l=e).type&&l.callee===Ba?l.arguments[1].returns:l;return 13===t.type&&Za(t,n),Ou(t,r,n),e}var l}const $d=(e,t,n)=>{const{modifiers:o,loc:r}=e,s=e.arg;let{exp:i}=e;if(i&&4===i.type&&!i.content.trim()&&(i=void 0),!i){if(4!==s.type||!s.isStatic)return n.onError(pu(52,s.loc)),{props:[Wa(s,Ga("",!0,r))]};Vd(e),i=e.exp}return 4!==s.type?(s.children.unshift("("),s.children.push(') || ""')):s.isStatic||(s.content=`${s.content} || ""`),o.some((e=>"camel"===e.content))&&(4===s.type?s.isStatic?s.content=N(s.content):s.content=`${n.helperString(Da)}(${s.content})`:(s.children.unshift(`${n.helperString(Da)}(`),s.children.push(")"))),n.inSSR||(o.some((e=>"prop"===e.content))&&Hd(s,"."),o.some((e=>"attr"===e.content))&&Hd(s,"^")),{props:[Wa(s,i)]}},Vd=(e,t)=>{const n=e.arg,o=N(n.content);e.exp=Ga(o,!1,n.loc)},Hd=(e,t)=>{4===e.type?e.isStatic?e.content=t+e.content:e.content=`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(")"))},Ud=Id("for",((e,t,n)=>{const{helper:o,removeHelper:r}=n;return function(e,t,n,o){if(!t.exp)return void n.onError(pu(31,t.loc));const r=t.forParseResult;if(!r)return void n.onError(pu(32,t.loc));qd(r);const{addIdentifiers:s,removeIdentifiers:i,scopes:l}=n,{source:c,value:a,key:u,index:d}=r,p={type:11,loc:t.loc,source:c,valueAlias:a,keyAlias:u,objectIndexAlias:d,parseResult:r,children:Eu(e)?e.children:[e]};n.replaceNode(p),l.vFor++;const f=o&&o(p);return()=>{l.vFor--,f&&f()}}(e,t,n,(t=>{const s=za(o(ba),[t.source]),i=Eu(e),l=Cu(e,"memo"),c=wu(e,"key",!1,!0);c&&7===c.type&&!c.exp&&Vd(c);const a=c&&(6===c.type?c.value?Ga(c.value.content,!0):void 0:c.exp),u=c&&a?Wa("key",a):null,d=4===t.source.type&&t.source.constType>0,p=d?64:c?128:256;return t.codegenNode=Ha(n,o(ta),void 0,s,p,void 0,void 0,!0,!d,!1,e.loc),()=>{let c;const{children:p}=t,f=1!==p.length||1!==p[0].type,h=Du(e)?e:i&&1===e.children.length&&Du(e.children[0])?e.children[0]:null;if(h?(c=h.codegenNode,i&&u&&Ou(c,u,n)):f?c=Ha(n,o(ta),u?qa([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1):(c=p[0].codegenNode,i&&u&&Ou(c,u,n),c.isBlock!==!d&&(c.isBlock?(r(ia),r(Qa(n.inSSR,c.isComponent))):r(Ya(n.inSSR,c.isComponent))),c.isBlock=!d,c.isBlock?(o(ia),o(Qa(n.inSSR,c.isComponent))):o(Ya(n.inSSR,c.isComponent))),l){const e=Ja(Wd(t.parseResult,[Ga("_cached")]));e.body={type:21,body:[Ka(["const _memo = (",l.exp,")"]),Ka(["if (_cached",...a?[" && _cached.key === ",a]:[],` && ${n.helperString(ja)}(_cached, _memo)) return _cached`]),Ka(["const _item = ",c]),Ga("_item.memo = _memo"),Ga("return _item")],loc:Va},s.arguments.push(e,Ga("_cache"),Ga(String(n.cached.length))),n.cached.push(null)}else s.arguments.push(Ja(Wd(t.parseResult),c,!0))}}))}));function qd(e,t){e.finalized||(e.finalized=!0)}function Wd({value:e,key:t,index:n},o=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Ga("_".repeat(t+1),!1)))}([e,t,n,...o])}const Gd=Ga("undefined",!1),Kd=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=Cu(e,"slot");if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},zd=(e,t,n,o)=>Ja(e,n,!1,!0,n.length?n[0].loc:o);function Jd(e,t,n=zd){t.helper(Ma);const{children:o,loc:r}=e,s=[],i=[];let l=t.scopes.vSlot>0||t.scopes.vFor>0;const c=Cu(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!fu(e)&&(l=!0),s.push(Wa(e||Ga("default",!0),n(t,void 0,o,r)))}let a=!1,u=!1;const d=[],p=new Set;let f=0;for(let e=0;e{const s=n(e,void 0,o,r);return t.compatConfig&&(s.isNonScopedSlot=!0),Wa("default",s)};a?d.length&&d.some((e=>Qd(e)))&&(u?t.onError(pu(39,d[0].loc)):s.push(e(void 0,d))):s.push(e(void 0,o))}const h=l?2:Yd(e.children)?3:1;let m=qa(s.concat(Wa("_",Ga(h+"",!1))),r);return i.length&&(m=za(t.helper(_a),[m,Ua(i)])),{slots:m,hasDynamicSlots:l}}function Xd(e,t,n){const o=[Wa("name",e),Wa("fn",t)];return null!=n&&o.push(Wa("key",Ga(String(n),!0))),qa(o)}function Yd(e){for(let t=0;tfunction(){if(1!==(e=t.currentNode).type||0!==e.tagType&&1!==e.tagType)return;const{tag:n,props:o}=e,r=1===e.tagType;let s=r?function(e,t,n=!1){let{tag:o}=e;const r=rp(o),s=wu(e,"is",!1,!0);if(s)if(r||cu("COMPILER_IS_ON_ELEMENT",t)){let e;if(6===s.type?e=s.value&&Ga(s.value.content,!0):(e=s.exp,e||(e=Ga("is",!1,s.arg.loc))),e)return za(t.helper(ma),[e])}else 6===s.type&&s.value.content.startsWith("vue:")&&(o=s.value.content.slice(4));const i=hu(o)||t.isBuiltInComponent(o);return i?(n||t.helper(i),i):(t.helper(ha),t.components.add(o),Ru(o,"component"))}(e,t):`"${n}"`;const i=S(s)&&s.callee===ma;let l,c,a,u,d,p=0,f=i||s===na||s===oa||!r&&("svg"===n||"foreignObject"===n||"math"===n);if(o.length>0){const n=tp(e,t,void 0,r,i);l=n.props,p=n.patchFlag,u=n.dynamicPropNames;const o=n.directives;d=o&&o.length?Ua(o.map((e=>function(e,t){const n=[],o=Zd.get(e);o?n.push(t.helperString(o)):(t.helper(ga),t.directives.add(e.name),n.push(Ru(e.name,"directive")));const{loc:r}=e;if(e.exp&&n.push(e.exp),e.arg&&(e.exp||n.push("void 0"),n.push(e.arg)),Object.keys(e.modifiers).length){e.arg||(e.exp||n.push("void 0"),n.push("void 0"));const t=Ga("true",!1,r);n.push(qa(e.modifiers.map((e=>Wa(e,t))),r))}return Ua(n,e.loc)}(e,t)))):void 0,n.shouldUseBlock&&(f=!0)}if(e.children.length>0)if(s===ra&&(f=!0,p|=1024),r&&s!==na&&s!==ra){const{slots:n,hasDynamicSlots:o}=Jd(e,t);c=n,o&&(p|=1024)}else if(1===e.children.length&&s!==na){const n=e.children[0],o=n.type,r=5===o||8===o;r&&0===bd(n,t)&&(p|=1),c=r||2===o?n:e.children}else c=e.children;u&&u.length&&(a=function(e){let t="[";for(let n=0,o=e.length;n0;let h=!1,m=0,g=!1,v=!1,y=!1,S=!1,_=!1,x=!1;const C=[],w=e=>{u.length&&(d.push(qa(np(u),c)),u=[]),e&&d.push(e)},k=()=>{t.scopes.vFor>0&&u.push(Wa(Ga("ref_for",!0),Ga("true")))},I=({key:e,value:n})=>{if(fu(e)){const s=e.content,i=l(s);if(!i||o&&!r||"onclick"===s.toLowerCase()||"onUpdate:modelValue"===s||T(s)||(S=!0),i&&T(s)&&(x=!0),i&&14===n.type&&(n=n.arguments[0]),20===n.type||(4===n.type||8===n.type)&&bd(n,t)>0)return;"ref"===s?g=!0:"class"===s?v=!0:"style"===s?y=!0:"key"===s||C.includes(s)||C.push(s),!o||"class"!==s&&"style"!==s||C.includes(s)||C.push(s)}else _=!0};for(let r=0;r"prop"===e.content))&&(m|=32);const x=t.directiveTransforms[n];if(x){const{props:n,needRuntime:o}=x(l,e,t);!s&&n.forEach(I),S&&r&&!fu(r)?w(qa(n,c)):u.push(...n),o&&(p.push(l),b(o)&&Zd.set(l,o))}else E(n)||(p.push(l),f&&(h=!0))}}let D;if(d.length?(w(),D=d.length>1?za(t.helper(Ca),d,c):d[0]):u.length&&(D=qa(np(u),c)),_?m|=16:(v&&!o&&(m|=2),y&&!o&&(m|=4),C.length&&(m|=8),S&&(m|=32)),h||0!==m&&32!==m||!(g||x||p.length>0)||(m|=512),!t.inSSR&&D)switch(D.type){case 15:let e=-1,n=-1,o=!1;for(let t=0;t{if(Du(e)){const{children:n,loc:o}=e,{slotName:r,slotProps:s}=function(e,t){let n,o='"default"';const r=[];for(let t=0;t0){const{props:o,directives:s}=tp(e,t,r,!1,!1);n=o,s.length&&t.onError(pu(36,s[0].loc))}return{slotName:o,slotProps:n}}(e,t),i=[t.prefixIdentifiers?"_ctx.$slots":"$slots",r,"{}","undefined","true"];let l=2;s&&(i[2]=s,l=3),n.length&&(i[3]=Ja([],n,!1,!1,o),l=4),t.scopeId&&!t.slotted&&(l=5),i.splice(l),e.codegenNode=za(t.helper(Sa),i,o)}},ip=(e,t,n,o)=>{const{loc:r,modifiers:s,arg:i}=e;let l;if(e.exp||s.length||n.onError(pu(35,r)),4===i.type)if(i.isStatic){let e=i.content;e.startsWith("vue:")&&(e=`vnode-${e.slice(4)}`),l=Ga(0!==t.tagType||e.startsWith("vnode")||!/[A-Z]/.test(e)?M(N(e)):`on:${e}`,!0,i.loc)}else l=Ka([`${n.helperString(Na)}(`,i,")"]);else l=i,l.children.unshift(`${n.helperString(Na)}(`),l.children.push(")");let c=e.exp;c&&!c.content.trim()&&(c=void 0);let a=n.cacheHandlers&&!c&&!n.inVOnce;if(c){const e=_u(c),t=!(e||(e=>xu.test(Su(e)))(c)),n=c.content.includes(";");(t||a&&e)&&(c=Ka([`${t?"$event":"(...args)"} => ${n?"{":"("}`,c,n?"}":")"]))}let u={props:[Wa(l,c||Ga("() => {}",!1,r))]};return o&&(u=o(u)),a&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach((e=>e.key.isHandlerKey=!0)),u},lp=(e,t)=>{if(0===e.type||1===e.type||11===e.type||10===e.type)return()=>{const n=e.children;let o,r=!1;for(let e=0;e7===e.type&&!t.directiveTransforms[e.name]))||"template"===e.tag)))for(let e=0;e{if(1===e.type&&Cu(e,"once",!0)){if(cp.has(e)||t.inVOnce||t.inSSR)return;return cp.add(e),t.inVOnce=!0,t.helper(Oa),()=>{t.inVOnce=!1;const e=t.currentNode;e.codegenNode&&(e.codegenNode=t.cache(e.codegenNode,!0))}}},up=(e,t,n)=>{const{exp:o,arg:r}=e;if(!o)return n.onError(pu(41,e.loc)),dp();const s=o.loc.source.trim(),i=4===o.type?o.content:s,l=n.bindingMetadata[s];if("props"===l||"props-aliased"===l)return n.onError(pu(44,o.loc)),dp();if(!i.trim()||!_u(o))return n.onError(pu(42,o.loc)),dp();const c=r||Ga("modelValue",!0),a=r?fu(r)?`onUpdate:${N(r.content)}`:Ka(['"onUpdate:" + ',r]):"onUpdate:modelValue";let u;u=Ka([(n.isTS?"($event: any)":"$event")+" => ((",o,") = $event)"]);const d=[Wa(c,e.exp),Wa(a,u)];if(e.modifiers.length&&1===t.tagType){const t=e.modifiers.map((e=>e.content)).map((e=>(gu(e)?e:JSON.stringify(e))+": true")).join(", "),n=r?fu(r)?`${r.content}Modifiers`:Ka([r,' + "Modifiers"']):"modelModifiers";d.push(Wa(n,Ga(`{ ${t} }`,!1,e.loc,2)))}return dp(d)};function dp(e=[]){return{props:e}}const pp=/[\w).+\-_$\]]/,fp=(e,t)=>{cu("COMPILER_FILTERS",t)&&(5===e.type?hp(e.content,t):1===e.type&&e.props.forEach((e=>{7===e.type&&"for"!==e.name&&e.exp&&hp(e.exp,t)})))};function hp(e,t){if(4===e.type)mp(e,t);else for(let n=0;n=0&&(e=n.charAt(t)," "===e);t--);e&&pp.test(e)||(u=!0)}}else void 0===i?(h=s+1,i=n.slice(0,s).trim()):g();function g(){m.push(n.slice(h,s).trim()),h=s+1}if(void 0===i?i=n.slice(0,s).trim():0!==h&&g(),m.length){for(s=0;s{if(1===e.type){const n=Cu(e,"memo");if(!n||vp.has(e))return;return vp.add(e),()=>{const o=e.codegenNode||t.currentNode.codegenNode;o&&13===o.type&&(1!==e.tagType&&Za(o,t),e.codegenNode=za(t.helper(Ba),[n.exp,Ja(void 0,o),"_cache",String(t.cached.length)]),t.cached.push(null))}}};function bp(e,t={}){const n=t.onError||uu,o="module"===t.mode;!0===t.prefixIdentifiers?n(pu(47)):o&&n(pu(48)),t.cacheHandlers&&n(pu(49)),t.scopeId&&!o&&n(pu(50));const r=a({},t,{prefixIdentifiers:!1}),s=y(e)?function(e,t){if(Ju.reset(),$u=null,Vu=null,Hu="",Uu=-1,qu=-1,zu.length=0,ju=e,Fu=a({},Lu),t){let e;for(e in t)null!=t[e]&&(Fu[e]=t[e])}Ju.mode="html"===Fu.parseMode?1:"sfc"===Fu.parseMode?2:0,Ju.inXML=1===Fu.ns||2===Fu.ns;const n=t&&t.delimiters;n&&(Ju.delimiterOpen=su(n[0]),Ju.delimiterClose=su(n[1]));const o=Bu=function(e,t=""){return{type:0,source:t,children:[],helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:Va}}(0,e);return Ju.parse(ju),o.loc=dd(0,e.length),o.children=id(o.children),Bu=null,o}(e,r):e,[i,l]=[[ap,Ld,yp,Ud,fp,sp,ep,Kd,lp],{on:ip,bind:$d,model:up}];return wd(s,a({},r,{nodeTransforms:[...i,...t.nodeTransforms||[]],directiveTransforms:a({},l,t.directiveTransforms||{})})),function(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:o=!1,filename:r="template.vue.html",scopeId:s=null,optimizeImports:i=!1,runtimeGlobalName:l="Vue",runtimeModuleName:c="vue",ssrRuntimeModuleName:a="vue/server-renderer",ssr:u=!1,isTS:d=!1,inSSR:p=!1}){const f={mode:t,prefixIdentifiers:n,sourceMap:o,filename:r,scopeId:s,optimizeImports:i,runtimeGlobalName:l,runtimeModuleName:c,ssrRuntimeModuleName:a,ssr:u,isTS:d,inSSR:p,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${$a[e]}`,push(e,t=-2,n){f.code+=e},indent(){h(++f.indentLevel)},deindent(e=!1){e?--f.indentLevel:h(--f.indentLevel)},newline(){h(f.indentLevel)}};function h(e){f.push("\n"+" ".repeat(e),0)}return f}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:o,push:r,prefixIdentifiers:s,indent:i,deindent:l,newline:c,scopeId:a,ssr:u}=n,d=Array.from(e.helpers),p=d.length>0,f=!s&&"module"!==o;if(function(e,t){const{ssr:n,prefixIdentifiers:o,push:r,newline:s,runtimeModuleName:i,runtimeGlobalName:l,ssrRuntimeModuleName:c}=t,a=l,u=Array.from(e.helpers);u.length>0&&(r(`const _Vue = ${a}\n`,-1),e.hoists.length)&&r(`const { ${[aa,ua,da,pa,fa].filter((e=>u.includes(e))).map(Ed).join(", ")} } = _Vue\n`,-1),function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:o}=t;o();for(let r=0;r0)&&c()),e.directives.length&&(Dd(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Dd(e.filters,"filter",n),c()),e.temps>0){r("let ");for(let t=0;t0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(r("\n",0),c()),u||r("return "),e.codegenNode?Od(e.codegenNode,n):r("null"),f&&(l(),r("}")),l(),r("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}(s,r)}const Sp=Symbol(""),_p=Symbol(""),xp=Symbol(""),Cp=Symbol(""),wp=Symbol(""),kp=Symbol(""),Ip=Symbol(""),Tp=Symbol(""),Ep=Symbol(""),Dp=Symbol("");var Ap;let Np;Ap={[Sp]:"vModelRadio",[_p]:"vModelCheckbox",[xp]:"vModelText",[Cp]:"vModelSelect",[wp]:"vModelDynamic",[kp]:"withModifiers",[Ip]:"withKeys",[Tp]:"vShow",[Ep]:"Transition",[Dp]:"TransitionGroup"},Object.getOwnPropertySymbols(Ap).forEach((e=>{$a[e]=Ap[e]}));const Op={parseMode:"html",isVoidTag:te,isNativeTag:e=>Q(e)||Z(e)||ee(e),isPreTag:e=>"pre"===e,isIgnoreNewlineTag:e=>"pre"===e||"textarea"===e,decodeEntities:function(e,t=!1){return Np||(Np=document.createElement("div")),t?(Np.innerHTML=`
`,Np.children[0].getAttribute("foo")):(Np.innerHTML=e,Np.textContent)},isBuiltInComponent:e=>"Transition"===e||"transition"===e?Ep:"TransitionGroup"===e||"transition-group"===e?Dp:void 0,getNamespace(e,t,n){let o=t?t.ns:n;if(t&&2===o)if("annotation-xml"===t.tag){if("svg"===e)return 1;t.props.some((e=>6===e.type&&"encoding"===e.name&&null!=e.value&&("text/html"===e.value.content||"application/xhtml+xml"===e.value.content)))&&(o=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&"mglyph"!==e&&"malignmark"!==e&&(o=0);else t&&1===o&&("foreignObject"!==t.tag&&"desc"!==t.tag&&"title"!==t.tag||(o=0));if(0===o){if("svg"===e)return 1;if("math"===e)return 2}return o}},Pp=(e,t)=>{const n=J(e);return Ga(JSON.stringify(n),!1,t,3)};function Rp(e,t){return pu(e,t)}const Mp=n("passive,once,capture"),Lp=n("stop,prevent,self,ctrl,shift,alt,meta,exact,middle"),Fp=n("left,right"),Bp=n("onkeyup,onkeydown,onkeypress"),jp=(e,t)=>fu(e)&&"onclick"===e.content.toLowerCase()?Ga(t,!0):4!==e.type?Ka(["(",e,`) === "onClick" ? "${t}" : (`,e,")"]):e,$p=(e,t)=>{1!==e.type||0!==e.tagType||"script"!==e.tag&&"style"!==e.tag||t.removeNode()},Vp=[e=>{1===e.type&&e.props.forEach(((t,n)=>{6===t.type&&"style"===t.name&&t.value&&(e.props[n]={type:7,name:"bind",arg:Ga("style",!0,t.loc),exp:Pp(t.value.content,t.loc),modifiers:[],loc:t.loc})}))}],Hp={cloak:()=>({props:[]}),html:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Rp(53,r)),t.children.length&&(n.onError(Rp(54,r)),t.children.length=0),{props:[Wa(Ga("innerHTML",!0,r),o||Ga("",!0))]}},text:(e,t,n)=>{const{exp:o,loc:r}=e;return o||n.onError(Rp(55,r)),t.children.length&&(n.onError(Rp(56,r)),t.children.length=0),{props:[Wa(Ga("textContent",!0),o?bd(o,n)>0?o:za(n.helperString(xa),[o],r):Ga("",!0))]}},model:(e,t,n)=>{const o=up(e,t,n);if(!o.props.length||1===t.tagType)return o;e.arg&&n.onError(Rp(58,e.arg.loc));const{tag:r}=t,s=n.isCustomElement(r);if("input"===r||"textarea"===r||"select"===r||s){let i=xp,l=!1;if("input"===r||s){const o=wu(t,"type");if(o){if(7===o.type)i=wp;else if(o.value)switch(o.value.content){case"radio":i=Sp;break;case"checkbox":i=_p;break;case"file":l=!0,n.onError(Rp(59,e.loc))}}else(function(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))})(t)&&(i=wp)}else"select"===r&&(i=Cp);l||(o.needRuntime=n.helper(i))}else n.onError(Rp(57,e.loc));return o.props=o.props.filter((e=>!(4===e.key.type&&"modelValue"===e.key.content))),o},on:(e,t,n)=>ip(e,t,n,(t=>{const{modifiers:o}=e;if(!o.length)return t;let{key:r,value:s}=t.props[0];const{keyModifiers:i,nonKeyModifiers:l,eventOptionModifiers:c}=((e,t,n)=>{const o=[],r=[],s=[];for(let i=0;i{const{exp:o,loc:r}=e;return o||n.onError(Rp(61,r)),{props:[],needRuntime:n.helper(Tp)}}},Up=Object.create(null);Wi((function(e,n){if(!y(e)){if(!e.nodeType)return s;e=e.innerHTML}const o=function(e,t){return e+JSON.stringify(t,((e,t)=>"function"==typeof t?t.toString():t))}(e,n),r=Up[o];if(r)return r;if("#"===e[0]){const t=document.querySelector(e);e=t?t.innerHTML:""}const i=a({hoistStatic:!0,onError:void 0,onWarn:s},n);i.isCustomElement||"undefined"==typeof customElements||(i.isCustomElement=e=>!!customElements.get(e));const{code:l}=function(e,t={}){return bp(e,a({},Op,t,{nodeTransforms:[$p,...Vp,...t.nodeTransforms||[]],directiveTransforms:a({},Hp,t.directiveTransforms||{}),transformHoist:null}))}(e,i),c=new Function("Vue",l)(t);return c._rc=!0,Up[o]=c}));const qp={data:function(){return{CSRFToken,APIroot,rootPath:"../",libsPath,orgchartPath,userID,designData:{},customizableTemplates:["homepage"],views:["homepage","testview"],custom_page_select:"homepage",appIsGettingData:!0,appIsPublishing:!1,isEditingMode:!0,iconList:[],tagsToRemove:["script","img","a","link","br"],dialogTitle:"",dialogFormContent:"",dialogButtonText:{confirm:"Save",cancel:"Cancel"},formSaveFunction:"",showFormDialog:!1}},provide:function(){var e=this;return{iconList:Qi((function(){return e.iconList})),appIsGettingData:Qi((function(){return e.appIsGettingData})),appIsPublishing:Qi((function(){return e.appIsPublishing})),isEditingMode:Qi((function(){return e.isEditingMode})),designData:Qi((function(){return e.designData})),CSRFToken:this.CSRFToken,APIroot:this.APIroot,rootPath:this.rootPath,libsPath:this.libsPath,orgchartPath:this.orgchartPath,userID:this.userID,getDesignData:this.getDesignData,tagsToRemove:this.tagsToRemove,setCustom_page_select:this.setCustom_page_select,toggleEnableTemplate:this.toggleEnableTemplate,updateLocalDesignData:this.updateLocalDesignData,openDialog:this.openDialog,closeFormDialog:this.closeFormDialog,setDialogTitleHTML:this.setDialogTitleHTML,setDialogButtonText:this.setDialogButtonText,setDialogContent:this.setDialogContent,setDialogSaveFunction:this.setDialogSaveFunction,showFormDialog:Qi((function(){return e.showFormDialog})),dialogTitle:Qi((function(){return e.dialogTitle})),dialogFormContent:Qi((function(){return e.dialogFormContent})),dialogButtonText:Qi((function(){return e.dialogButtonText})),formSaveFunction:Qi((function(){return e.formSaveFunction}))}},created:function(){this.getIconList()},methods:{setEditMode:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isEditingMode=e},setCustom_page_select:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"homepage";this.custom_page_select=e},getIconList:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"iconPicker/list"),success:function(t){return e.iconList=t||[]},error:function(e){return console.log(e)}})},toggleEnableTemplate:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(this.customizableTemplates.includes(t)){var n=this.designData["".concat(t,"_enabled")],o=void 0===n||0===parseInt(n)?1:0;this.appIsPublishing=!0,$.ajax({type:"POST",url:"".concat(this.APIroot,"site/settings/enable_").concat(t),data:{CSRFToken:this.CSRFToken,enabled:o},success:function(n){1!=+(null==n?void 0:n.code)?console.log("unexpected response returned:",n):e.designData["".concat(t,"_enabled")]=o,e.appIsPublishing=!1},error:function(e){return console.log(e)}})}},getDesignData:function(){var e=this;this.appIsGettingData=!0,$.ajax({type:"GET",url:"".concat(this.APIroot,"system/settings"),success:function(t){e.designData=t,e.appIsGettingData=!1},error:function(e){console.log(e)}})},updateLocalDesignData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"{}";this.designData["".concat(e,"_design_json")]=t},openDialog:function(){this.showFormDialog=!0},closeFormDialog:function(){this.showFormDialog=!1,this.dialogTitle="",this.dialogFormContent="",this.dialogButtonText={confirm:"Save",cancel:"Cancel"}},setDialogTitleHTML:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogTitle=e},setDialogButtonText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirm,n=void 0===t?"":t,o=e.cancel,r=void 0===o?"":o;this.dialogButtonText={confirm:n,cancel:r}},setDialogContent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.dialogFormContent=e},setDialogSaveFunction:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";"function"==typeof e&&(this.formSaveFunction=e)}},watch:{custom_page_select:function(e,t){this.views.includes(e)&&this.$router.push({name:this.custom_page_select})}}},Wp="undefined"!=typeof document;function Gp(e){return"object"==typeof e||"displayName"in e||"props"in e||"__vccOpts"in e}const Kp=Object.assign;function zp(e,t){const n={};for(const o in t){const r=t[o];n[o]=Xp(r)?r.map(e):e(r)}return n}const Jp=()=>{},Xp=Array.isArray,Yp=/#/g,Qp=/&/g,Zp=/\//g,ef=/=/g,tf=/\?/g,nf=/\+/g,of=/%5B/g,rf=/%5D/g,sf=/%5E/g,lf=/%60/g,cf=/%7B/g,af=/%7C/g,uf=/%7D/g,df=/%20/g;function pf(e){return encodeURI(""+e).replace(af,"|").replace(of,"[").replace(rf,"]")}function ff(e){return pf(e).replace(nf,"%2B").replace(df,"+").replace(Yp,"%23").replace(Qp,"%26").replace(lf,"`").replace(cf,"{").replace(uf,"}").replace(sf,"^")}function hf(e){return null==e?"":function(e){return pf(e).replace(Yp,"%23").replace(tf,"%3F")}(e).replace(Zp,"%2F")}function mf(e){try{return decodeURIComponent(""+e)}catch(e){}return""+e}const gf=/\/$/;function vf(e,t,n="/"){let o,r={},s="",i="";const l=t.indexOf("#");let c=t.indexOf("?");return l=0&&(c=-1),c>-1&&(o=t.slice(0,c),s=t.slice(c+1,l>-1?l:t.length),r=e(s)),l>-1&&(o=o||t.slice(0,l),i=t.slice(l,t.length)),o=function(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];".."!==r&&"."!==r||o.push("");let s,i,l=n.length-1;for(s=0;s1&&l--}return n.slice(0,l).join("/")+"/"+o.slice(s).join("/")}(null!=o?o:t,n),{fullPath:o+(s&&"?")+s+i,path:o,query:r,hash:mf(i)}}function yf(e,t){return t&&e.toLowerCase().startsWith(t.toLowerCase())?e.slice(t.length)||"/":e}function bf(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Sf(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!_f(e[n],t[n]))return!1;return!0}function _f(e,t){return Xp(e)?xf(e,t):Xp(t)?xf(t,e):e===t}function xf(e,t){return Xp(t)?e.length===t.length&&e.every(((e,n)=>e===t[n])):1===e.length&&e[0]===t}const Cf={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var wf,kf;!function(e){e.pop="pop",e.push="push"}(wf||(wf={})),function(e){e.back="back",e.forward="forward",e.unknown=""}(kf||(kf={}));const If=/^[^#]+#/;function Tf(e,t){return e.replace(If,"#")+t}const Ef=()=>({left:window.scrollX,top:window.scrollY});function Df(e,t){return(history.state?history.state.position-t:-1)+e}const Af=new Map;let Nf=()=>location.protocol+"//"+location.host;function Of(e,t){const{pathname:n,search:o,hash:r}=t,s=e.indexOf("#");if(s>-1){let t=r.includes(e.slice(s))?e.slice(s).length:1,n=r.slice(t);return"/"!==n[0]&&(n="/"+n),yf(n,"")}return yf(n,e)+o+r}function Pf(e,t,n,o=!1,r=!1){return{back:e,current:t,forward:n,replaced:o,position:window.history.length,scroll:r?Ef():null}}function Rf(e){return"string"==typeof e||"symbol"==typeof e}const Mf=Symbol("");var Lf;function Ff(e,t){return Kp(new Error,{type:e,[Mf]:!0},t)}function Bf(e,t){return e instanceof Error&&Mf in e&&(null==t||!!(e.type&t))}!function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"}(Lf||(Lf={}));const jf="[^/]+?",$f={sensitive:!1,strict:!1,start:!0,end:!0},Vf=/[.+*?^${}()[\]/\\]/g;function Hf(e,t){let n=0;for(;nt.length?1===t.length&&80===t[0]?1:-1:0}function Uf(e,t){let n=0;const o=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const Wf={type:0,value:""},Gf=/[a-zA-Z0-9_]/;function Kf(e,t,n){const o=function(e,t){const n=Kp({},$f,t),o=[];let r=n.start?"^":"";const s=[];for(const t of e){const e=t.length?[]:[90];n.strict&&!t.length&&(r+="/");for(let o=0;o1&&("*"===l||"+"===l)&&t(`A repeatable param (${a}) must be alone in its segment. eg: '/:ids+.`),s.push({type:1,value:a,regexp:u,repeatable:"*"===l||"+"===l,optional:"*"===l||"?"===l})):t("Invalid state to consume buffer"),a="")}function p(){a+=l}for(;cKp(e,t.meta)),{})}function Zf(e,t){const n={};for(const o in e)n[o]=o in t?t[o]:e[o];return n}function eh({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function th(e){const t={};if(""===e||"?"===e)return t;const n=("?"===e[0]?e.slice(1):e).split("&");for(let e=0;ee&&ff(e))):[o&&ff(o)]).forEach((e=>{void 0!==e&&(t+=(t.length?"&":"")+n,null!=e&&(t+="="+e))})):void 0!==o&&(t+=(t.length?"&":"")+n)}return t}function oh(e){const t={};for(const n in e){const o=e[n];void 0!==o&&(t[n]=Xp(o)?o.map((e=>null==e?null:""+e)):null==o?o:""+o)}return t}const rh=Symbol(""),sh=Symbol(""),ih=Symbol(""),lh=Symbol(""),ch=Symbol("");function ah(){let e=[];return{add:function(t){return e.push(t),()=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)}},list:()=>e.slice(),reset:function(){e=[]}}}function uh(e,t,n,o,r,s=e=>e()){const i=o&&(o.enterCallbacks[r]=o.enterCallbacks[r]||[]);return()=>new Promise(((l,c)=>{const a=e=>{var s;!1===e?c(Ff(4,{from:n,to:t})):e instanceof Error?c(e):"string"==typeof(s=e)||s&&"object"==typeof s?c(Ff(2,{from:t,to:e})):(i&&o.enterCallbacks[r]===i&&"function"==typeof e&&i.push(e),l())},u=s((()=>e.call(o&&o.instances[r],t,n,a)));let d=Promise.resolve(u);e.length<3&&(d=d.then(a)),d.catch((e=>c(e)))}))}function dh(e,t,n,o,r=e=>e()){const s=[];for(const i of e)for(const e in i.components){let l=i.components[e];if("beforeRouteEnter"===t||i.instances[e])if(Gp(l)){const c=(l.__vccOpts||l)[t];c&&s.push(uh(c,n,o,i,e,r))}else{let c=l();s.push((()=>c.then((s=>{if(!s)throw new Error(`Couldn't resolve component "${e}" at "${i.path}"`);const l=(c=s).__esModule||"Module"===c[Symbol.toStringTag]||c.default&&Gp(c.default)?s.default:s;var c;i.mods[e]=s,i.components[e]=l;const a=(l.__vccOpts||l)[t];return a&&uh(a,n,o,i,e,r)()}))))}}return s}function ph(e){const t=Qr(ih),n=Qr(lh),o=Qi((()=>{const n=Ut(e.to);return t.resolve(n)})),r=Qi((()=>{const{matched:e}=o.value,{length:t}=e,r=e[t-1],s=n.matched;if(!r||!s.length)return-1;const i=s.findIndex(bf.bind(null,r));if(i>-1)return i;const l=hh(e[t-2]);return t>1&&hh(r)===l&&s[s.length-1].path!==l?s.findIndex(bf.bind(null,e[t-2])):i})),s=Qi((()=>r.value>-1&&function(e,t){for(const n in t){const o=t[n],r=e[n];if("string"==typeof o){if(o!==r)return!1}else if(!Xp(r)||r.length!==o.length||o.some(((e,t)=>e!==r[t])))return!1}return!0}(n.params,o.value.params))),i=Qi((()=>r.value>-1&&r.value===n.matched.length-1&&Sf(n.params,o.value.params)));return{route:o,href:Qi((()=>o.value.href)),isActive:s,isExactActive:i,navigate:function(n={}){return function(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||e.defaultPrevented||void 0!==e.button&&0!==e.button)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}(n)?t[Ut(e.replace)?"replace":"push"](Ut(e.to)).catch(Jp):Promise.resolve()}}}const fh=ho({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:ph,setup(e,{slots:t}){const n=wt(ph(e)),{options:o}=Qr(ih),r=Qi((()=>({[mh(e.activeClass,o.linkActiveClass,"router-link-active")]:n.isActive,[mh(e.exactActiveClass,o.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive})));return()=>{const o=t.default&&t.default(n);return e.custom?o:Zi("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},o)}}});function hh(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const mh=(e,t,n)=>null!=e?e:null!=t?t:n;function gh(e,t){if(!e)return null;const n=e(t);return 1===n.length?n[0]:n}const vh=ho({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const o=Qr(ch),r=Qi((()=>e.route||o.value)),s=Qr(sh,0),i=Qi((()=>{let e=Ut(s);const{matched:t}=r.value;let n;for(;(n=t[e])&&!n.components;)e++;return e})),l=Qi((()=>r.value.matched[i.value]));Yr(sh,Qi((()=>i.value+1))),Yr(rh,l),Yr(ch,r);const c=Bt();return Ns((()=>[c.value,l.value,e.name]),(([e,t,n],[o,r,s])=>{t&&(t.instances[n]=e,r&&r!==t&&e&&e===o&&(t.leaveGuards.size||(t.leaveGuards=r.leaveGuards),t.updateGuards.size||(t.updateGuards=r.updateGuards))),!e||!t||r&&bf(t,r)&&o||(t.enterCallbacks[n]||[]).forEach((t=>t(e)))}),{flush:"post"}),()=>{const o=r.value,s=e.name,i=l.value,a=i&&i.components[s];if(!a)return gh(n.default,{Component:a,route:o});const u=i.props[s],d=u?!0===u?o.params:"function"==typeof u?u(o):u:null,p=Zi(a,Kp({},d,t,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(i.instances[s]=null)},ref:c}));return gh(n.default,{Component:p,route:o})||p}}}),yh={name:"custom-menu-item",data:function(){return{dyniconsPath:this.libsPath+"dynicons/svg/"}},props:{menuItem:{type:Object,required:!0}},inject:["libsPath","rootPath","builtInIDs","isEditingMode"],computed:{baseCardStyles:function(){return{backgroundColor:this.menuItem.bgColor}},anchorClasses:function(){var e;return"custom_menu_card"+(null!==(e=this.menuItem)&&void 0!==e&&e.link&&!1===this.isEditingMode?"":" disableClick")},href:function(){return this.builtInIDs.includes(this.menuItem.id)?this.rootPath+this.menuItem.link:this.menuItem.link}},template:'\n \n
\n

{{ menuItem.title }}

\n
{{ menuItem.subtitle }}
\n
\n
'};function bh(e){return bh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bh(e)}function Sh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function _h(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,o=Array(t);n ( Emergency ) ':"",l=s?' style="background-color: red; color: black"':"",c=document.querySelector("#".concat(t.cellContainerID));null!==c&&(c.innerHTML='\n ').concat(t.recordID,'\n \n ').concat(n[t.recordID].title,'
\n ').concat(o,"").concat(i),c.addEventListener("click",(function(){window.location="".concat(e.rootPath,"index.php?a=printview&recordID=").concat(t.recordID)})))}},service:{name:"Service",indicatorID:"service",editable:!1,callback:function(t,n){var o=document.querySelector("#".concat(t.cellContainerID));null!==o&&(o.innerHTML=n[t.recordID].service,n[t.recordID].userID==e.userID&&(o.style.backgroundColor="#feffd1"))}},status:{name:"Status",indicatorID:"currentStatus",editable:!1,callback:function(t,n){var o=0==n[t.recordID].blockingStepID?"Pending ":"Waiting for ",r="";if(null==n[t.recordID].stepID&&"0"==n[t.recordID].submitted){var s=null==n[t.recordID].lastStatus?"Not Submitted":"Pending Re-submission";r=''.concat(s,"")}else if(null==n[t.recordID].stepID){var i=n[t.recordID].lastStatus;""==i&&(i='Check Status")),r=''+i+""}else r=o+n[t.recordID].stepTitle;n[t.recordID].deleted>0&&(r+=", Cancelled");var l=document.querySelector("#".concat(t.cellContainerID));null!==l&&(l.innerHTML=r,n[t.recordID].userID==e.userID&&(l.style.backgroundColor="#feffd1"))}},initiatorName:{name:"Initiator",indicatorID:"initiator",editable:!1,callback:function(e,t){var n=document.querySelector("#".concat(e.cellContainerID));null!==n&&(n.innerHTML=t[e.recordID].firstName+" "+t[e.recordID].lastName)}}},sort:{column:"recordID",direction:"desc"},headerOptions:["date","title","service","status","initiatorName"],chosenHeadersSelect:Ih(this.chosenHeaders),mostRecentHeaders:"",choicesSelectID:"choices_header_select",potentialJoins:["service","status","initiatorName","action_history","stepFulfillmentOnly","recordResolutionData"]}},mounted:function(){0===this.chosenHeadersSelect.length?(this.chosenHeadersSelect=["date","title","service","status"],this.createChoices(),this.postSearchSettings()):(this.createChoices(),this.main())},inject:["APIroot","CSRFToken","userID","rootPath","orgchartPath","isEditingMode","chosenHeaders"],methods:{createChoices:function(){var e=this,t=document.getElementById(this.choicesSelectID);if(null!==t&&!0===t.multiple&&"active"!==(null==t?void 0:t.getAttribute("data-choice"))){var n=Ih(this.chosenHeadersSelect);this.headerOptions.forEach((function(e){n.includes(e)||n.push(e)})),n=n.map((function(t){return{value:t,label:e.getLabel(t),selected:e.chosenHeadersSelect.includes(t)}}));var o=new Choices(t,{allowHTML:!1,removeItemButton:!0,editItems:!0,shouldSort:!1,choices:n});t.choicesjs=o}document.querySelector("#".concat(this.choicesSelectID," ~ input.choices__input")).setAttribute("aria-labelledby",this.choicesSelectID+"_label")},getLabel:function(e){var t="";switch(e.toLowerCase()){case"date":case"title":case"service":case"status":t=e;break;case"initiatorname":t="initiator"}return t},removeChoices:function(){var e=document.getElementById(this.choicesSelectID);void 0!==e.choicesjs&&"function"==typeof e.choicesjs.destroy&&e.choicesjs.destroy()},postSearchSettings:function(){var e=this;JSON.stringify(this.chosenHeadersSelect)!==this.mostRecentHeaders?(this.searchIsUpdating=!0,$.ajax({type:"POST",url:"".concat(this.APIroot,"site/settings/search_design_json"),data:{CSRFToken:this.CSRFToken,chosen_headers:this.chosenHeadersSelect},success:function(t){1!=+(null==t?void 0:t.code)&&console.log("unexpected response returned:",t),document.getElementById("searchContainer").innerHTML="",setTimeout((function(){e.main(),e.searchIsUpdating=!1}),150)},error:function(e){return console.log(e)}})):console.log("headers have not changed")},renderResult:function(e,t){var n=this,o=this.chosenHeadersSelect.map((function(e){return function(e){for(var t=1;t

'),document.querySelector("#btn_abortSearch").addEventListener("click",(function(){a=!0})),l+=c,t.setLimit(l,c),void t.execute();e.renderResult(n,i),window.scrollTo(0,u),document.querySelector("#searchContainer_getMoreResults").style.display=r?"none":"inline"}})),n.setSearchFunc((function(n){if(void 0===n||"undefined"===n){n="";var o=document.querySelector('input[id$="_searchtxt"]');null!==o&&(o.value="")}t.clearTerms(),i={},l=0,r=!1,u=0,a=!1;var s=!0,d={};try{d=JSON.parse(n)}catch(e){s=!1}if(""==(n=n?n.trim():""))t.addTerm("title","LIKE","*");else if(!isNaN(parseFloat(n))&&isFinite(n))t.addTerm("recordID","=",n);else if(s)for(var p in d)"data"!=d[p].id&&"dependencyID"!=d[p].id?t.addTerm(d[p].id,d[p].operator,d[p].match,d[p].gate):t.addDataTerm(d[p].id,d[p].indicatorID,d[p].operator,d[p].match,d[p].gate);else t.addTerm("title","LIKE","*"+n+"*");var f=!1;for(var h in t.getQuery().terms)if("stepID"==t.getQuery().terms[h].id&&"="==t.getQuery().terms[h].operator&&"deleted"==t.getQuery().terms[h].match){f=!0;break}return f||t.addTerm("deleted","=",0),t.setLimit(c),t.join("categoryName"),e.potentialJoins.forEach((function(n){e.chosenHeadersSelect.includes(n)&&t.join(n)})),t.sort("date","DESC"),t.execute()})),n.init(),document.querySelector("#"+n.getResultContainerID()).innerHTML="

Searching for records...

",document.querySelector("#searchContainer_getMoreResults").addEventListener("click",(function(){if(r=!0,u=window.scrollY,""==n.getSearchInput()){var e=t.getQuery();for(var o in e.terms)"userID"==e.terms[o].id&&e.terms.splice(o,1);t.setQuery(e)}l+=c,t.setLimit(l,c),t.execute()}))}},template:'
\n
\n
\n \n \n
\n \n
\n
\n \n
'};function Dh(e){return Dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dh(e)}function Ah(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function Nh(e,t,n){return(t=function(e){var t=function(e){if("object"!=Dh(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Dh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Dh(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Oh,Ph=[{path:"/",redirect:{name:"homepage"}},{path:"/homepage",name:"homepage",component:{name:"homepage",data:function(){return{menuIsUpdating:!1,builtInIDs:["btn_reports","btn_bookmarks","btn_inbox","btn_new_request"],menuItem:{}}},created:function(){console.log("homepage view created, getting design data"),this.getDesignData()},mounted:function(){console.log("homepage mounted")},inject:["CSRFToken","APIroot","appIsGettingData","appIsPublishing","toggleEnableTemplate","updateLocalDesignData","getDesignData","designData","isEditingMode","showFormDialog","dialogFormContent","setDialogTitleHTML","setDialogContent","openDialog"],provide:function(){var e=this;return{menuItem:Qi((function(){return e.menuItem})),menuDirection:Qi((function(){return e.menuDirection})),menuItemList:Qi((function(){return e.menuItemList})),chosenHeaders:Qi((function(){return e.chosenHeaders})),menuIsUpdating:Qi((function(){return e.menuIsUpdating})),builtInIDs:this.builtInIDs,setMenuItem:this.setMenuItem,updateMenuItemList:this.updateMenuItemList,postHomeMenuSettings:this.postHomeMenuSettings,postSearchSettings:this.postSearchSettings}},components:{LeafFormDialog:{data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var n=document.getElementById(t);null!==n&&n.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),n=document.getElementById("next"),o=document.getElementById("button_cancelchange"),r=t||n||o;null!==r&&"function"==typeof r.focus&&(r.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=0,o=0,r=0,s=0,i=function(e){(e=e||window.event).preventDefault(),n=r-e.clientX,o=s-e.clientY,r=e.clientX,s=e.clientY,t.style.top=t.offsetTop-o+"px",t.style.left=t.offsetLeft-n+"px",c()},l=function(){document.onmouseup=null,document.onmousemove=null},c=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),r=e.clientX,s=e.clientY,document.onmouseup=l,document.onmousemove=i})}},template:'\n \n \n '},DesignCardDialog:{name:"design-card-dialog",data:function(){var e,t,n,o,r,s,i,l,c,a,u,d;return{id:this.menuItem.id,order:(null===(e=this.menuItem)||void 0===e?void 0:e.order)||0,title:XSSHelpers.stripAllTags((null===(t=this.menuItem)||void 0===t?void 0:t.title)||""),titleColor:(null===(n=this.menuItem)||void 0===n?void 0:n.titleColor)||"#000000",subtitle:XSSHelpers.stripAllTags((null===(o=this.menuItem)||void 0===o?void 0:o.subtitle)||""),subtitleColor:(null===(r=this.menuItem)||void 0===r?void 0:r.subtitleColor)||"#000000",bgColor:(null===(s=this.menuItem)||void 0===s?void 0:s.bgColor)||"#ffffff",icon:(null===(i=this.menuItem)||void 0===i?void 0:i.icon)||"",link:XSSHelpers.stripAllTags((null===(l=this.menuItem)||void 0===l?void 0:l.link)||""),enabled:1==+(null===(c=this.menuItem)||void 0===c?void 0:c.enabled),iconPreviewSize:"30px",useTitleColor:(null===(a=this.menuItem)||void 0===a?void 0:a.titleColor)===(null===(u=this.menuItem)||void 0===u?void 0:u.subtitleColor),useAnIcon:""!==(null===(d=this.menuItem)||void 0===d?void 0:d.icon),markedForDeletion:!1}},mounted:function(){this.setDialogSaveFunction(this.onSave)},components:{CustomMenuItem:yh},inject:["libsPath","menuItem","builtInIDs","updateMenuItemList","iconList","closeFormDialog","setDialogSaveFunction","setDialogButtonText"],computed:{menuItemOBJ:function(){return{id:this.id,order:this.order,title:XSSHelpers.stripAllTags(this.title),titleColor:this.titleColor,subtitle:XSSHelpers.stripAllTags(this.subtitle),subtitleColor:this.useTitleColor?this.titleColor:this.subtitleColor,bgColor:this.bgColor,icon:!0===this.useAnIcon?this.icon:"",link:XSSHelpers.stripAllTags(this.link),enabled:+this.enabled}},isBuiltInCard:function(){return this.builtInIDs.includes(this.id)},linkNotSet:function(){return!this.isBuiltInCard&&1==+this.enabled&&0!==this.link.indexOf("https://")},linkAttentionStyle:function(){return this.linkNotSet?"border: 2px solid #c00000":""}},methods:{getIconSrc:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=e.indexOf("dynicons/");return this.libsPath+e.slice(t)},setIcon:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).target.id,t=e.indexOf("svg/");t>-1&&(this.icon=e.slice(t+4))},onSave:function(){this.updateMenuItemList(this.menuItemOBJ,this.markedForDeletion),this.closeFormDialog()}},watch:{markedForDeletion:function(e,t){var n=document.getElementById("button_save");!0===e?(this.setDialogButtonText({confirm:"Delete",cancel:"Cancel"}),n.setAttribute("title","Delete"),n.style.backgroundColor="#b00000"):(this.setDialogButtonText({confirm:"Save",cancel:"Cancel"}),n.setAttribute("title","Save"),n.style.backgroundColor="#005EA2")}},template:'
\n

Card Preview

\n
\n \n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n \n \n
\n
\n
\n
\n \n \n
\n
\n
\n \n \n
\n \n
\n
\n
\n \n \n
\n
\n \n
\n
\n Icon Selections\n
\n \n
\n
\n
'},CustomHomeMenu:{name:"custom-home-menu",data:function(){return{menuDirectionSelection:this.menuDirection,builtInButtons:[{id:"btn_reports",order:-1,title:"Report Builder",titleColor:"#ffffff",subtitle:"View saved links to requests",subtitleColor:"#ffffff",bgColor:"#000000",icon:"x-office-spreadsheet.svg",link:"?a=reports&v=3",enabled:1},{id:"btn_bookmarks",order:-2,title:"Bookmarks",titleColor:"#000000",subtitle:"View saved links to requests",subtitleColor:"#000000",bgColor:"#7eb2b3",icon:"bookmark.svg",link:"?a=bookmarks",enabled:1},{id:"btn_inbox",order:-3,title:"Inbox",titleColor:"#000000",subtitle:"Review and apply actions to active requests",subtitleColor:"#000000",bgColor:"#b6ef6d",icon:"document-open.svg",link:"?a=inbox",enabled:1},{id:"btn_new_request",order:-4,title:"New Request",titleColor:"#ffffff",subtitle:"Start a new request",subtitleColor:"#ffffff",bgColor:"#2372b0",icon:"document-new.svg",link:"?a=newform",enabled:1}]}},components:{CustomMenuItem:yh},inject:["isEditingMode","builtInIDs","menuItemList","menuDirection","menuIsUpdating","updateMenuItemList","postHomeMenuSettings","setMenuItem"],computed:{wrapperStyles:function(){return this.isEditingMode?{maxWidth:"500px",marginRight:"3rem"}:{}},ulStyles:function(){return"v"===this.menuDirectionSelection||this.isEditingMode?{flexDirection:"column",maxWidth:"430px"}:{flexWrap:"wrap"}},menuItemListDisplay:function(){return this.isEditingMode?this.menuItemList:this.menuItemList.filter((function(e){return 1==+e.enabled}))},allBuiltinsPresent:function(){var e=this,t=!0;return this.builtInIDs.forEach((function(n){!0!==t||e.menuItemList.some((function(e){return e.id===n}))||(t=!1)})),t}},methods:{addStarterCards:function(){var e=this,t=0,n=this.menuItemList.map((function(e){return _h({},e)}));this.builtInButtons.forEach((function(o){!e.menuItemList.some((function(e){return e.id===o.id}))&&(n.unshift(_h({},o)),t+=1)})),t>0&&this.postHomeMenuSettings(n,this.menuDirection)},onDragStart:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=e&&e.dataTransfer&&(e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id))},onDrop:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=e&&e.dataTransfer&&"move"===e.dataTransfer.effectAllowed){var t=e.dataTransfer.getData("text"),n=e.currentTarget,o=Array.from(document.querySelectorAll("ul#menu > li")),r=document.getElementById(t),s=o.filter((function(e){return e.id!==t})).find((function(t){return window.scrollY+e.clientY<=t.offsetTop+t.offsetHeight/2}));n.insertBefore(r,s),this.updateMenuItemList()}},clickToMove:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];32===(null==e?void 0:e.keyCode)&&e.preventDefault();var o=e.currentTarget.closest("ul"),r=document.getElementById(t),s=Array.from(o.querySelectorAll("li")),i=s.indexOf(r),l=s.filter((function(e){return e!==r})),c=n?i-1:i+1;c>-1&&c0&&void 0!==arguments[0]?arguments[0]:{};console.log("direction updated via input");var n=(null==t||null===(e=t.target)||void 0===e?void 0:e.value)||"";""!==n&&n!==this.menuDirection&&this.postHomeMenuSettings(this.menuItemList,this.menuDirectionSelection)}},template:'
\n
\n

Drag-Drop cards or use the up and down buttons to change their order.  Use the card menu to edit text and other values.

\n
\n \n
\n \n \n \n
\n
'},CustomSearch:Eh},computed:{enabled:function(){var e;return 1===parseInt(null===(e=this.designData)||void 0===e?void 0:e.homepage_enabled)},menuItemList:function(){var e;if(this.appIsGettingData)e=null;else{var t,n=JSON.parse((null===(t=this.designData)||void 0===t?void 0:t.homepage_design_json)||"{}"),o=(null==n?void 0:n.menuCards)||[];o.map((function(e){e.link=XSSHelpers.decodeHTMLEntities(e.link),e.title=XSSHelpers.decodeHTMLEntities(e.title),e.subtitle=XSSHelpers.decodeHTMLEntities(e.subtitle)})),e=o.sort((function(e,t){return e.order-t.order}))}return e},menuDirection:function(){var e;if(this.appIsGettingData)e=null;else{var t,n=JSON.parse((null===(t=this.designData)||void 0===t?void 0:t.homepage_design_json)||"{}");e=(null==n?void 0:n.direction)||"v"}return e},chosenHeaders:function(){var e;if(this.appIsGettingData)e=null;else{var t,n=(null===(t=this.designData)||void 0===t?void 0:t.search_design_json)||"{}",o=JSON.parse(n);e=(null==o?void 0:o.chosenHeaders)||[]}return e}},methods:{openDesignButtonDialog:function(){this.setDialogTitleHTML("

Menu Editor

"),this.setDialogContent("design-card-dialog"),this.openDialog()},generateID:function(){var e="";do{for(var t=0;t<5;t++)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62*Math.random()))}while(this.buttonIDExists(e));return e},buttonIDExists:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.menuItemList.some((function(t){return(null==t?void 0:t.id)===e}))},setMenuItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.menuItem=null!==e?e:{id:this.generateID(),order:this.menuItemList.length,enabled:0},this.openDesignButtonDialog()},updateMenuItemList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.menuItemList.map((function(e){return function(e){for(var t=1;t li")).forEach((function(e){return o.push(e.id)})),n.forEach((function(e){var t=o.indexOf(e.id);t>-1&&(e.order=t)}))}else n=n.filter((function(t){return t.id!==e.id})),!0!==t&&n.push(e);this.postHomeMenuSettings(n,this.menuDirection)},postHomeMenuSettings:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.menuItemList,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.menuDirection;this.menuIsUpdating=!0,$.ajax({type:"POST",url:"".concat(this.APIroot,"site/settings/homepage_design_json"),data:{CSRFToken:this.CSRFToken,home_menu_list:t,menu_direction:n},success:function(o){if(1!=+(null==o?void 0:o.code))console.log("unexpected response returned:",o);else{var r=JSON.stringify({menuCards:t,direction:n});e.updateLocalDesignData("homepage",r)}e.menuIsUpdating=!1},error:function(e){return console.log(e)}})}},template:'
\n Loading... \n \n
\n
\n

\n {{ isEditingMode ? \'Editing the Homepage\' : \'Homepage Preview\'}}\n

\n

This page is {{ enabled ? \'\' : \'not\'}} enabled

\n \n
TODO banner section
\n
\n \n \n
\n \x3c!-- HOMEPAGE DIALOGS --\x3e\n \n \n \n
'}},{path:"/testview",name:"testview",component:{name:"testview",inject:["appIsGettingData","getDesignData","setCustom_page_select"],created:function(){console.log("testview created"),this.getDesignData(),this.setCustom_page_select("testview")},template:'
\n Loading... \n \n
\n

Test View

'}}],Rh=function(e){const t=function(e,t){const n=[],o=new Map;function r(e,n,o){const l=!o,c=Jf(e);c.aliasOf=o&&o.record;const a=Zf(t,e),u=[c];if("alias"in e){const t="string"==typeof e.alias?[e.alias]:e.alias;for(const e of t)u.push(Jf(Kp({},c,{components:o?o.record.components:c.components,path:e,aliasOf:o?o.record:c})))}let d,p;for(const t of u){const{path:u}=t;if(n&&"/"!==u[0]){const e=n.record.path,o="/"===e[e.length-1]?"":"/";t.path=n.record.path+(u&&o+u)}if(d=Kf(t,n,a),o?o.alias.push(d):(p=p||d,p!==d&&p.alias.push(d),l&&e.name&&!Yf(d)&&s(e.name)),eh(d)&&i(d),c.children){const e=c.children;for(let t=0;t{s(p)}:Jp}function s(e){if(Rf(e)){const t=o.get(e);t&&(o.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(s),t.alias.forEach(s))}else{const t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&o.delete(e.record.name),e.children.forEach(s),e.alias.forEach(s))}}function i(e){const t=function(e,t){let n=0,o=t.length;for(;n!==o;){const r=n+o>>1;Uf(e,t[r])<0?o=r:n=r+1}const r=function(e){let t=e;for(;t=t.parent;)if(eh(t)&&0===Uf(e,t))return t}(e);return r&&(o=t.lastIndexOf(r,o-1)),o}(e,n);n.splice(t,0,e),e.record.name&&!Yf(e)&&o.set(e.record.name,e)}return t=Zf({strict:!1,end:!0,sensitive:!1},t),e.forEach((e=>r(e))),{addRoute:r,resolve:function(e,t){let r,s,i,l={};if("name"in e&&e.name){if(r=o.get(e.name),!r)throw Ff(1,{location:e});i=r.record.name,l=Kp(zf(t.params,r.keys.filter((e=>!e.optional)).concat(r.parent?r.parent.keys.filter((e=>e.optional)):[]).map((e=>e.name))),e.params&&zf(e.params,r.keys.map((e=>e.name)))),s=r.stringify(l)}else if(null!=e.path)s=e.path,r=n.find((e=>e.re.test(s))),r&&(l=r.parse(s),i=r.record.name);else{if(r=t.name?o.get(t.name):n.find((e=>e.re.test(t.path))),!r)throw Ff(1,{location:e,currentLocation:t});i=r.record.name,l=Kp({},t.params,e.params),s=r.stringify(l)}const c=[];let a=r;for(;a;)c.unshift(a.record),a=a.parent;return{name:i,path:s,params:l,matched:c,meta:Qf(c)}},removeRoute:s,clearRoutes:function(){n.length=0,o.clear()},getRoutes:function(){return n},getRecordMatcher:function(e){return o.get(e)}}}(e.routes,e),n=e.parseQuery||th,o=e.stringifyQuery||nh,r=e.history,s=ah(),i=ah(),l=ah(),c=jt(Cf);let a=Cf;Wp&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=zp.bind(null,(e=>""+e)),d=zp.bind(null,hf),p=zp.bind(null,mf);function f(e,s){if(s=Kp({},s||c.value),"string"==typeof e){const o=vf(n,e,s.path),i=t.resolve({path:o.path},s),l=r.createHref(o.fullPath);return Kp(o,i,{params:p(i.params),hash:mf(o.hash),redirectedFrom:void 0,href:l})}let i;if(null!=e.path)i=Kp({},e,{path:vf(n,e.path,s.path).path});else{const t=Kp({},e.params);for(const e in t)null==t[e]&&delete t[e];i=Kp({},e,{params:d(t)}),s.params=d(s.params)}const l=t.resolve(i,s),a=e.hash||"";l.params=u(p(l.params));const f=function(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}(o,Kp({},e,{hash:(h=a,pf(h).replace(cf,"{").replace(uf,"}").replace(sf,"^")),path:l.path}));var h;const m=r.createHref(f);return Kp({fullPath:f,hash:a,query:o===nh?oh(e.query):e.query||{}},l,{redirectedFrom:void 0,href:m})}function h(e){return"string"==typeof e?vf(n,e,c.value.path):Kp({},e)}function m(e,t){if(a!==e)return Ff(8,{from:t,to:e})}function g(e){return y(e)}function v(e){const t=e.matched[e.matched.length-1];if(t&&t.redirect){const{redirect:n}=t;let o="function"==typeof n?n(e):n;return"string"==typeof o&&(o=o.includes("?")||o.includes("#")?o=h(o):{path:o},o.params={}),Kp({query:e.query,hash:e.hash,params:null!=o.path?{}:e.params},o)}}function y(e,t){const n=a=f(e),r=c.value,s=e.state,i=e.force,l=!0===e.replace,u=v(n);if(u)return y(Kp(h(u),{state:"object"==typeof u?Kp({},s,u.state):s,force:i,replace:l}),t||n);const d=n;let p;return d.redirectedFrom=t,!i&&function(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&bf(t.matched[o],n.matched[r])&&Sf(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}(o,r,n)&&(p=Ff(16,{to:d,from:r}),A(r,r,!0,!1)),(p?Promise.resolve(p):_(d,r)).catch((e=>Bf(e)?Bf(e,2)?e:D(e):E(e,d,r))).then((e=>{if(e){if(Bf(e,2))return y(Kp({replace:l},h(e.to),{state:"object"==typeof e.to?Kp({},s,e.to.state):s,force:i}),t||d)}else e=C(d,r,!0,l,s);return x(d,r,e),e}))}function b(e,t){const n=m(e,t);return n?Promise.reject(n):Promise.resolve()}function S(e){const t=P.values().next().value;return t&&"function"==typeof t.runWithContext?t.runWithContext(e):e()}function _(e,t){let n;const[o,r,l]=function(e,t){const n=[],o=[],r=[],s=Math.max(t.matched.length,e.matched.length);for(let i=0;ibf(e,s)))?o.push(s):n.push(s));const l=e.matched[i];l&&(t.matched.find((e=>bf(e,l)))||r.push(l))}return[n,o,r]}(e,t);n=dh(o.reverse(),"beforeRouteLeave",e,t);for(const r of o)r.leaveGuards.forEach((o=>{n.push(uh(o,e,t))}));const c=b.bind(null,e,t);return n.push(c),M(n).then((()=>{n=[];for(const o of s.list())n.push(uh(o,e,t));return n.push(c),M(n)})).then((()=>{n=dh(r,"beforeRouteUpdate",e,t);for(const o of r)o.updateGuards.forEach((o=>{n.push(uh(o,e,t))}));return n.push(c),M(n)})).then((()=>{n=[];for(const o of l)if(o.beforeEnter)if(Xp(o.beforeEnter))for(const r of o.beforeEnter)n.push(uh(r,e,t));else n.push(uh(o.beforeEnter,e,t));return n.push(c),M(n)})).then((()=>(e.matched.forEach((e=>e.enterCallbacks={})),n=dh(l,"beforeRouteEnter",e,t,S),n.push(c),M(n)))).then((()=>{n=[];for(const o of i.list())n.push(uh(o,e,t));return n.push(c),M(n)})).catch((e=>Bf(e,8)?e:Promise.reject(e)))}function x(e,t,n){l.list().forEach((o=>S((()=>o(e,t,n)))))}function C(e,t,n,o,s){const i=m(e,t);if(i)return i;const l=t===Cf,a=Wp?history.state:{};n&&(o||l?r.replace(e.fullPath,Kp({scroll:l&&a&&a.scroll},s)):r.push(e.fullPath,s)),c.value=e,A(e,t,n,l),D()}let w;let k,I=ah(),T=ah();function E(e,t,n){D(e);const o=T.list();return o.length?o.forEach((o=>o(e,t,n))):console.error(e),Promise.reject(e)}function D(e){return k||(k=!e,w||(w=r.listen(((e,t,n)=>{if(!R.listening)return;const o=f(e),s=v(o);if(s)return void y(Kp(s,{replace:!0}),o).catch(Jp);a=o;const i=c.value;var l,u;Wp&&(l=Df(i.fullPath,n.delta),u=Ef(),Af.set(l,u)),_(o,i).catch((e=>Bf(e,12)?e:Bf(e,2)?(y(e.to,o).then((e=>{Bf(e,20)&&!n.delta&&n.type===wf.pop&&r.go(-1,!1)})).catch(Jp),Promise.reject()):(n.delta&&r.go(-n.delta,!1),E(e,o,i)))).then((e=>{(e=e||C(o,i,!1))&&(n.delta&&!Bf(e,8)?r.go(-n.delta,!1):n.type===wf.pop&&Bf(e,20)&&r.go(-1,!1)),x(o,i,e)})).catch(Jp)}))),I.list().forEach((([t,n])=>e?n(e):t())),I.reset()),e}function A(t,n,o,r){const{scrollBehavior:s}=e;if(!Wp||!s)return Promise.resolve();const i=!o&&function(e){const t=Af.get(e);return Af.delete(e),t}(Df(t.fullPath,0))||(r||!o)&&history.state&&history.state.scroll||null;return Cn().then((()=>s(t,n,i))).then((e=>e&&function(e){let t;if("el"in e){const n=e.el,o="string"==typeof n&&n.startsWith("#"),r="string"==typeof n?o?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=function(e,t){const n=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-n.left-(t.left||0),top:o.top-n.top-(t.top||0)}}(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(null!=t.left?t.left:window.scrollX,null!=t.top?t.top:window.scrollY)}(e))).catch((e=>E(e,t,n)))}const N=e=>r.go(e);let O;const P=new Set,R={currentRoute:c,listening:!0,addRoute:function(e,n){let o,r;return Rf(e)?(o=t.getRecordMatcher(e),r=n):r=e,t.addRoute(r,o)},removeRoute:function(e){const n=t.getRecordMatcher(e);n&&t.removeRoute(n)},clearRoutes:t.clearRoutes,hasRoute:function(e){return!!t.getRecordMatcher(e)},getRoutes:function(){return t.getRoutes().map((e=>e.record))},resolve:f,options:e,push:g,replace:function(e){return g(Kp(h(e),{replace:!0}))},go:N,back:()=>N(-1),forward:()=>N(1),beforeEach:s.add,beforeResolve:i.add,afterEach:l.add,onError:T.add,isReady:function(){return k&&c.value!==Cf?Promise.resolve():new Promise(((e,t)=>{I.add([e,t])}))},install(e){e.component("RouterLink",fh),e.component("RouterView",vh),e.config.globalProperties.$router=this,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>Ut(c)}),Wp&&!O&&c.value===Cf&&(O=!0,g(r.location).catch((e=>{})));const t={};for(const e in Cf)Object.defineProperty(t,e,{get:()=>c.value[e],enumerable:!0});e.provide(ih,this),e.provide(lh,kt(t)),e.provide(ch,c);const n=e.unmount;P.add(e),e.unmount=function(){P.delete(e),P.size<1&&(a=Cf,w&&w(),w=null,c.value=Cf,O=!1,k=!1),n()}}};function M(e){return e.reduce(((e,t)=>e.then((()=>S(t)))),Promise.resolve())}return R}({history:((Oh=location.host?Oh||location.pathname+location.search:"").includes("#")||(Oh+="#"),function(e){const t=function(e){const{history:t,location:n}=window,o={value:Of(e,n)},r={value:t.state};function s(o,s,i){const l=e.indexOf("#"),c=l>-1?(n.host&&document.querySelector("base")?e:e.slice(l))+o:Nf()+e+o;try{t[i?"replaceState":"pushState"](s,"",c),r.value=s}catch(e){console.error(e),n[i?"replace":"assign"](c)}}return r.value||s(o.value,{back:null,current:o.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0),{location:o,state:r,push:function(e,n){const i=Kp({},r.value,t.state,{forward:e,scroll:Ef()});s(i.current,i,!0),s(e,Kp({},Pf(o.value,e,null),{position:i.position+1},n),!1),o.value=e},replace:function(e,n){s(e,Kp({},t.state,Pf(r.value.back,e,r.value.forward,!0),n,{position:r.value.position}),!0),o.value=e}}}(e=function(e){if(!e)if(Wp){const t=document.querySelector("base");e=(e=t&&t.getAttribute("href")||"/").replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return"/"!==e[0]&&"#"!==e[0]&&(e="/"+e),e.replace(gf,"")}(e)),n=function(e,t,n,o){let r=[],s=[],i=null;const l=({state:s})=>{const l=Of(e,location),c=n.value,a=t.value;let u=0;if(s){if(n.value=l,t.value=s,i&&i===c)return void(i=null);u=a?s.position-a.position:0}else o(l);r.forEach((e=>{e(n.value,c,{delta:u,type:wf.pop,direction:u?u>0?kf.forward:kf.back:kf.unknown})}))};function c(){const{history:e}=window;e.state&&e.replaceState(Kp({},e.state,{scroll:Ef()}),"")}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:function(){i=n.value},listen:function(e){r.push(e);const t=()=>{const t=r.indexOf(e);t>-1&&r.splice(t,1)};return s.push(t),t},destroy:function(){for(const e of s)e();s=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}}}(e,t.state,t.location,t.replace),o=Kp({location:"",base:e,go:function(e,t=!0){t||n.pauseListeners(),history.go(e)},createHref:Tf.bind(null,e)},t,n);return Object.defineProperty(o,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(o,"state",{enumerable:!0,get:()=>t.state.value}),o}(Oh)),routes:Ph});const Mh=Rh;var Lh=Jc(qp);Lh.use(Mh),Lh.mount("#site-designer-app")})(); \ No newline at end of file diff --git a/app/libs/js/vue-dest/site_designer/LEAF_Designer.js.LICENSE.txt b/app/libs/js/vue-dest/site_designer/LEAF_Designer.js.LICENSE.txt index 3fb0d1695..35fb4e81b 100644 --- a/app/libs/js/vue-dest/site_designer/LEAF_Designer.js.LICENSE.txt +++ b/app/libs/js/vue-dest/site_designer/LEAF_Designer.js.LICENSE.txt @@ -1,19 +1,19 @@ /*! #__NO_SIDE_EFFECTS__ */ /** -* @vue/runtime-core v3.5.9 +* @vue/runtime-core v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ /** -* @vue/runtime-dom v3.5.9 +* @vue/runtime-dom v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ /** -* @vue/shared v3.5.9 +* @vue/shared v3.5.12 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT **/ diff --git a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss index 52f5a891f..bf0a562ba 100644 --- a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss +++ b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss @@ -1,3 +1,4 @@ +@use 'sass:color'; @import '../common/LEAF_Vue_Dialog__Common.scss'; nav#top-menu-nav { @@ -465,7 +466,7 @@ table[class$="SelectorTable"] th { position: relative; padding: 1px 0; //top and bottom padding needed for drop area visibility &.entered-drop-zone, ul.entered-drop-zone { - background-color: rgba(0,0,25,0.15); + background-color: color.scale($lt_cyan, $lightness: -6%); } ul[id^="drop_area_parent_"] { position: relative; @@ -475,20 +476,20 @@ table[class$="SelectorTable"] th { display: flex; flex-direction: column; background-clip: content-box; - min-height: 8px; + min-height: 10px; } li { position: relative; - margin: 0.375rem 0; + margin: 0.5rem 0; &:first-child { - margin-top: 0.5rem; + margin-top: 0.675rem; } &:last-child { - margin-bottom: 0.5rem; + margin-bottom: 0.675rem; } button.drag_question_button { - cursor: move; + cursor: grab; position: absolute; padding: 0; border: 1px solid $BG_Pearl !important; @@ -500,7 +501,7 @@ table[class$="SelectorTable"] th { } .icon_move_container { @include flexcenter; - cursor: move; + cursor: grab; position: absolute; width: 1.5rem; left: 0; @@ -599,7 +600,7 @@ table[class$="SelectorTable"] th { transition: box-shadow 0.5s; } &:not(.form-header):not(.preview):hover { - box-shadow: 1px 1px 10px 5px rgba(0,0,20,0.4); + box-shadow: 1px 1px 8px 4px rgba(0,0,20,0.25); } } } @@ -611,7 +612,7 @@ table[class$="SelectorTable"] th { padding: 0.75rem; box-shadow: 1px 1px 2px 1px rgba(0,0,20,0.4); button { - border: 2px dashed darken($BG_Pearl, 15%); + border: 2px dashed color.scale($BG_Pearl, $lightness: -15%); width: 100%; height: 2rem; } @@ -619,7 +620,7 @@ table[class$="SelectorTable"] th { button.new_section_question { height: 2rem; width: 100%; - border: 2px dashed darken($BG_Pearl, 15%); + border: 2px dashed color.scale($BG_Pearl, $lightness: -15%); } /* wraps each form question. */ diff --git a/docker/vue-app/src/sass/leaf.scss b/docker/vue-app/src/sass/leaf.scss index a82271e46..7aa3ec458 100644 --- a/docker/vue-app/src/sass/leaf.scss +++ b/docker/vue-app/src/sass/leaf.scss @@ -1,3 +1,5 @@ +@use 'sass:color'; + $usa-gray: #dfe1e2; $site-title-top: 17%; $site-title-left: 62px; @@ -388,7 +390,7 @@ form.usa-form { .leaf-btn-green { background-color: $btn-green; &:hover, :focus, :active { - background-color: darken($btn-green, 3%); + background-color: color.scale($btn-green, $lightness: -10%); } } From 201362a81930644c86ea9fe4ec216151b3c90671 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Wed, 23 Oct 2024 16:22:45 -0400 Subject: [PATCH 03/37] LEAF 4435 adjust scroll behavior and disable btn logic --- .../vue-dest/form_editor/LEAF_FormEditor.css | 2 +- .../form_editor/form-editor-view.chunk.js | 2 +- .../src/form_editor/LEAF_FormEditor.scss | 18 +++++-- .../form_editor_view/FormIndexListing.js | 7 ++- .../form_editor_view/FormQuestionDisplay.js | 3 ++ .../src/form_editor/views/FormEditorView.js | 49 ++++++++++++------- 6 files changed, 58 insertions(+), 23 deletions(-) diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css index ccc7d841a..aa0ebee0f 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css @@ -1 +1 @@ -body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgb(202.78,225.4843478261,255)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li button.drag_question_button{cursor:grab;position:absolute;padding:0;border:1px solid #f2f2f6 !important;border-radius:4px 0 0 4px;width:1.5rem;height:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.6;font-size:20px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important;border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important;border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} +body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li button.drag_question_button{cursor:grab;position:absolute;padding:0;border:1px solid #f2f2f6 !important;border-radius:4px 0 0 4px;width:1.5rem;height:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.6;font-size:20px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index 3644d94bd..350154ead 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
\n
\n \n
{{nameCharsRemaining}}
\n
\n \n
\n \n
{{descrCharsRemaining}}
\n
\n \n
'}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
\n
\n Loading...\n \n
\n
\n
\n \n \n
\n
'},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
\n Move column left\n Move column right
\n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
\n \n \n
\n
\n \n \n \n \n
\n
'},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
\n Special access restrictions\n
\n This prevents anyone from reading stored data unless they\'re part of the following groups.
\n If a group is assigned below, everyone else will see "[protected data]".\n
\n \n
{{ statusMessageError }}
\n \n
\n \n \n
\n
'}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
    ","
  1. ","
    ","

    ","","

    ","

    ","

    ","

    ","","
    "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
    \n
    \n
    \n \n \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n \n \n
    \n
    \n

    Format Information

    \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n \n
    \n
    \n  Columns ({{gridJSON.length}}):\n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n Attributes\n
    \n \n \n
    \n \n
    \n
    \n \n
    \n \n
    \n \n This field will be archived.  It can be
    re-enabled by using Restore Fields.\n
    \n \n Deleted items can only be re-enabled
    within 30 days by using Restore Fields.\n
    \n
    \n
    '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
    \n
    Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
    {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
    {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
    \n
    \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

    \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n \n
    \n
    \n
    \n Notice:
    \n

    Please go to LEAF Programmer\n to ensure continued access to this area.

    \n
    '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
    \n
    \n

    Stapled forms will show up on the same page as the primary form.

    \n

    The order of the forms will be determined by the forms\' assigned sort values.

    \n
    \n
      \n
    • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
    • \n
    \n

    \n
    \n \n
    There are no available forms to merge
    \n
    \n
    '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
    \n

    What is this?

    \n

    With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

    \n
    \n

    To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

    \n
    \n

    The following groups can update {{formNameStripped()}} records at any time:

    \n
    \n
    \n \n \n

    \n
    \n \n
    There are no available groups to add
    \n
    \n
    '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
    \n
    Are you sure you want to delete this form?
    \n
    {{formName}}
    \n
    {{formDescription}}
    \n
    ⚠️ This form still has stapled forms attached
    \n
    '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
    \n \x3c!-- LOADING SPINNER --\x3e\n
    \n Loading... \n
    \n
    \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
    \n
    \n
    Choose Delete to remove this condition, or cancel to return to the editor
    \n
    {{ conditionOverviewText }}
    \n
    \n \n \n
    \n
    \n \n
    \n
    '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
    \n

    This is a Nationally Standardized Subordinate Site

    \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

'},k={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
\n \n \n\n \n\n \n\n \n\n \n\n \n \n
File Attachment(s)\n

Select File to attach:

\n \n
\n\n \n\n \n \n \n \n \n\n \n
'}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusIndicator","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
'.concat(this.formPage+1,"
"):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
\n
\n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n \n
\n \n \n \n
\n\n \x3c!-- TOOLBAR --\x3e\n
\n\n
\n \n \n \n \n
\n \n \n \n 🔒\n ⛓️\n ⚙️\n
\n
\n
\n \x3c!-- NAME --\x3e\n
\n
\n
\n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
'},_={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,parentID:Number},components:{FormQuestionDisplay:k},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
  • \n
    \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
      \n\n \n \n
    \n
    \n \n
    \n
    \n
  • '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
    \n {{formID}}\n (internal for {{formParentID}})\n \n
    \n \n \n \n \n \n
    \n
    \n
    \n \n
    \n \n
    This is an Internal Form
    \n
    \n
    '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n="";switch(!0){case o.startsWith("#click_to_move"):var i=o.split("_");null!=i&&i[3]&&null!=i&&i[4]&&(n="moved indicator ".concat(i[4]," ").concat(i[3]));break;case o.startsWith("#edit_indicator"):n="edited indicator";break;case o.startsWith("#programmer"):n="edited programmer";break;case o.startsWith("ul#"):n="created new question"}e.ariaStatusFormDisplay=n;var r=document.querySelector(o);null===r||e.showFormDialog||(r.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){try{fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){e.json().then((function(e){o(e[t])})).catch((function(e){return n(e)}))})).catch((function(e){return n(e)}))}catch(e){n(e)}}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},focusIndicator:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=e,this.ariaStatusFormDisplay="click to move options available"},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("".concat(t.target.id,"_button"));if(null!==n){var i=n.offsetWidth/2,r=n.offsetHeight/2;t.dataTransfer.setDragImage(n,i,r)}var a=(t.target.id||"").replace(this.dragLI_Prefix,"");this.focusIndicator(+a)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
    \n
    \n Loading... \n \n
    \n
    \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
    \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
    '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
    \n
    \n \n
    {{nameCharsRemaining}}
    \n
    \n \n
    \n \n
    {{descrCharsRemaining}}
    \n
    \n \n
    '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
    \n
    \n Loading...\n \n
    \n
    \n
    \n \n \n
    \n
    '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
    \n Move column left\n Move column right
    \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
    \n \n \n
    \n
    \n \n \n \n \n
    \n
    '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
    \n Special access restrictions\n
    \n This prevents anyone from reading stored data unless they\'re part of the following groups.
    \n If a group is assigned below, everyone else will see "[protected data]".\n
    \n \n
    {{ statusMessageError }}
    \n \n
    \n \n \n
    \n
    '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
      ","
    1. ","
      ","

      ","","

      ","

      ","

      ","

      ","","
      "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
      \n
      \n
      \n \n \n \n \n
      \n
      \n \n \n
      \n
      \n
      \n \n
      \n \n \n
      \n
      \n

      Format Information

      \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
      \n
      \n
      \n \n \n
      \n
      \n \n \n
      \n
      \n \n
      \n
      \n  Columns ({{gridJSON.length}}):\n
      \n
      \n \n \n
      \n
      \n
      \n \n
      \n
      \n \n
      \n
      \n
      \n Attributes\n
      \n \n \n
      \n \n
      \n
      \n \n
      \n \n
      \n \n This field will be archived.  It can be
      re-enabled by using Restore Fields.\n
      \n \n Deleted items can only be re-enabled
      within 30 days by using Restore Fields.\n
      \n
      \n
      '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
      \n
      Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
      {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
      {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
      \n
      \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

      \n
      \n \n \n
      \n
      \n
      \n \n \n
      \n \n
      \n
      \n
      \n Notice:
      \n

      Please go to LEAF Programmer\n to ensure continued access to this area.

      \n
      '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
      \n
      \n

      Stapled forms will show up on the same page as the primary form.

      \n

      The order of the forms will be determined by the forms\' assigned sort values.

      \n
      \n
        \n
      • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
      • \n
      \n

      \n
      \n \n
      There are no available forms to merge
      \n
      \n
      '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
      \n

      What is this?

      \n

      With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

      \n
      \n

      To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

      \n
      \n

      The following groups can update {{formNameStripped()}} records at any time:

      \n
      \n
      \n \n \n

      \n
      \n \n
      There are no available groups to add
      \n
      \n
      '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
      \n
      Are you sure you want to delete this form?
      \n
      {{formName}}
      \n
      {{formDescription}}
      \n
      ⚠️ This form still has stapled forms attached
      \n
      '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
      \n \x3c!-- LOADING SPINNER --\x3e\n
      \n Loading... \n
      \n
      \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
      \n
      \n
      Choose Delete to remove this condition, or cancel to return to the editor
      \n
      {{ conditionOverviewText }}
      \n
      \n \n \n
      \n
      \n \n
      \n
      '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
      \n

      This is a Nationally Standardized Subordinate Site

      \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

    '},k={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
    \n \n \n\n \n\n \n\n \n\n \n\n \n \n
    File Attachment(s)\n

    Select File to attach:

    \n \n
    \n\n \n\n \n \n \n \n \n\n \n
    '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusIndicator","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
    '.concat(this.formPage+1,"
    "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
    \n
    \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n \n
    \n \n \n \n
    \n\n \x3c!-- TOOLBAR --\x3e\n
    \n\n
    \n \n \n \n \n
    \n \n \n \n 🔒\n ⛓️\n ⚙️\n
    \n
    \n
    \n \x3c!-- NAME --\x3e\n
    \n
    \n
    \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
    '},_={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:k},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","scrollForDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
  • \n
    \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
      \n\n \n \n
    \n
    \n \n
    \n
    \n
  • '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
    \n {{formID}}\n (internal for {{formParentID}})\n \n
    \n \n \n \n \n \n
    \n
    \n
    \n \n
    \n \n
    This is an Internal Form
    \n
    \n
    '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},focusIndicator:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=e,this.ariaStatusFormDisplay="click to move options available"},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("".concat(t.target.id,"_button"));if(null!==n){var i=n.offsetWidth/2,r=n.offsetHeight/2;t.dataTransfer.setDragImage(n,i,r)}var a=(t.target.id||"").replace(this.dragLI_Prefix,"");this.focusIndicator(+a)}},scrollForDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=+(null==e?void 0:e.clientY);if(t<75||t>window.innerHeight-75){var o=window.scrollX,n=window.scrollY,i=t<75?-5:5;window.scrollTo(o,n+i)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
    \n
    \n Loading... \n \n
    \n
    \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
    \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
    '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss index bf0a562ba..019a441a1 100644 --- a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss +++ b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss @@ -466,7 +466,7 @@ table[class$="SelectorTable"] th { position: relative; padding: 1px 0; //top and bottom padding needed for drop area visibility &.entered-drop-zone, ul.entered-drop-zone { - background-color: color.scale($lt_cyan, $lightness: -6%); + background-color: rgba(0,0,25,0.22); } ul[id^="drop_area_parent_"] { position: relative; @@ -522,18 +522,30 @@ table[class$="SelectorTable"] th { &.up { border-bottom: 18px solid $BG-DarkNavy; border-top: 2px; + &:disabled { + cursor: auto; + border-bottom: 18px solid gray; + } &:hover, &:focus, &:active { outline: none !important; - border-bottom: 18px solid $USWDS_Cyan; + &:not(:disabled) { + border-bottom: 18px solid $USWDS_Cyan; + } } } &.down { margin-top: 0.625rem; border-top: 18px solid $BG-DarkNavy; border-bottom: 2px; + &:disabled { + cursor: auto; + border-top: 18px solid gray; + } &:hover, &:focus, &:active { outline: none !important; - border-top: 18px solid $USWDS_Cyan; + &:not(:disabled) { + border-top: 18px solid $USWDS_Cyan; + } } } } diff --git a/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js b/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js index b968c01c7..d1fde00ae 100644 --- a/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js +++ b/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js @@ -9,6 +9,7 @@ export default { indicatorID: Number, formNode: Object, index: Number, + currentListLength: Number, parentID: Number }, components: { @@ -20,6 +21,7 @@ export default { 'addToListTracker', 'previewMode', 'startDrag', + 'scrollForDrag', 'onDragEnter', 'onDragLeave', 'onDrop', @@ -56,6 +58,7 @@ export default { :depth="depth" :formPage="formPage" :index="index" + :currentListLength="currentListLength" :formNode="formNode"> @@ -77,9 +80,11 @@ export default { :indicatorID="listItem.indicatorID" :formNode="listItem" :index="idx" + :currentListLength="formNode.child.length" :key="'index_list_item_' + listItem.indicatorID" :draggable="!previewMode" - @dragstart.stop="startDrag"> + @dragstart.stop="startDrag" + @drag.stop="scrollForDrag">
    diff --git a/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js b/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js index 1ec8b3b4f..d72ccfbf7 100644 --- a/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js +++ b/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js @@ -7,6 +7,7 @@ export default { depth: Number, formPage: Number, index: Number, + currentListLength: Number, formNode: Object }, components: { @@ -74,11 +75,13 @@ export default {
    From 7b6fa16b34a66cd650803054260a9c3d8bbbdaf1 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Thu, 24 Oct 2024 13:33:11 -0400 Subject: [PATCH 04/37] LEAF 4435 button style and display logic --- .../js/vue-dest/form_editor/LEAF_FormEditor.css | 2 +- .../form_editor/form-editor-view.chunk.js | 2 +- .../vue-app/src/form_editor/LEAF_FormEditor.scss | 15 +++++++++++++-- .../form_editor_view/FormQuestionDisplay.js | 15 ++++++++++----- .../src/form_editor/views/FormEditorView.js | 3 +-- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css index aa0ebee0f..a6efe9849 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css @@ -1 +1 @@ -body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li button.drag_question_button{cursor:grab;position:absolute;padding:0;border:1px solid #f2f2f6 !important;border-radius:4px 0 0 4px;width:1.5rem;height:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.6;font-size:20px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} +body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle{cursor:grab;position:absolute;padding:0;border:1px solid #f2f2f6 !important;background-color:#f0f0f0;border-radius:4px 0 0 4px;width:1.5rem;height:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column;gap:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.4;font-size:16px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .focus_indicator_button{opacity:.6;padding:0;border:1px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{margin-top:4px;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index 350154ead..d5b1711c1 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
    \n
    \n \n
    {{nameCharsRemaining}}
    \n
    \n \n
    \n \n
    {{descrCharsRemaining}}
    \n
    \n \n
    '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
    \n
    \n Loading...\n \n
    \n
    \n
    \n \n \n
    \n
    '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
    \n Move column left\n Move column right
    \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
    \n \n \n
    \n
    \n \n \n \n \n
    \n
    '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
    \n Special access restrictions\n
    \n This prevents anyone from reading stored data unless they\'re part of the following groups.
    \n If a group is assigned below, everyone else will see "[protected data]".\n
    \n \n
    {{ statusMessageError }}
    \n \n
    \n \n \n
    \n
    '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
      ","
    1. ","
      ","

      ","","

      ","

      ","

      ","

      ","","
      "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
      \n
      \n
      \n \n \n \n \n
      \n
      \n \n \n
      \n
      \n
      \n \n
      \n \n \n
      \n
      \n

      Format Information

      \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
      \n
      \n
      \n \n \n
      \n
      \n \n \n
      \n
      \n \n
      \n
      \n  Columns ({{gridJSON.length}}):\n
      \n
      \n \n \n
      \n
      \n
      \n \n
      \n
      \n \n
      \n
      \n
      \n Attributes\n
      \n \n \n
      \n \n
      \n
      \n \n
      \n \n
      \n \n This field will be archived.  It can be
      re-enabled by using Restore Fields.\n
      \n \n Deleted items can only be re-enabled
      within 30 days by using Restore Fields.\n
      \n
      \n
      '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
      \n
      Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
      {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
      {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
      \n
      \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

      \n
      \n \n \n
      \n
      \n
      \n \n \n
      \n \n
      \n
      \n
      \n Notice:
      \n

      Please go to LEAF Programmer\n to ensure continued access to this area.

      \n
      '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
      \n
      \n

      Stapled forms will show up on the same page as the primary form.

      \n

      The order of the forms will be determined by the forms\' assigned sort values.

      \n
      \n
        \n
      • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
      • \n
      \n

      \n
      \n \n
      There are no available forms to merge
      \n
      \n
      '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
      \n

      What is this?

      \n

      With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

      \n
      \n

      To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

      \n
      \n

      The following groups can update {{formNameStripped()}} records at any time:

      \n
      \n
      \n \n \n

      \n
      \n \n
      There are no available groups to add
      \n
      \n
      '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
      \n
      Are you sure you want to delete this form?
      \n
      {{formName}}
      \n
      {{formDescription}}
      \n
      ⚠️ This form still has stapled forms attached
      \n
      '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
      \n \x3c!-- LOADING SPINNER --\x3e\n
      \n Loading... \n
      \n
      \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
      \n
      \n
      Choose Delete to remove this condition, or cancel to return to the editor
      \n
      {{ conditionOverviewText }}
      \n
      \n \n \n
      \n
      \n \n
      \n
      '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
      \n

      This is a Nationally Standardized Subordinate Site

      \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

    '},k={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
    \n \n \n\n \n\n \n\n \n\n \n\n \n \n
    File Attachment(s)\n

    Select File to attach:

    \n \n
    \n\n \n\n \n \n \n \n \n\n \n
    '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusIndicator","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
    '.concat(this.formPage+1,"
    "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
    \n
    \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n \n
    \n \n \n \n
    \n\n \x3c!-- TOOLBAR --\x3e\n
    \n\n
    \n \n \n \n \n
    \n \n \n \n 🔒\n ⛓️\n ⚙️\n
    \n
    \n
    \n \x3c!-- NAME --\x3e\n
    \n
    \n
    \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
    '},_={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:k},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","scrollForDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
  • \n
    \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
      \n\n \n \n
    \n
    \n \n
    \n
    \n
  • '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
    \n {{formID}}\n (internal for {{formParentID}})\n \n
    \n \n \n \n \n \n
    \n
    \n
    \n \n
    \n \n
    This is an Internal Form
    \n
    \n
    '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},focusIndicator:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=e,this.ariaStatusFormDisplay="click to move options available"},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("".concat(t.target.id,"_button"));if(null!==n){var i=n.offsetWidth/2,r=n.offsetHeight/2;t.dataTransfer.setDragImage(n,i,r)}var a=(t.target.id||"").replace(this.dragLI_Prefix,"");this.focusIndicator(+a)}},scrollForDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=+(null==e?void 0:e.clientY);if(t<75||t>window.innerHeight-75){var o=window.scrollX,n=window.scrollY,i=t<75?-5:5;window.scrollTo(o,n+i)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
    \n
    \n Loading... \n \n
    \n
    \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
    \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
    '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
    \n
    \n \n
    {{nameCharsRemaining}}
    \n
    \n \n
    \n \n
    {{descrCharsRemaining}}
    \n
    \n \n
    '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
    \n
    \n Loading...\n \n
    \n
    \n
    \n \n \n
    \n
    '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
    \n Move column left\n Move column right
    \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
    \n \n \n
    \n
    \n \n \n \n \n
    \n
    '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
    \n Special access restrictions\n
    \n This prevents anyone from reading stored data unless they\'re part of the following groups.
    \n If a group is assigned below, everyone else will see "[protected data]".\n
    \n \n
    {{ statusMessageError }}
    \n \n
    \n \n \n
    \n
    '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
      ","
    1. ","
      ","

      ","","

      ","

      ","

      ","

      ","","
      "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
      \n
      \n
      \n \n \n \n \n
      \n
      \n \n \n
      \n
      \n
      \n \n
      \n \n \n
      \n
      \n

      Format Information

      \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
      \n
      \n
      \n \n \n
      \n
      \n \n \n
      \n
      \n \n
      \n
      \n  Columns ({{gridJSON.length}}):\n
      \n
      \n \n \n
      \n
      \n
      \n \n
      \n
      \n \n
      \n
      \n
      \n Attributes\n
      \n \n \n
      \n \n
      \n
      \n \n
      \n \n
      \n \n This field will be archived.  It can be
      re-enabled by using Restore Fields.\n
      \n \n Deleted items can only be re-enabled
      within 30 days by using Restore Fields.\n
      \n
      \n
      '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
      \n
      Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
      {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
      {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
      {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
      \n
      \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

      \n
      \n \n \n
      \n
      \n
      \n \n \n
      \n \n
      \n
      \n
      \n Notice:
      \n

      Please go to LEAF Programmer\n to ensure continued access to this area.

      \n
      '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
      \n
      \n

      Stapled forms will show up on the same page as the primary form.

      \n

      The order of the forms will be determined by the forms\' assigned sort values.

      \n
      \n
        \n
      • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
      • \n
      \n

      \n
      \n \n
      There are no available forms to merge
      \n
      \n
      '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
      \n

      What is this?

      \n

      With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

      \n
      \n

      To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

      \n
      \n

      The following groups can update {{formNameStripped()}} records at any time:

      \n
      \n
      \n \n \n

      \n
      \n \n
      There are no available groups to add
      \n
      \n
      '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
      \n
      Are you sure you want to delete this form?
      \n
      {{formName}}
      \n
      {{formDescription}}
      \n
      ⚠️ This form still has stapled forms attached
      \n
      '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
      \n \x3c!-- LOADING SPINNER --\x3e\n
      \n Loading... \n
      \n
      \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
      \n
      \n
      Choose Delete to remove this condition, or cancel to return to the editor
      \n
      {{ conditionOverviewText }}
      \n
      \n \n \n
      \n
      \n \n
      \n
      '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
      \n

      This is a Nationally Standardized Subordinate Site

      \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
      '},k={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
      \n \n \n\n \n\n \n\n \n\n \n\n \n \n
      File Attachment(s)\n

      Select File to attach:

      \n \n
      \n\n \n\n \n \n \n \n \n\n \n
      '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusIndicator","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
      '.concat(this.formPage+1,"
      "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
      \n
      \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n
      \n
      \n
      \n \n \n \n \n
      \n\n \x3c!-- TOOLBAR --\x3e\n
      \n\n
      \n \n \n \n \n
      \n \n \n \n 🔒\n ⛓️\n ⚙️\n
      \n
      \n
      \n \x3c!-- NAME --\x3e\n
      \n
      \n
      \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
      '},_={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:k},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","scrollForDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
    2. \n
      \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
        \n\n \n \n
      \n
      \n \n
      \n
      \n
    3. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
      \n {{formID}}\n (internal for {{formParentID}})\n \n
      \n \n \n \n \n \n
      \n
      \n
      \n \n
      \n \n
      This is an Internal Form
      \n
      \n
      '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},focusIndicator:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=e,this.ariaStatusFormDisplay="click to move options available"},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("".concat(t.target.id,"_button"));if(null!==n){var i=n.offsetWidth/2,r=n.offsetHeight/2;t.dataTransfer.setDragImage(n,i,r)}(t.target.id||"").replace(this.dragLI_Prefix,"")}},scrollForDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=+(null==e?void 0:e.clientY);if(t<75||t>window.innerHeight-75){var o=window.scrollX,n=window.scrollY,i=t<75?-5:5;window.scrollTo(o,n+i)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
      \n
      \n Loading... \n \n
      \n
      \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
      \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
      '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss index 019a441a1..08c4954c4 100644 --- a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss +++ b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss @@ -488,16 +488,20 @@ table[class$="SelectorTable"] th { margin-bottom: 0.675rem; } - button.drag_question_button { + div.drag_question_handle { cursor: grab; position: absolute; padding: 0; border: 1px solid $BG_Pearl !important; + background-color: #f0f0f0; border-radius: 4px 0 0 4px; width: 1.5rem; height: 100%; left: 0; top: 0; + &:hover, &:active { + outline: 2px solid #20a0f0; + } } .icon_move_container { @include flexcenter; @@ -507,9 +511,15 @@ table[class$="SelectorTable"] th { left: 0; top: 0; flex-direction: column; + gap: 2px; .icon_drag { + opacity: 0.4; + font-size: 16px; + } + .focus_indicator_button { opacity: 0.6; - font-size: 20px; + padding: 0; + border: 1px solid transparent; } .icon_move { @include flexcenter; @@ -520,6 +530,7 @@ table[class$="SelectorTable"] th { background-color: transparent; border: 9px solid transparent; &.up { + margin-top: 4px; border-bottom: 18px solid $BG-DarkNavy; border-top: 2px; &:disabled { diff --git a/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js b/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js index d72ccfbf7..0f9f8baa8 100644 --- a/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js +++ b/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js @@ -62,18 +62,23 @@ export default { }, sensitive() { return parseInt(this.formNode.is_sensitive) === 1; + }, + hasClickToMoveOptions() { + return this.currentListLength > 1; } }, template:`
      - +
      +
      + \n
      \n
      \n \n
      \n
      \n \n \n
      \n
      \n
      \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
      \n
      \n \n
      {{nameCharsRemaining}}
      \n
      \n \n
      \n \n
      {{descrCharsRemaining}}
      \n
      \n \n
      '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
      \n
      \n Loading...\n \n
      \n
      \n
      \n \n \n
      \n
      '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
      \n Move column left\n Move column right
      \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
      \n \n \n
      \n
      \n \n \n \n \n
      \n
      '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
      \n Special access restrictions\n
      \n This prevents anyone from reading stored data unless they\'re part of the following groups.
      \n If a group is assigned below, everyone else will see "[protected data]".\n
      \n \n
      {{ statusMessageError }}
      \n \n
      \n \n \n
      \n
      '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
        ","
      1. ","
        ","

        ","","

        ","

        ","

        ","

        ","","
        "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
        \n
        \n
        \n \n \n \n \n
        \n
        \n \n \n
        \n
        \n
        \n \n
        \n \n \n
        \n
        \n

        Format Information

        \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
        \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n \n
        \n
        \n  Columns ({{gridJSON.length}}):\n
        \n
        \n \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n
        \n Attributes\n
        \n \n \n
        \n \n
        \n
        \n \n
        \n \n
        \n \n This field will be archived.  It can be
        re-enabled by using Restore Fields.\n
        \n \n Deleted items can only be re-enabled
        within 30 days by using Restore Fields.\n
        \n
        \n
        '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
        \n
        Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
        {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
        {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
        {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
        \n
        \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

        \n
        \n \n \n
        \n
        \n
        \n \n \n
        \n \n
        \n
        \n
        \n Notice:
        \n

        Please go to LEAF Programmer\n to ensure continued access to this area.

        \n
        '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
        \n
        \n

        Stapled forms will show up on the same page as the primary form.

        \n

        The order of the forms will be determined by the forms\' assigned sort values.

        \n
        \n
          \n
        • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
        • \n
        \n

        \n
        \n \n
        There are no available forms to merge
        \n
        \n
        '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
        \n

        What is this?

        \n

        With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

        \n
        \n

        To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

        \n
        \n

        The following groups can update {{formNameStripped()}} records at any time:

        \n
        \n
        \n \n \n

        \n
        \n \n
        There are no available groups to add
        \n
        \n
        '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
        \n
        Are you sure you want to delete this form?
        \n
        {{formName}}
        \n
        {{formDescription}}
        \n
        ⚠️ This form still has stapled forms attached
        \n
        '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
        \n \x3c!-- LOADING SPINNER --\x3e\n
        \n Loading... \n
        \n
        \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
        \n
        \n
        Choose Delete to remove this condition, or cancel to return to the editor
        \n
        {{ conditionOverviewText }}
        \n
        \n \n \n
        \n
        \n \n
        \n
        '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
        \n

        This is a Nationally Standardized Subordinate Site

        \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

      '},k={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
      \n \n \n\n \n\n \n\n \n\n \n\n \n \n
      File Attachment(s)\n

      Select File to attach:

      \n \n
      \n\n \n\n \n \n \n \n \n\n \n
      '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusIndicator","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
      '.concat(this.formPage+1,"
      "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
      \n
      \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n
      \n
      \n
      \n \n \n \n \n
      \n\n \x3c!-- TOOLBAR --\x3e\n
      \n\n
      \n \n \n \n \n
      \n \n \n \n 🔒\n ⛓️\n ⚙️\n
      \n
      \n
      \n \x3c!-- NAME --\x3e\n
      \n
      \n
      \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
      '},_={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:k},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","scrollForDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
    4. \n
      \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
        \n\n \n \n
      \n
      \n \n
      \n
      \n
    5. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
      \n {{formID}}\n (internal for {{formParentID}})\n \n
      \n \n \n \n \n \n
      \n
      \n
      \n \n
      \n \n
      This is an Internal Form
      \n
      \n
      '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},focusIndicator:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=e,this.ariaStatusFormDisplay="click to move options available"},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("".concat(t.target.id,"_button"));if(null!==n){var i=n.offsetWidth/2,r=n.offsetHeight/2;t.dataTransfer.setDragImage(n,i,r)}(t.target.id||"").replace(this.dragLI_Prefix,"")}},scrollForDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=+(null==e?void 0:e.clientY);if(t<75||t>window.innerHeight-75){var o=window.scrollX,n=window.scrollY,i=t<75?-5:5;window.scrollTo(o,n+i)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
      \n
      \n Loading... \n \n
      \n
      \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
      \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
      '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
      \n
      \n \n
      {{nameCharsRemaining}}
      \n
      \n \n
      \n \n
      {{descrCharsRemaining}}
      \n
      \n \n
      '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
      \n
      \n Loading...\n \n
      \n
      \n
      \n \n \n
      \n
      '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
      \n Move column left\n Move column right
      \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
      \n \n \n
      \n
      \n \n \n \n \n
      \n
      '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
      \n Special access restrictions\n
      \n This prevents anyone from reading stored data unless they\'re part of the following groups.
      \n If a group is assigned below, everyone else will see "[protected data]".\n
      \n \n
      {{ statusMessageError }}
      \n \n
      \n \n \n
      \n
      '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
        ","
      1. ","
        ","

        ","","

        ","

        ","

        ","

        ","","
        "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
        \n
        \n
        \n \n \n \n \n
        \n
        \n \n \n
        \n
        \n
        \n \n
        \n \n \n
        \n
        \n

        Format Information

        \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
        \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n \n
        \n
        \n  Columns ({{gridJSON.length}}):\n
        \n
        \n \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n
        \n Attributes\n
        \n \n \n
        \n \n
        \n
        \n \n
        \n \n
        \n \n This field will be archived.  It can be
        re-enabled by using Restore Fields.\n
        \n \n Deleted items can only be re-enabled
        within 30 days by using Restore Fields.\n
        \n
        \n
        '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
        \n
        Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
        {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
        {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
        {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
        \n
        \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

        \n
        \n \n \n
        \n
        \n
        \n \n \n
        \n \n
        \n
        \n
        \n Notice:
        \n

        Please go to LEAF Programmer\n to ensure continued access to this area.

        \n
        '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
        \n
        \n

        Stapled forms will show up on the same page as the primary form.

        \n

        The order of the forms will be determined by the forms\' assigned sort values.

        \n
        \n
          \n
        • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
        • \n
        \n

        \n
        \n \n
        There are no available forms to merge
        \n
        \n
        '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
        \n

        What is this?

        \n

        With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

        \n
        \n

        To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

        \n
        \n

        The following groups can update {{formNameStripped()}} records at any time:

        \n
        \n
        \n \n \n

        \n
        \n \n
        There are no available groups to add
        \n
        \n
        '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
        \n
        Are you sure you want to delete this form?
        \n
        {{formName}}
        \n
        {{formDescription}}
        \n
        ⚠️ This form still has stapled forms attached
        \n
        '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
        \n \x3c!-- LOADING SPINNER --\x3e\n
        \n Loading... \n
        \n
        \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
        \n
        \n
        Choose Delete to remove this condition, or cancel to return to the editor
        \n
        {{ conditionOverviewText }}
        \n
        \n \n \n
        \n
        \n \n
        \n
        '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
        \n

        This is a Nationally Standardized Subordinate Site

        \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

      '},_={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
      \n \n \n\n \n\n \n\n \n\n \n\n \n \n
      File Attachment(s)\n

      Select File to attach:

      \n \n
      \n\n \n\n \n \n \n \n \n\n \n
      '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","toggleIndicatorFocus","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
      '.concat(this.formPage+1,"
      "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
      \n
      \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n
      \n
      \n
      \n \n \n
      \n \n \n
      \n
      \n\n \x3c!-- TOOLBAR --\x3e\n
      \n\n
      \n \n \n \n \n
      \n \n \n \n 🔒\n ⛓️\n ⚙️\n
      \n
      \n
      \n \x3c!-- NAME --\x3e\n
      \n
      \n
      \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
      '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:_},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","scrollForDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
    6. \n
      \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
        \n\n \n \n
      \n
      \n \n
      \n
      \n
    7. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
      \n {{formID}}\n (internal for {{formParentID}})\n \n
      \n \n \n \n \n \n
      \n
      \n
      \n \n
      \n \n
      This is an Internal Form
      \n
      \n
      '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=null===this.focusedIndicatorID?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("".concat(t.target.id,"_button"));null!==n&&t.dataTransfer.setDragImage(n,-4,-4)}},scrollForDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=+(null==e?void 0:e.clientY);if(t<75||t>window.innerHeight-75){var o=window.scrollX,n=window.scrollY,i=t<75?-5:5;window.scrollTo(o,n+i)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
      \n
      \n Loading... \n \n
      \n
      \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
      \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
      '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js b/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js index 0f9f8baa8..e0b8d01d7 100644 --- a/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js +++ b/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js @@ -18,7 +18,7 @@ export default { 'newQuestion', 'shortIndicatorNameStripped', 'focusedFormID', - 'focusIndicator', + 'toggleIndicatorFocus', 'focusedIndicatorID', 'editQuestion', 'hasDevConsoleAccess', @@ -71,26 +71,32 @@ export default {
      - + - - + aria-label="Click to move options" class="focus_indicator_button" + :aria-controls="'click_to_move_options_' + indicatorID" + :aria-expanded="indicatorID === focusedIndicatorID" + title="Click to move options" + @click="toggleIndicatorFocus(indicatorID)">↕ +
      + + +
      diff --git a/docker/vue-app/src/form_editor/views/FormEditorView.js b/docker/vue-app/src/form_editor/views/FormEditorView.js index a9b8c810d..c282f4954 100644 --- a/docker/vue-app/src/form_editor/views/FormEditorView.js +++ b/docker/vue-app/src/form_editor/views/FormEditorView.js @@ -109,7 +109,7 @@ export default { editQuestion: this.editQuestion, clearListItem: this.clearListItem, addToListTracker: this.addToListTracker, - focusIndicator: this.focusIndicator, + toggleIndicatorFocus: this.toggleIndicatorFocus, startDrag: this.startDrag, scrollForDrag: this.scrollForDrag, onDragEnter: this.onDragEnter, @@ -538,9 +538,8 @@ export default { /** * @param {Number|null} nodeID indicatorID of the form section selected in the Form Index */ - focusIndicator(nodeID = null) { - this.focusedIndicatorID = nodeID; - this.ariaStatusFormDisplay = 'click to move options available'; + toggleIndicatorFocus(nodeID = null) { + this.focusedIndicatorID = this.focusedIndicatorID === null ? nodeID : null; }, /** * switch between edit and preview mode @@ -681,11 +680,8 @@ export default { event.dataTransfer.setData('text/plain', event.target.id); const btn = document.getElementById(`${event.target.id}_button`); if(btn !== null) { - const x = btn.offsetWidth/2; - const y = btn.offsetHeight/2; - event.dataTransfer.setDragImage(btn, x, y); + event.dataTransfer.setDragImage(btn, -4, -4); } - const indID = (event.target.id || '').replace(this.dragLI_Prefix, ''); } } }, From 896d46f3a84853f026e4aceef8c8cad37654b9c0 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Mon, 28 Oct 2024 18:23:26 -0400 Subject: [PATCH 06/37] LEAF 4435 toggle fix - stash guide test --- app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js | 2 +- docker/vue-app/src/form_editor/views/FormEditorView.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index 436ed395f..df8ab2df7 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
      \n
      \n \n
      {{nameCharsRemaining}}
      \n
      \n \n
      \n \n
      {{descrCharsRemaining}}
      \n
      \n \n
      '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
      \n
      \n Loading...\n \n
      \n
      \n
      \n \n \n
      \n
      '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
      \n Move column left\n Move column right
      \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
      \n \n \n
      \n
      \n \n \n \n \n
      \n
      '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
      \n Special access restrictions\n
      \n This prevents anyone from reading stored data unless they\'re part of the following groups.
      \n If a group is assigned below, everyone else will see "[protected data]".\n
      \n \n
      {{ statusMessageError }}
      \n \n
      \n \n \n
      \n
      '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
        ","
      1. ","
        ","

        ","","

        ","

        ","

        ","

        ","","
        "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
        \n
        \n
        \n \n \n \n \n
        \n
        \n \n \n
        \n
        \n
        \n \n
        \n \n \n
        \n
        \n

        Format Information

        \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
        \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n \n
        \n
        \n  Columns ({{gridJSON.length}}):\n
        \n
        \n \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n
        \n Attributes\n
        \n \n \n
        \n \n
        \n
        \n \n
        \n \n
        \n \n This field will be archived.  It can be
        re-enabled by using Restore Fields.\n
        \n \n Deleted items can only be re-enabled
        within 30 days by using Restore Fields.\n
        \n
        \n
        '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
        \n
        Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
        {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
        {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
        {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
        \n
        \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

        \n
        \n \n \n
        \n
        \n
        \n \n \n
        \n \n
        \n
        \n
        \n Notice:
        \n

        Please go to LEAF Programmer\n to ensure continued access to this area.

        \n
        '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
        \n
        \n

        Stapled forms will show up on the same page as the primary form.

        \n

        The order of the forms will be determined by the forms\' assigned sort values.

        \n
        \n
          \n
        • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
        • \n
        \n

        \n
        \n \n
        There are no available forms to merge
        \n
        \n
        '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
        \n

        What is this?

        \n

        With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

        \n
        \n

        To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

        \n
        \n

        The following groups can update {{formNameStripped()}} records at any time:

        \n
        \n
        \n \n \n

        \n
        \n \n
        There are no available groups to add
        \n
        \n
        '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
        \n
        Are you sure you want to delete this form?
        \n
        {{formName}}
        \n
        {{formDescription}}
        \n
        ⚠️ This form still has stapled forms attached
        \n
        '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
        \n \x3c!-- LOADING SPINNER --\x3e\n
        \n Loading... \n
        \n
        \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
        \n
        \n
        Choose Delete to remove this condition, or cancel to return to the editor
        \n
        {{ conditionOverviewText }}
        \n
        \n \n \n
        \n
        \n \n
        \n
        '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
        \n

        This is a Nationally Standardized Subordinate Site

        \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

      '},_={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
      \n \n \n\n \n\n \n\n \n\n \n\n \n \n
      File Attachment(s)\n

      Select File to attach:

      \n \n
      \n\n \n\n \n \n \n \n \n\n \n
      '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","toggleIndicatorFocus","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
      '.concat(this.formPage+1,"
      "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
      \n
      \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n
      \n
      \n
      \n \n \n
      \n \n \n
      \n
      \n\n \x3c!-- TOOLBAR --\x3e\n
      \n\n
      \n \n \n \n \n
      \n \n \n \n 🔒\n ⛓️\n ⚙️\n
      \n
      \n
      \n \x3c!-- NAME --\x3e\n
      \n
      \n
      \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
      '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:_},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","scrollForDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
    8. \n
      \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
        \n\n \n \n
      \n
      \n \n
      \n
      \n
    9. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
      \n {{formID}}\n (internal for {{formParentID}})\n \n
      \n \n \n \n \n \n
      \n
      \n
      \n \n
      \n \n
      This is an Internal Form
      \n
      \n
      '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=null===this.focusedIndicatorID?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("".concat(t.target.id,"_button"));null!==n&&t.dataTransfer.setDragImage(n,-4,-4)}},scrollForDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=+(null==e?void 0:e.clientY);if(t<75||t>window.innerHeight-75){var o=window.scrollX,n=window.scrollY,i=t<75?-5:5;window.scrollTo(o,n+i)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
      \n
      \n Loading... \n \n
      \n
      \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
      \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
      '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
      \n
      \n \n
      {{nameCharsRemaining}}
      \n
      \n \n
      \n \n
      {{descrCharsRemaining}}
      \n
      \n \n
      '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
      \n
      \n Loading...\n \n
      \n
      \n
      \n \n \n
      \n
      '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
      \n Move column left\n Move column right
      \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
      \n \n \n
      \n
      \n \n \n \n \n
      \n
      '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
      \n Special access restrictions\n
      \n This prevents anyone from reading stored data unless they\'re part of the following groups.
      \n If a group is assigned below, everyone else will see "[protected data]".\n
      \n \n
      {{ statusMessageError }}
      \n \n
      \n \n \n
      \n
      '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
        ","
      1. ","
        ","

        ","","

        ","

        ","

        ","

        ","","
        "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
        \n
        \n
        \n \n \n \n \n
        \n
        \n \n \n
        \n
        \n
        \n \n
        \n \n \n
        \n
        \n

        Format Information

        \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
        \n
        \n
        \n \n \n
        \n
        \n \n \n
        \n
        \n \n
        \n
        \n  Columns ({{gridJSON.length}}):\n
        \n
        \n \n \n
        \n
        \n
        \n \n
        \n
        \n \n
        \n
        \n
        \n Attributes\n
        \n \n \n
        \n \n
        \n
        \n \n
        \n \n
        \n \n This field will be archived.  It can be
        re-enabled by using Restore Fields.\n
        \n \n Deleted items can only be re-enabled
        within 30 days by using Restore Fields.\n
        \n
        \n
        '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
        \n
        Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
        {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
        {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
        {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
        \n
        \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

        \n
        \n \n \n
        \n
        \n
        \n \n \n
        \n \n
        \n
        \n
        \n Notice:
        \n

        Please go to LEAF Programmer\n to ensure continued access to this area.

        \n
        '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
        \n
        \n

        Stapled forms will show up on the same page as the primary form.

        \n

        The order of the forms will be determined by the forms\' assigned sort values.

        \n
        \n
          \n
        • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
        • \n
        \n

        \n
        \n \n
        There are no available forms to merge
        \n
        \n
        '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
        \n

        What is this?

        \n

        With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

        \n
        \n

        To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

        \n
        \n

        The following groups can update {{formNameStripped()}} records at any time:

        \n
        \n
        \n \n \n

        \n
        \n \n
        There are no available groups to add
        \n
        \n
        '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
        \n
        Are you sure you want to delete this form?
        \n
        {{formName}}
        \n
        {{formDescription}}
        \n
        ⚠️ This form still has stapled forms attached
        \n
        '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
        \n \x3c!-- LOADING SPINNER --\x3e\n
        \n Loading... \n
        \n
        \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
        \n
        \n
        Choose Delete to remove this condition, or cancel to return to the editor
        \n
        {{ conditionOverviewText }}
        \n
        \n \n \n
        \n
        \n \n
        \n
        '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
        \n

        This is a Nationally Standardized Subordinate Site

        \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
        '},_={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
        \n \n \n\n \n\n \n\n \n\n \n\n \n \n
        File Attachment(s)\n

        Select File to attach:

        \n \n
        \n\n \n\n \n \n \n \n \n\n \n
        '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","toggleIndicatorFocus","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
        '.concat(this.formPage+1,"
        "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
        \n
        \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n
        \n
        \n
        \n \n \n
        \n \n \n
        \n
        \n\n \x3c!-- TOOLBAR --\x3e\n
        \n\n
        \n \n \n \n \n
        \n \n \n \n 🔒\n ⛓️\n ⚙️\n
        \n
        \n
        \n \x3c!-- NAME --\x3e\n
        \n
        \n
        \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
        '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:_},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","scrollForDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
      2. \n
        \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
          \n\n \n \n
        \n
        \n \n
        \n
        \n
      3. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
        \n {{formID}}\n (internal for {{formParentID}})\n \n
        \n \n \n \n \n \n
        \n
        \n
        \n \n
        \n \n
        This is an Internal Form
        \n
        \n
        '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=this.focusedIndicatorID!==e?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("".concat(t.target.id,"_button"));null!==n&&t.dataTransfer.setDragImage(n,-4,-4)}},scrollForDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=+(null==e?void 0:e.clientY);if(t<75||t>window.innerHeight-75){var o=window.scrollX,n=window.scrollY,i=t<75?-5:5;window.scrollTo(o,n+i)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
        \n
        \n Loading... \n \n
        \n
        \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
        \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
        '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/views/FormEditorView.js b/docker/vue-app/src/form_editor/views/FormEditorView.js index c282f4954..f13a24f2f 100644 --- a/docker/vue-app/src/form_editor/views/FormEditorView.js +++ b/docker/vue-app/src/form_editor/views/FormEditorView.js @@ -539,7 +539,7 @@ export default { * @param {Number|null} nodeID indicatorID of the form section selected in the Form Index */ toggleIndicatorFocus(nodeID = null) { - this.focusedIndicatorID = this.focusedIndicatorID === null ? nodeID : null; + this.focusedIndicatorID = this.focusedIndicatorID !== nodeID ? nodeID : null; }, /** * switch between edit and preview mode From f8962322ed782031b62f00d92682d2e1deabcac6 Mon Sep 17 00:00:00 2001 From: shane Date: Tue, 29 Oct 2024 15:57:31 -0500 Subject: [PATCH 07/37] LEAF-4577 - adjust the print style sheet to allow images within the request --- LEAF_Request_Portal/css/printer.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/LEAF_Request_Portal/css/printer.css b/LEAF_Request_Portal/css/printer.css index c2b639474..c9782de20 100644 --- a/LEAF_Request_Portal/css/printer.css +++ b/LEAF_Request_Portal/css/printer.css @@ -334,6 +334,11 @@ img { visibility: collapse; } +.printResponse img{ + display: initial; + visibility: initial; +} + div#tabcontainer_tablist { display: none; visibility: hidden; From 7161c7891e0a3a97cb2ca0e254712f8e5f7903c9 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Wed, 30 Oct 2024 08:28:37 -0400 Subject: [PATCH 08/37] LEAF 4435 update drag drop icon svg and minor style adjustments --- .../vue-dest/form_editor/LEAF_FormEditor.css | 2 +- .../form_editor/form-editor-view.chunk.js | 2 +- .../src/form_editor/LEAF_FormEditor.scss | 7 +++++-- .../src/form_editor/views/FormEditorView.js | 18 +++++++++++++++--- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css index a6efe9849..00944df69 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css @@ -1 +1 @@ -body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle{cursor:grab;position:absolute;padding:0;border:1px solid #f2f2f6 !important;background-color:#f0f0f0;border-radius:4px 0 0 4px;width:1.5rem;height:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column;gap:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.4;font-size:16px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .focus_indicator_button{opacity:.6;padding:0;border:1px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{margin-top:4px;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} +body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle{cursor:grab;position:absolute;padding:0;border:1px solid #f2f2f6 !important;background-color:#f0f0f0;border-radius:4px 0 0 4px;width:1.5rem;height:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column;gap:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.4;font-size:16px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .focus_indicator_button{opacity:.6;padding:2px;border:1px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{margin-top:4px;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index df8ab2df7..ff5787e3e 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
        \n
        \n \n
        {{nameCharsRemaining}}
        \n
        \n \n
        \n \n
        {{descrCharsRemaining}}
        \n
        \n \n
        '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
        \n
        \n Loading...\n \n
        \n
        \n
        \n \n \n
        \n
        '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
        \n Move column left\n Move column right
        \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
        \n \n \n
        \n
        \n \n \n \n \n
        \n
        '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
        \n Special access restrictions\n
        \n This prevents anyone from reading stored data unless they\'re part of the following groups.
        \n If a group is assigned below, everyone else will see "[protected data]".\n
        \n \n
        {{ statusMessageError }}
        \n \n
        \n \n \n
        \n
        '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
          ","
        1. ","
          ","

          ","","

          ","

          ","

          ","

          ","","
          "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
          \n
          \n
          \n \n \n \n \n
          \n
          \n \n \n
          \n
          \n
          \n \n
          \n \n \n
          \n
          \n

          Format Information

          \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
          \n
          \n
          \n \n \n
          \n
          \n \n \n
          \n
          \n \n
          \n
          \n  Columns ({{gridJSON.length}}):\n
          \n
          \n \n \n
          \n
          \n
          \n \n
          \n
          \n \n
          \n
          \n
          \n Attributes\n
          \n \n \n
          \n \n
          \n
          \n \n
          \n \n
          \n \n This field will be archived.  It can be
          re-enabled by using Restore Fields.\n
          \n \n Deleted items can only be re-enabled
          within 30 days by using Restore Fields.\n
          \n
          \n
          '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
          \n
          Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
          {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
          {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
          {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
          \n
          \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

          \n
          \n \n \n
          \n
          \n
          \n \n \n
          \n \n
          \n
          \n
          \n Notice:
          \n

          Please go to LEAF Programmer\n to ensure continued access to this area.

          \n
          '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
          \n
          \n

          Stapled forms will show up on the same page as the primary form.

          \n

          The order of the forms will be determined by the forms\' assigned sort values.

          \n
          \n
            \n
          • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
          • \n
          \n

          \n
          \n \n
          There are no available forms to merge
          \n
          \n
          '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
          \n

          What is this?

          \n

          With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

          \n
          \n

          To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

          \n
          \n

          The following groups can update {{formNameStripped()}} records at any time:

          \n
          \n
          \n \n \n

          \n
          \n \n
          There are no available groups to add
          \n
          \n
          '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
          \n
          Are you sure you want to delete this form?
          \n
          {{formName}}
          \n
          {{formDescription}}
          \n
          ⚠️ This form still has stapled forms attached
          \n
          '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
          \n \x3c!-- LOADING SPINNER --\x3e\n
          \n Loading... \n
          \n
          \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
          \n
          \n
          Choose Delete to remove this condition, or cancel to return to the editor
          \n
          {{ conditionOverviewText }}
          \n
          \n \n \n
          \n
          \n \n
          \n
          '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
          \n

          This is a Nationally Standardized Subordinate Site

          \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
          '},_={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
          \n \n \n\n \n\n \n\n \n\n \n\n \n \n
          File Attachment(s)\n

          Select File to attach:

          \n \n
          \n\n \n\n \n \n \n \n \n\n \n
          '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","toggleIndicatorFocus","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
          '.concat(this.formPage+1,"
          "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
          \n
          \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n
          \n
          \n
          \n \n \n
          \n \n \n
          \n
          \n\n \x3c!-- TOOLBAR --\x3e\n
          \n\n
          \n \n \n \n \n
          \n \n \n \n 🔒\n ⛓️\n ⚙️\n
          \n
          \n
          \n \x3c!-- NAME --\x3e\n
          \n
          \n
          \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
          '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:_},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","scrollForDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
        2. \n
          \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
            \n\n \n \n
          \n
          \n \n
          \n
          \n
        3. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
          \n {{formID}}\n (internal for {{formParentID}})\n \n
          \n \n \n \n \n \n
          \n
          \n
          \n \n
          \n \n
          This is an Internal Form
          \n
          \n
          '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=this.focusedIndicatorID!==e?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("".concat(t.target.id,"_button"));null!==n&&t.dataTransfer.setDragImage(n,-4,-4)}},scrollForDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=+(null==e?void 0:e.clientY);if(t<75||t>window.innerHeight-75){var o=window.scrollX,n=window.scrollY,i=t<75?-5:5;window.scrollTo(o,n+i)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
          \n
          \n Loading... \n \n
          \n
          \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
          \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
          '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
          \n
          \n \n
          {{nameCharsRemaining}}
          \n
          \n \n
          \n \n
          {{descrCharsRemaining}}
          \n
          \n \n
          '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
          \n
          \n Loading...\n \n
          \n
          \n
          \n \n \n
          \n
          '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
          \n Move column left\n Move column right
          \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
          \n \n \n
          \n
          \n \n \n \n \n
          \n
          '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
          \n Special access restrictions\n
          \n This prevents anyone from reading stored data unless they\'re part of the following groups.
          \n If a group is assigned below, everyone else will see "[protected data]".\n
          \n \n
          {{ statusMessageError }}
          \n \n
          \n \n \n
          \n
          '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
            ","
          1. ","
            ","

            ","","

            ","

            ","

            ","

            ","","
            "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
            \n
            \n
            \n \n \n \n \n
            \n
            \n \n \n
            \n
            \n
            \n \n
            \n \n \n
            \n
            \n

            Format Information

            \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
            \n
            \n
            \n \n \n
            \n
            \n \n \n
            \n
            \n \n
            \n
            \n  Columns ({{gridJSON.length}}):\n
            \n
            \n \n \n
            \n
            \n
            \n \n
            \n
            \n \n
            \n
            \n
            \n Attributes\n
            \n \n \n
            \n \n
            \n
            \n \n
            \n \n
            \n \n This field will be archived.  It can be
            re-enabled by using Restore Fields.\n
            \n \n Deleted items can only be re-enabled
            within 30 days by using Restore Fields.\n
            \n
            \n
            '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
            \n
            Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
            {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
            {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
            {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
            \n
            \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

            \n
            \n \n \n
            \n
            \n
            \n \n \n
            \n \n
            \n
            \n
            \n Notice:
            \n

            Please go to LEAF Programmer\n to ensure continued access to this area.

            \n
            '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
            \n
            \n

            Stapled forms will show up on the same page as the primary form.

            \n

            The order of the forms will be determined by the forms\' assigned sort values.

            \n
            \n
              \n
            • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
            • \n
            \n

            \n
            \n \n
            There are no available forms to merge
            \n
            \n
            '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
            \n

            What is this?

            \n

            With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

            \n
            \n

            To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

            \n
            \n

            The following groups can update {{formNameStripped()}} records at any time:

            \n
            \n
            \n \n \n

            \n
            \n \n
            There are no available groups to add
            \n
            \n
            '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
            \n
            Are you sure you want to delete this form?
            \n
            {{formName}}
            \n
            {{formDescription}}
            \n
            ⚠️ This form still has stapled forms attached
            \n
            '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
            \n \x3c!-- LOADING SPINNER --\x3e\n
            \n Loading... \n
            \n
            \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
            \n
            \n
            Choose Delete to remove this condition, or cancel to return to the editor
            \n
            {{ conditionOverviewText }}
            \n
            \n \n \n
            \n
            \n \n
            \n
            '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
            \n

            This is a Nationally Standardized Subordinate Site

            \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
            '},_={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
            \n \n \n\n \n\n \n\n \n\n \n\n \n \n
            File Attachment(s)\n

            Select File to attach:

            \n \n
            \n\n \n\n \n \n \n \n \n\n \n
            '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","toggleIndicatorFocus","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
            '.concat(this.formPage+1,"
            "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
            \n
            \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n
            \n
            \n
            \n \n \n
            \n \n \n
            \n
            \n\n \x3c!-- TOOLBAR --\x3e\n
            \n\n
            \n \n \n \n \n
            \n \n \n \n 🔒\n ⛓️\n ⚙️\n
            \n
            \n
            \n \x3c!-- NAME --\x3e\n
            \n
            \n
            \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
            '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:_},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","scrollForDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
          2. \n
            \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
              \n\n \n \n
            \n
            \n \n
            \n
            \n
          3. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
            \n {{formID}}\n (internal for {{formParentID}})\n \n
            \n \n \n \n \n \n
            \n
            \n
            \n \n
            \n \n
            This is an Internal Form
            \n
            \n
            '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=this.focusedIndicatorID!==e?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("drag_icon_svg");null!==n&&t.dataTransfer.setDragImage(n,0,0)}},scrollForDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=+(null==e?void 0:e.clientY);if(t<75||t>window.innerHeight-75){var o=window.scrollX,n=window.scrollY,i=t<75?-5:5;window.scrollTo(o,n+i)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
            \n
            \n Loading... \n \n
            \n
            \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
            \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
            '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss index 08c4954c4..e00a5c722 100644 --- a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss +++ b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss @@ -343,7 +343,7 @@ table[class$="SelectorTable"] th { } #form_index_display { - margin-top: 0.5rem; //matches drag-drop spacer for top of form area + margin-top: 0.5625rem; //matches drag-drop spacer for top of form area position: relative; padding: 0.875rem 0.75rem; width: 330px; @@ -518,7 +518,7 @@ table[class$="SelectorTable"] th { } .focus_indicator_button { opacity: 0.6; - padding: 0; + padding: 2px; border: 1px solid transparent; } .icon_move { @@ -567,6 +567,9 @@ table[class$="SelectorTable"] th { border-radius: 4px; box-shadow: 1px 1px 2px 1px rgba(0,0,20,0.4); margin-bottom: 1.25rem; + &:first-child { + margin-top: 0.5rem; + } } } diff --git a/docker/vue-app/src/form_editor/views/FormEditorView.js b/docker/vue-app/src/form_editor/views/FormEditorView.js index f13a24f2f..b15081317 100644 --- a/docker/vue-app/src/form_editor/views/FormEditorView.js +++ b/docker/vue-app/src/form_editor/views/FormEditorView.js @@ -678,9 +678,10 @@ export default { event.dataTransfer.dropEffect = 'move'; event.dataTransfer.effectAllowed = 'move'; event.dataTransfer.setData('text/plain', event.target.id); - const btn = document.getElementById(`${event.target.id}_button`); - if(btn !== null) { - event.dataTransfer.setDragImage(btn, -4, -4); + + const icon = document.getElementById(`drag_icon_svg`); + if(icon !== null) { + event.dataTransfer.setDragImage(icon, 0, 0); } } } @@ -899,6 +900,17 @@ export default {
            + + + +
            From a3b8165f1399173989c2eb68d133fd95f8ace4e3 Mon Sep 17 00:00:00 2001 From: shane Date: Wed, 30 Oct 2024 11:03:49 -0500 Subject: [PATCH 09/37] LEAF-4577 - Adjustments to get things looking okay. Removed the skip to content link and make the first entry load properly. --- LEAF_Request_Portal/css/printer.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/LEAF_Request_Portal/css/printer.css b/LEAF_Request_Portal/css/printer.css index c9782de20..54feca192 100644 --- a/LEAF_Request_Portal/css/printer.css +++ b/LEAF_Request_Portal/css/printer.css @@ -186,6 +186,7 @@ table#tform td { .printmainform { border: 1px solid black; + clear: both; } .printformblock { @@ -207,7 +208,7 @@ table#tform td { margin-right: 4px; font-size: 24px; font-weight: bold; - background-color: black; + background-color: transparent; color: white; float: left; } @@ -385,3 +386,7 @@ table.table { float: right; font-size: 12px; } + +#nav-skip-link{ + display: none; +} \ No newline at end of file From 604b81b635b29ad5f83c145974d01ed6200105f7 Mon Sep 17 00:00:00 2001 From: shane Date: Tue, 12 Nov 2024 15:28:08 -0600 Subject: [PATCH 10/37] LEAF-4584 - Main adjustment is the email.php for the charset change. --- LEAF_Request_Portal/sources/Email.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LEAF_Request_Portal/sources/Email.php b/LEAF_Request_Portal/sources/Email.php index 4286687db..62345ddc3 100644 --- a/LEAF_Request_Portal/sources/Email.php +++ b/LEAF_Request_Portal/sources/Email.php @@ -415,7 +415,7 @@ function initNexusDB(): void private function getHeaders(): string { $header = 'MIME-Version: 1.0'; - $header .= "\r\nContent-type: text/html; charset=iso-8859-1"; + $header .= "\r\nContent-type: text/html; charset=utf-8"; if ($this->emailSender == '') { $header .= "\r\nFrom: {$this->emailFrom}"; } else { From 9691f89480bdb4db4c2a0db239a691fe472f1bef Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Tue, 12 Nov 2024 16:55:42 -0500 Subject: [PATCH 11/37] LEAF 4435 custom drag drop appearance --- LEAF-Automated-Tests | 2 +- .../vue-dest/form_editor/LEAF_FormEditor.css | 2 +- .../form_editor/form-editor-view.chunk.js | 2 +- .../src/form_editor/LEAF_FormEditor.scss | 37 +++++++++++- .../form_editor_view/FormIndexListing.js | 6 +- .../form_editor_view/FormQuestionDisplay.js | 4 +- .../src/form_editor/views/FormEditorView.js | 58 ++++++++++++------- 7 files changed, 83 insertions(+), 28 deletions(-) diff --git a/LEAF-Automated-Tests b/LEAF-Automated-Tests index e14fa0952..a7f6435a6 160000 --- a/LEAF-Automated-Tests +++ b/LEAF-Automated-Tests @@ -1 +1 @@ -Subproject commit e14fa09524c35ed4ae17c9edc25f2ecd91c073b7 +Subproject commit a7f6435a65ae82b646ebfd70cd3ea92015b96a38 diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css index 00944df69..f22365501 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css @@ -1 +1 @@ -body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle{cursor:grab;position:absolute;padding:0;border:1px solid #f2f2f6 !important;background-color:#f0f0f0;border-radius:4px 0 0 4px;width:1.5rem;height:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column;gap:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.4;font-size:16px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .focus_indicator_button{opacity:.6;padding:2px;border:1px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{margin-top:4px;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} +body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.5rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle{cursor:grab;position:absolute;padding:0;border:1px solid #f2f2f6 !important;background-color:#f0f0f0;border-radius:4px 0 0 4px;width:1.4rem;height:70px;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column;gap:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.4;font-size:16px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .focus_indicator_button{opacity:.6;padding:2px;border:1px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{margin-top:4px;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index ff5787e3e..91d164106 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
            \n
            \n \n
            {{nameCharsRemaining}}
            \n
            \n \n
            \n \n
            {{descrCharsRemaining}}
            \n
            \n \n
            '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
            \n
            \n Loading...\n \n
            \n
            \n
            \n \n \n
            \n
            '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
            \n Move column left\n Move column right
            \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
            \n \n \n
            \n
            \n \n \n \n \n
            \n
            '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
            \n Special access restrictions\n
            \n This prevents anyone from reading stored data unless they\'re part of the following groups.
            \n If a group is assigned below, everyone else will see "[protected data]".\n
            \n \n
            {{ statusMessageError }}
            \n \n
            \n \n \n
            \n
            '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
              ","
            1. ","
              ","

              ","","

              ","

              ","

              ","

              ","","
              "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
              \n
              \n
              \n \n \n \n \n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n \n \n
              \n
              \n

              Format Information

              \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
              \n
              \n
              \n \n \n
              \n
              \n \n \n
              \n
              \n \n
              \n
              \n  Columns ({{gridJSON.length}}):\n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n
              \n \n
              \n
              \n
              \n Attributes\n
              \n \n \n
              \n \n
              \n
              \n \n
              \n \n
              \n \n This field will be archived.  It can be
              re-enabled by using Restore Fields.\n
              \n \n Deleted items can only be re-enabled
              within 30 days by using Restore Fields.\n
              \n
              \n
              '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
              \n
              Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
              {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
              {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
              {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
              \n
              \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

              \n
              \n \n \n
              \n
              \n
              \n \n \n
              \n \n
              \n
              \n
              \n Notice:
              \n

              Please go to LEAF Programmer\n to ensure continued access to this area.

              \n
              '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
              \n
              \n

              Stapled forms will show up on the same page as the primary form.

              \n

              The order of the forms will be determined by the forms\' assigned sort values.

              \n
              \n
                \n
              • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
              • \n
              \n

              \n
              \n \n
              There are no available forms to merge
              \n
              \n
              '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
              \n

              What is this?

              \n

              With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

              \n
              \n

              To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

              \n
              \n

              The following groups can update {{formNameStripped()}} records at any time:

              \n
              \n
              \n \n \n

              \n
              \n \n
              There are no available groups to add
              \n
              \n
              '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
              \n
              Are you sure you want to delete this form?
              \n
              {{formName}}
              \n
              {{formDescription}}
              \n
              ⚠️ This form still has stapled forms attached
              \n
              '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
              \n \x3c!-- LOADING SPINNER --\x3e\n
              \n Loading... \n
              \n
              \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
              \n
              \n
              Choose Delete to remove this condition, or cancel to return to the editor
              \n
              {{ conditionOverviewText }}
              \n
              \n \n \n
              \n
              \n \n
              \n
              '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
              \n

              This is a Nationally Standardized Subordinate Site

              \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

            '},_={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
            \n \n \n\n \n\n \n\n \n\n \n\n \n \n
            File Attachment(s)\n

            Select File to attach:

            \n \n
            \n\n \n\n \n \n \n \n \n\n \n
            '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","toggleIndicatorFocus","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
            '.concat(this.formPage+1,"
            "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?this.formNode.name.trim():"[ blank ]";return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
            \n
            \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n
            \n
            \n
            \n \n \n
            \n \n \n
            \n
            \n\n \x3c!-- TOOLBAR --\x3e\n
            \n\n
            \n \n \n \n \n
            \n \n \n \n 🔒\n ⛓️\n ⚙️\n
            \n
            \n
            \n \x3c!-- NAME --\x3e\n
            \n
            \n
            \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
            '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:_},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","scrollForDrag","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
          4. \n
            \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
              \n\n \n \n
            \n
            \n \n
            \n
            \n
          5. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
            \n {{formID}}\n (internal for {{formParentID}})\n \n
            \n \n \n \n \n \n
            \n
            \n
            \n \n
            \n \n
            This is an Internal Form
            \n
            \n
            '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=this.focusedIndicatorID!==e?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id);var n=document.getElementById("drag_icon_svg");null!==n&&t.dataTransfer.setDragImage(n,0,0)}},scrollForDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=+(null==e?void 0:e.clientY);if(t<75||t>window.innerHeight-75){var o=window.scrollX,n=window.scrollY,i=t<75?-5:5;window.scrollTo(o,n+i)}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){var o=t.currentTarget;if("UL"!==o.nodeName)return;t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
            \n
            \n Loading... \n \n
            \n
            \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
            \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
            '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
            \n
            \n \n
            {{nameCharsRemaining}}
            \n
            \n \n
            \n \n
            {{descrCharsRemaining}}
            \n
            \n \n
            '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
            \n
            \n Loading...\n \n
            \n
            \n
            \n \n \n
            \n
            '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
            \n Move column left\n Move column right
            \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
            \n \n \n
            \n
            \n \n \n \n \n
            \n
            '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
            \n Special access restrictions\n
            \n This prevents anyone from reading stored data unless they\'re part of the following groups.
            \n If a group is assigned below, everyone else will see "[protected data]".\n
            \n \n
            {{ statusMessageError }}
            \n \n
            \n \n \n
            \n
            '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
              ","
            1. ","
              ","

              ","","

              ","

              ","

              ","

              ","","
              "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
              \n
              \n
              \n \n \n \n \n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n \n \n
              \n
              \n

              Format Information

              \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
              \n
              \n
              \n \n \n
              \n
              \n \n \n
              \n
              \n \n
              \n
              \n  Columns ({{gridJSON.length}}):\n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n
              \n \n
              \n
              \n
              \n Attributes\n
              \n \n \n
              \n \n
              \n
              \n \n
              \n \n
              \n \n This field will be archived.  It can be
              re-enabled by using Restore Fields.\n
              \n \n Deleted items can only be re-enabled
              within 30 days by using Restore Fields.\n
              \n
              \n
              '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
              \n
              Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
              {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
              {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
              {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
              \n
              \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

              \n
              \n \n \n
              \n
              \n
              \n \n \n
              \n \n
              \n
              \n
              \n Notice:
              \n

              Please go to LEAF Programmer\n to ensure continued access to this area.

              \n
              '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
              \n
              \n

              Stapled forms will show up on the same page as the primary form.

              \n

              The order of the forms will be determined by the forms\' assigned sort values.

              \n
              \n
                \n
              • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
              • \n
              \n

              \n
              \n \n
              There are no available forms to merge
              \n
              \n
              '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
              \n

              What is this?

              \n

              With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

              \n
              \n

              To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

              \n
              \n

              The following groups can update {{formNameStripped()}} records at any time:

              \n
              \n
              \n \n \n

              \n
              \n \n
              There are no available groups to add
              \n
              \n
              '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
              \n
              Are you sure you want to delete this form?
              \n
              {{formName}}
              \n
              {{formDescription}}
              \n
              ⚠️ This form still has stapled forms attached
              \n
              '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
              \n \x3c!-- LOADING SPINNER --\x3e\n
              \n Loading... \n
              \n
              \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
              \n
              \n
              Choose Delete to remove this condition, or cancel to return to the editor
              \n
              {{ conditionOverviewText }}
              \n
              \n \n \n
              \n
              \n \n
              \n
              '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
              \n

              This is a Nationally Standardized Subordinate Site

              \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

            '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
            \n \n \n\n \n\n \n\n \n\n \n\n \n \n
            File Attachment(s)\n

            Select File to attach:

            \n \n
            \n\n \n\n \n \n \n \n \n\n \n
            '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","toggleIndicatorFocus","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
            '.concat(this.formPage+1,"
            "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
            \n
            \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n
            \n
            \n
            \n \n \n
            \n \n \n
            \n
            \n\n \x3c!-- TOOLBAR --\x3e\n
            \n\n
            \n \n \n \n \n
            \n \n \n \n 🔒\n ⛓️\n ⚙️\n
            \n
            \n
            \n \x3c!-- NAME --\x3e\n
            \n
            \n
            \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
            '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
          6. \n
            \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
              \n\n \n \n
            \n
            \n \n
            \n
            \n
          7. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
            \n {{formID}}\n (internal for {{formParentID}})\n \n
            \n \n \n \n \n \n
            \n
            \n
            \n \n
            \n \n
            This is an Internal Form
            \n
            \n
            '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=this.focusedIndicatorID!==e?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id),t.target.classList.add("is_being_dragged"),"80px"!==+t.target.style.height&&(t.target.style.height="80px");var n=document.getElementById("drag_drop_default_img_replacement");if(null!==n){var i;this.$refs.drag_drop_custom_display.textContent="test";var r=null===(i=document.querySelector("#".concat(t.target.id," .name")))||void 0===i?void 0:i.textContent;this.$refs.drag_drop_custom_display.textContent=this.shortIndicatorNameStripped(r),t.dataTransfer.setDragImage(n,0,0)}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-5:5;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
            \n
            \n Loading... \n \n
            \n
            \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
            \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
            '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss index e00a5c722..85e1caa77 100644 --- a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss +++ b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss @@ -461,6 +461,30 @@ table[class$="SelectorTable"] th { background-color: transparent; border-radius: 4px; + /* drag drop API image replacement and display divs + 1st overrides the default image, since display issues can occur in highly nested contexts + 2nd replaces the image with a separate display card since the API ghost image cannot be styled */ + #drag_drop_default_img_replacement { + position: absolute; + left: -9999px; + height: 1px; + width: 1px; + background-color: transparent !important; + } + #drag_drop_custom_display { + cursor: pointer; + position: absolute; + left: -9999px; + width: 600px; + height: 100px; + padding: 0.5rem; + z-index: 1001; + background-color: white; + border: 1px solid black; + border-radius: 3px; + box-shadow: 2px 2px 4px 1px rgba(0,0,25,0.25); + } + /* Drag-Drop area for focused form */ ul[id^="base_drop_area"] { position: relative; @@ -495,8 +519,8 @@ table[class$="SelectorTable"] th { border: 1px solid $BG_Pearl !important; background-color: #f0f0f0; border-radius: 4px 0 0 4px; - width: 1.5rem; - height: 100%; + width: 1.4rem; + height: 70px; left: 0; top: 0; &:hover, &:active { @@ -561,6 +585,15 @@ table[class$="SelectorTable"] th { } } } + &.is_being_dragged { + overflow: hide; + margin-bottom: 1rem; + background-color: #d0d0d4; + box-shadow: 2px 2px 4px 1px rgba(0,0,25,0.25) inset; + & * { + display: none + } + } } > li { background-color: white; diff --git a/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js b/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js index d1fde00ae..41137810e 100644 --- a/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js +++ b/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js @@ -21,7 +21,8 @@ export default { 'addToListTracker', 'previewMode', 'startDrag', - 'scrollForDrag', + 'endDrag', + 'handleOnDragCustomizations', 'onDragEnter', 'onDragLeave', 'onDrop', @@ -84,7 +85,8 @@ export default { :key="'index_list_item_' + listItem.indicatorID" :draggable="!previewMode" @dragstart.stop="startDrag" - @drag.stop="scrollForDrag"> + @dragend.stop="endDrag" + @drag.stop="handleOnDragCustomizations">
            diff --git a/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js b/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js index e0b8d01d7..40b731284 100644 --- a/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js +++ b/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js @@ -51,7 +51,9 @@ export default { const contentRequired = this.required ? `* Required` : ''; const shortLabel = (this.formNode?.description || '') !== '' && !this.previewMode ? ` (${this.formNode.description})` : ''; const staple = this.depth === 0 && this.formNode.categoryID !== this.focusedFormID ? `` : ''; - const name = this.formNode.name.trim() !== '' ? this.formNode.name.trim() : '[ blank ]'; + const name = this.formNode.name.trim() !== '' ? + '' + this.formNode.name.trim() + '': + '[ blank ]'; return `${page}${staple}${name}${shortLabel}${contentRequired}`; }, hasSpecialAccessRestrictions() { diff --git a/docker/vue-app/src/form_editor/views/FormEditorView.js b/docker/vue-app/src/form_editor/views/FormEditorView.js index b15081317..e8f96ec4c 100644 --- a/docker/vue-app/src/form_editor/views/FormEditorView.js +++ b/docker/vue-app/src/form_editor/views/FormEditorView.js @@ -111,7 +111,8 @@ export default { addToListTracker: this.addToListTracker, toggleIndicatorFocus: this.toggleIndicatorFocus, startDrag: this.startDrag, - scrollForDrag: this.scrollForDrag, + endDrag: this.endDrag, + handleOnDragCustomizations: this.handleOnDragCustomizations, onDragEnter: this.onDragEnter, onDragLeave: this.onDragLeave, onDrop: this.onDrop, @@ -678,15 +679,33 @@ export default { event.dataTransfer.dropEffect = 'move'; event.dataTransfer.effectAllowed = 'move'; event.dataTransfer.setData('text/plain', event.target.id); + event.target.classList.add("is_being_dragged"); - const icon = document.getElementById(`drag_icon_svg`); - if(icon !== null) { - event.dataTransfer.setDragImage(icon, 0, 0); + if(+event.target.style.height !== '80px') { + event.target.style.height = '80px'; + } + const elReplacementImg = document.getElementById(`drag_drop_default_img_replacement`); + if(elReplacementImg !== null) { + this.$refs.drag_drop_custom_display.textContent = "test"; + const text = document.querySelector(`#${event.target.id} .name`)?.textContent; + this.$refs.drag_drop_custom_display.textContent = this.shortIndicatorNameStripped(text); + event.dataTransfer.setDragImage(elReplacementImg, 0, 0); } } } }, - scrollForDrag(event = {}) { + endDrag(event = {}) { + //reset custom display coords and remove drag class regardless of outcome + this.$refs.drag_drop_custom_display.style.left = '-9999px'; + this.$refs.drag_drop_custom_display.style.top = '0px'; + this.$refs.drag_drop_custom_display.textContent = ""; + event.target.style.height = 'auto'; + if(event.target.classList.contains('is_being_dragged')) { + event.target.classList.remove('is_being_dragged'); + } + }, + handleOnDragCustomizations(event = {}) { + //increase the ranges at which window will scroll const scrollBuffer = 75; const y = +event?.clientY; if (y < scrollBuffer || y > window.innerHeight - scrollBuffer) { @@ -696,12 +715,17 @@ export default { const increment = y < scrollBuffer ? -scrollIncrement : scrollIncrement; window.scrollTo(sX, sY + increment); } + //update the custom display coordinates + const parEl = this.$refs.drag_drop_custom_display?.parentElement || null; + if(parEl !== null) { + const bounds = parEl.getBoundingClientRect(); + this.$refs.drag_drop_custom_display.style.left = +event?.clientX - bounds.x + 2 + 'px'; + this.$refs.drag_drop_custom_display.style.top = +event?.clientY - bounds.y + 2 + 'px'; + } }, onDrop(event = {}) { - if(event?.dataTransfer && event.dataTransfer.effectAllowed === 'move') { - const parentEl = event.currentTarget; //NOTE: drop event is on parent ul, the li is the el being moved - if(parentEl.nodeName !== 'UL') return; - + const parentEl = event.currentTarget; //NOTE: drop event is on parent ul, the li is the el being moved + if(parentEl.nodeName === 'UL' && event?.dataTransfer && event.dataTransfer.effectAllowed === 'move') { event.preventDefault(); const draggedElID = event.dataTransfer.getData('text'); const elLiToMove = document.getElementById(draggedElID); @@ -900,16 +924,9 @@ export default {
            - - - + + +
            @@ -937,7 +954,8 @@ export default { :key="'index_list_item_' + formSection.indicatorID" :draggable="!previewMode" @dragstart.stop="startDrag" - @drag.stop="scrollForDrag"> + @dragend.stop="endDrag" + @drag.stop="handleOnDragCustomizations">
            From 54dc449d22830d84df96816655601dbcf44ebe49 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Wed, 13 Nov 2024 14:13:05 -0500 Subject: [PATCH 12/37] LEAF 4435 mv drag options to list component, adjust styles --- .../vue-dest/form_editor/LEAF_FormEditor.css | 2 +- .../form_editor/form-editor-view.chunk.js | 2 +- .../src/form_editor/LEAF_FormEditor.scss | 59 ++++++++++--------- .../form_editor_view/FormIndexListing.js | 39 +++++++++++- .../form_editor_view/FormQuestionDisplay.js | 35 ----------- .../src/form_editor/views/FormEditorView.js | 12 +++- 6 files changed, 80 insertions(+), 69 deletions(-) diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css index f22365501..d3563e12b 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css @@ -1 +1 @@ -body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.5rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle{cursor:grab;position:absolute;padding:0;border:1px solid #f2f2f6 !important;background-color:#f0f0f0;border-radius:4px 0 0 4px;width:1.4rem;height:70px;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column;gap:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_drag{opacity:.4;font-size:16px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .focus_indicator_button{opacity:.6;padding:2px;border:1px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up{margin-top:4px;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .icon_move_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.5rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} +body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.75rem 1rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.375rem;left:0;top:0;flex-direction:column;background-color:#f0f0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle{cursor:grab;border-radius:4px 0 0 0;height:42px;width:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle .icon_drag{opacity:.4;font-size:16px;display:flex;justify-content:center}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .focus_indicator_button{margin-top:2px;color:#005ea2;width:100%;border:1px solid rgba(0,0,0,0);border-top:1px solid #d0d0d0;border-radius:0;padding:0 0 4px 0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up{margin-top:.375rem;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down{margin-top:.675rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.25rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index 91d164106..d6ef8f5b0 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
            \n
            \n \n
            {{nameCharsRemaining}}
            \n
            \n \n
            \n \n
            {{descrCharsRemaining}}
            \n
            \n \n
            '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
            \n
            \n Loading...\n \n
            \n
            \n
            \n \n \n
            \n
            '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
            \n Move column left\n Move column right
            \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
            \n \n \n
            \n
            \n \n \n \n \n
            \n
            '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
            \n Special access restrictions\n
            \n This prevents anyone from reading stored data unless they\'re part of the following groups.
            \n If a group is assigned below, everyone else will see "[protected data]".\n
            \n \n
            {{ statusMessageError }}
            \n \n
            \n \n \n
            \n
            '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
              ","
            1. ","
              ","

              ","","

              ","

              ","

              ","

              ","","
              "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
              \n
              \n
              \n \n \n \n \n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n \n \n
              \n
              \n

              Format Information

              \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
              \n
              \n
              \n \n \n
              \n
              \n \n \n
              \n
              \n \n
              \n
              \n  Columns ({{gridJSON.length}}):\n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n
              \n \n
              \n
              \n
              \n Attributes\n
              \n \n \n
              \n \n
              \n
              \n \n
              \n \n
              \n \n This field will be archived.  It can be
              re-enabled by using Restore Fields.\n
              \n \n Deleted items can only be re-enabled
              within 30 days by using Restore Fields.\n
              \n
              \n
              '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
              \n
              Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
              {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
              {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
              {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
              \n
              \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

              \n
              \n \n \n
              \n
              \n
              \n \n \n
              \n \n
              \n
              \n
              \n Notice:
              \n

              Please go to LEAF Programmer\n to ensure continued access to this area.

              \n
              '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
              \n
              \n

              Stapled forms will show up on the same page as the primary form.

              \n

              The order of the forms will be determined by the forms\' assigned sort values.

              \n
              \n
                \n
              • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
              • \n
              \n

              \n
              \n \n
              There are no available forms to merge
              \n
              \n
              '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
              \n

              What is this?

              \n

              With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

              \n
              \n

              To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

              \n
              \n

              The following groups can update {{formNameStripped()}} records at any time:

              \n
              \n
              \n \n \n

              \n
              \n \n
              There are no available groups to add
              \n
              \n
              '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
              \n
              Are you sure you want to delete this form?
              \n
              {{formName}}
              \n
              {{formDescription}}
              \n
              ⚠️ This form still has stapled forms attached
              \n
              '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
              \n \x3c!-- LOADING SPINNER --\x3e\n
              \n Loading... \n
              \n
              \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
              \n
              \n
              Choose Delete to remove this condition, or cancel to return to the editor
              \n
              {{ conditionOverviewText }}
              \n
              \n \n \n
              \n
              \n \n
              \n
              '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
              \n

              This is a Nationally Standardized Subordinate Site

              \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

            '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
            \n \n \n\n \n\n \n\n \n\n \n\n \n \n
            File Attachment(s)\n

            Select File to attach:

            \n \n
            \n\n \n\n \n \n \n \n \n\n \n
            '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","toggleIndicatorFocus","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey","clickToMoveListItem"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
            '.concat(this.formPage+1,"
            "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
            \n
            \n \x3c!-- VISIBLE DRAG INDICATOR / CLICK UP DOWN --\x3e\n
            \n
            \n
            \n \n \n
            \n \n \n
            \n
            \n\n \x3c!-- TOOLBAR --\x3e\n
            \n\n
            \n \n \n \n \n
            \n \n \n \n 🔒\n ⛓️\n ⚙️\n
            \n
            \n
            \n \x3c!-- NAME --\x3e\n
            \n
            \n
            \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
            '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","clickToMoveListItem","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)}},template:'
          8. \n
            \n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
              \n\n \n \n
            \n
            \n \n
            \n
            \n
          9. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
            \n {{formID}}\n (internal for {{formParentID}})\n \n
            \n \n \n \n \n \n
            \n
            \n
            \n \n
            \n \n
            This is an Internal Form
            \n
            \n
            '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=this.focusedIndicatorID!==e?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id),t.target.classList.add("is_being_dragged"),"80px"!==+t.target.style.height&&(t.target.style.height="80px");var n=document.getElementById("drag_drop_default_img_replacement");if(null!==n){var i;this.$refs.drag_drop_custom_display.textContent="test";var r=null===(i=document.querySelector("#".concat(t.target.id," .name")))||void 0===i?void 0:i.textContent;this.$refs.drag_drop_custom_display.textContent=this.shortIndicatorNameStripped(r),t.dataTransfer.setDragImage(n,0,0)}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-5:5;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
            \n
            \n Loading... \n \n
            \n
            \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
            \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
            '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
            \n
            \n \n
            {{nameCharsRemaining}}
            \n
            \n \n
            \n \n
            {{descrCharsRemaining}}
            \n
            \n \n
            '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
            \n
            \n Loading...\n \n
            \n
            \n
            \n \n \n
            \n
            '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
            \n Move column left\n Move column right
            \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
            \n \n \n
            \n
            \n \n \n \n \n
            \n
            '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
            \n Special access restrictions\n
            \n This prevents anyone from reading stored data unless they\'re part of the following groups.
            \n If a group is assigned below, everyone else will see "[protected data]".\n
            \n \n
            {{ statusMessageError }}
            \n \n
            \n \n \n
            \n
            '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
              ","
            1. ","
              ","

              ","","

              ","

              ","

              ","

              ","","
              "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
              \n
              \n
              \n \n \n \n \n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n \n \n
              \n
              \n

              Format Information

              \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
              \n
              \n
              \n \n \n
              \n
              \n \n \n
              \n
              \n \n
              \n
              \n  Columns ({{gridJSON.length}}):\n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n
              \n \n
              \n
              \n
              \n Attributes\n
              \n \n \n
              \n \n
              \n
              \n \n
              \n \n
              \n \n This field will be archived.  It can be
              re-enabled by using Restore Fields.\n
              \n \n Deleted items can only be re-enabled
              within 30 days by using Restore Fields.\n
              \n
              \n
              '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
              \n
              Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
              {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
              {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
              {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
              \n
              \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

              \n
              \n \n \n
              \n
              \n
              \n \n \n
              \n \n
              \n
              \n
              \n Notice:
              \n

              Please go to LEAF Programmer\n to ensure continued access to this area.

              \n
              '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
              \n
              \n

              Stapled forms will show up on the same page as the primary form.

              \n

              The order of the forms will be determined by the forms\' assigned sort values.

              \n
              \n
                \n
              • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
              • \n
              \n

              \n
              \n \n
              There are no available forms to merge
              \n
              \n
              '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
              \n

              What is this?

              \n

              With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

              \n
              \n

              To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

              \n
              \n

              The following groups can update {{formNameStripped()}} records at any time:

              \n
              \n
              \n \n \n

              \n
              \n \n
              There are no available groups to add
              \n
              \n
              '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
              \n
              Are you sure you want to delete this form?
              \n
              {{formName}}
              \n
              {{formDescription}}
              \n
              ⚠️ This form still has stapled forms attached
              \n
              '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
              \n \x3c!-- LOADING SPINNER --\x3e\n
              \n Loading... \n
              \n
              \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
              \n
              \n
              Choose Delete to remove this condition, or cancel to return to the editor
              \n
              {{ conditionOverviewText }}
              \n
              \n \n \n
              \n
              \n \n
              \n
              '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
              \n

              This is a Nationally Standardized Subordinate Site

              \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

            '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
            \n \n \n\n \n\n \n\n \n\n \n\n \n \n
            File Attachment(s)\n

            Select File to attach:

            \n \n
            \n\n \n\n \n \n \n \n \n\n \n
            '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
            '.concat(this.formPage+1,"
            "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
            \n
            \n \x3c!-- TOOLBAR --\x3e\n
            \n\n
            \n \n \n \n \n
            \n \n \n \n 🔒\n ⛓️\n ⚙️\n
            \n
            \n
            \n \x3c!-- NAME --\x3e\n
            \n
            \n
            \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
            '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","toggleIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
          10. \n
            \n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n\n
            \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
              \n\n \n \n
            \n
            \n \n
            \n
            \n
          11. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
            \n {{formID}}\n (internal for {{formParentID}})\n \n
            \n \n \n \n \n \n
            \n
            \n
            \n \n
            \n \n
            This is an Internal Form
            \n
            \n
            '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=this.focusedIndicatorID!==e?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o||(null==t?void 0:t.offsetY)>=48)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id),t.target.classList.add("is_being_dragged");var n=null!==t.target.querySelector("ul > li");"80px"!==+t.target.style.height&&(t.target.style.height="80px");var i=document.getElementById("drag_drop_default_img_replacement");if(null!==i){var r;this.$refs.drag_drop_custom_display.textContent="test";var a=null===(r=document.querySelector("#".concat(t.target.id," .name")))||void 0===r?void 0:r.textContent;a=this.shortIndicatorNameStripped(a),n&&(a+=" (and all sub-questions)"),this.$refs.drag_drop_custom_display.textContent=a,t.dataTransfer.setDragImage(i,0,0)}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-5:5;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
            \n
            \n Loading... \n \n
            \n
            \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
            \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
            '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss index 85e1caa77..69102e5e0 100644 --- a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss +++ b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss @@ -477,7 +477,7 @@ table[class$="SelectorTable"] th { left: -9999px; width: 600px; height: 100px; - padding: 0.5rem; + padding: 0.75rem 1rem; z-index: 1001; background-color: white; border: 1px solid black; @@ -512,38 +512,41 @@ table[class$="SelectorTable"] th { margin-bottom: 0.675rem; } - div.drag_question_handle { - cursor: grab; - position: absolute; - padding: 0; - border: 1px solid $BG_Pearl !important; - background-color: #f0f0f0; - border-radius: 4px 0 0 4px; - width: 1.4rem; - height: 70px; - left: 0; - top: 0; - &:hover, &:active { - outline: 2px solid #20a0f0; - } - } - .icon_move_container { + .move_question_container { @include flexcenter; cursor: grab; position: absolute; - width: 1.5rem; + width: 1.375rem; left: 0; top: 0; flex-direction: column; - gap: 2px; - .icon_drag { - opacity: 0.4; - font-size: 16px; + background-color: #f0f0f0; + + div.drag_question_handle { + cursor: grab; + border-radius: 4px 0 0 0; + height: 42px; + width: 100%; + left: 0; + top: 0; + &:hover, &:active { + outline: 2px solid #20a0f0; + } + .icon_drag { + opacity: 0.4; + font-size: 16px; + display: flex; + justify-content: center; + } } .focus_indicator_button { - opacity: 0.6; - padding: 2px; + margin-top: 2px; + color: $base-navy; + width: 100%; border: 1px solid transparent; + border-top: 1px solid #d0d0d0; + border-radius: 0; + padding: 0 0 4px 0; } .icon_move { @include flexcenter; @@ -554,7 +557,7 @@ table[class$="SelectorTable"] th { background-color: transparent; border: 9px solid transparent; &.up { - margin-top: 4px; + margin-top: 0.375rem; border-bottom: 18px solid $BG-DarkNavy; border-top: 2px; &:disabled { @@ -569,7 +572,7 @@ table[class$="SelectorTable"] th { } } &.down { - margin-top: 0.625rem; + margin-top: 0.675rem; border-top: 18px solid $BG-DarkNavy; border-bottom: 2px; &:disabled { @@ -589,7 +592,7 @@ table[class$="SelectorTable"] th { overflow: hide; margin-bottom: 1rem; background-color: #d0d0d4; - box-shadow: 2px 2px 4px 1px rgba(0,0,25,0.25) inset; + box-shadow: 2px 2px 4px 1px rgba(0,0,25,0.3) inset; & * { display: none } @@ -653,7 +656,7 @@ table[class$="SelectorTable"] th { padding-left: 0; } &:not(.form-header):not(.preview) { - margin-left: 0.5rem; + margin-left: 0.25rem; border: 1px solid #c1c1c1; box-shadow: 1px 1px 2px 1px rgba(0,0,20,0.4); transition: box-shadow 0.5s; diff --git a/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js b/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js index 41137810e..a78e822b6 100644 --- a/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js +++ b/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js @@ -20,13 +20,15 @@ export default { 'clearListItem', 'addToListTracker', 'previewMode', + 'toggleIndicatorFocus', + 'clickToMoveListItem', + 'focusedIndicatorID', 'startDrag', 'endDrag', 'handleOnDragCustomizations', 'onDragEnter', 'onDragLeave', 'onDrop', - 'clickToMoveListItem', 'makePreviewKey', 'newQuestion', ], @@ -49,10 +51,45 @@ export default { }, required() { return parseInt(this.formNode.required) === 1; + }, + hasClickToMoveOptions() { + return this.currentListLength > 1; } }, template:`
          12. + + +
            +
            + +
            + +
            + + +
            +
            + 1; - } }, template:`
            - -
            -
            -
            - - -
            - - -
            -
            -
            diff --git a/docker/vue-app/src/form_editor/views/FormEditorView.js b/docker/vue-app/src/form_editor/views/FormEditorView.js index e8f96ec4c..4e30f9768 100644 --- a/docker/vue-app/src/form_editor/views/FormEditorView.js +++ b/docker/vue-app/src/form_editor/views/FormEditorView.js @@ -670,9 +670,10 @@ export default { this.listTracker[indID] = item; }, startDrag(event = {}) { + //restrict action to bounds of visual drag indicator tab const classList = event?.target?.classList || []; const dragLimitX = classList.contains('subindicator_heading') ? 30 : 24; - if (event?.offsetX > dragLimitX) { + if (event?.offsetX > dragLimitX || event?.offsetY >= 48) { event.preventDefault(); } else { if(!this.previewMode && event?.dataTransfer) { @@ -680,6 +681,7 @@ export default { event.dataTransfer.effectAllowed = 'move'; event.dataTransfer.setData('text/plain', event.target.id); event.target.classList.add("is_being_dragged"); + const targetHasSublist = event.target.querySelector('ul > li') !== null; if(+event.target.style.height !== '80px') { event.target.style.height = '80px'; @@ -687,8 +689,12 @@ export default { const elReplacementImg = document.getElementById(`drag_drop_default_img_replacement`); if(elReplacementImg !== null) { this.$refs.drag_drop_custom_display.textContent = "test"; - const text = document.querySelector(`#${event.target.id} .name`)?.textContent; - this.$refs.drag_drop_custom_display.textContent = this.shortIndicatorNameStripped(text); + let text = document.querySelector(`#${event.target.id} .name`)?.textContent; + text = this.shortIndicatorNameStripped(text); + if (targetHasSublist) { + text += ' (and all sub-questions)'; + } + this.$refs.drag_drop_custom_display.textContent = text; event.dataTransfer.setDragImage(elReplacementImg, 0, 0); } } From 5724c1ef78fc393db396c0960bddc76d339d3784 Mon Sep 17 00:00:00 2001 From: shane Date: Mon, 18 Nov 2024 10:27:29 -0600 Subject: [PATCH 13/37] LEAF-4584 - This was found to cause special characters to break in emails. everything should be stored as utf-8 --- LEAF-Automated-Tests | 2 +- LEAF_Request_Portal/sources/FormWorkflow.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LEAF-Automated-Tests b/LEAF-Automated-Tests index a7f6435a6..c56c1b20b 160000 --- a/LEAF-Automated-Tests +++ b/LEAF-Automated-Tests @@ -1 +1 @@ -Subproject commit a7f6435a65ae82b646ebfd70cd3ea92015b96a38 +Subproject commit c56c1b20b429f902108c954ab825c9918f7d697d diff --git a/LEAF_Request_Portal/sources/FormWorkflow.php b/LEAF_Request_Portal/sources/FormWorkflow.php index 48603d0a0..e5960b8e6 100644 --- a/LEAF_Request_Portal/sources/FormWorkflow.php +++ b/LEAF_Request_Portal/sources/FormWorkflow.php @@ -1672,7 +1672,7 @@ private function getFields(): array default: break; } - $data = iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $data); + $formattedFields["content"][$field['indicatorID']] = $data !== "" ? $data : $field["default"]; $formattedFields["to_cc_content"][$field['indicatorID']] = $emailValue; } From 30a74114fbb3809497fd1bac577a577b3d51765e Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Mon, 18 Nov 2024 10:24:45 -0500 Subject: [PATCH 14/37] LEAF 4435 submenu branch, border radius style, subquestion text --- app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css | 2 +- app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js | 2 +- docker/vue-app/src/form_editor/LEAF_FormEditor.scss | 2 +- docker/vue-app/src/form_editor/views/FormEditorView.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css index d3563e12b..7ad4692d1 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css @@ -1 +1 @@ -body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.75rem 1rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.375rem;left:0;top:0;flex-direction:column;background-color:#f0f0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle{cursor:grab;border-radius:4px 0 0 0;height:42px;width:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle .icon_drag{opacity:.4;font-size:16px;display:flex;justify-content:center}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .focus_indicator_button{margin-top:2px;color:#005ea2;width:100%;border:1px solid rgba(0,0,0,0);border-top:1px solid #d0d0d0;border-radius:0;padding:0 0 4px 0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up{margin-top:.375rem;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down{margin-top:.675rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:.25rem;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} +body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.75rem 1rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0;border-radius:3px}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.375rem;left:0;top:0;flex-direction:column;background-color:#f0f0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle{cursor:grab;border-radius:4px 0 0 0;height:42px;width:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle .icon_drag{opacity:.4;font-size:16px;display:flex;justify-content:center}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .focus_indicator_button{margin-top:2px;color:#005ea2;width:100%;border:1px solid rgba(0,0,0,0);border-top:1px solid #d0d0d0;border-radius:0;padding:0 0 4px 0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up{margin-top:.375rem;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down{margin-top:.675rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index d6ef8f5b0..75d0f39d5 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
            \n
            \n \n
            {{nameCharsRemaining}}
            \n
            \n \n
            \n \n
            {{descrCharsRemaining}}
            \n
            \n \n
            '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
            \n
            \n Loading...\n \n
            \n
            \n
            \n \n \n
            \n
            '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
            \n Move column left\n Move column right
            \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
            \n \n \n
            \n
            \n \n \n \n \n
            \n
            '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
            \n Special access restrictions\n
            \n This prevents anyone from reading stored data unless they\'re part of the following groups.
            \n If a group is assigned below, everyone else will see "[protected data]".\n
            \n \n
            {{ statusMessageError }}
            \n \n
            \n \n \n
            \n
            '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
              ","
            1. ","
              ","

              ","","

              ","

              ","

              ","

              ","","
              "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
              \n
              \n
              \n \n \n \n \n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n \n \n
              \n
              \n

              Format Information

              \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
              \n
              \n
              \n \n \n
              \n
              \n \n \n
              \n
              \n \n
              \n
              \n  Columns ({{gridJSON.length}}):\n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n
              \n \n
              \n
              \n
              \n Attributes\n
              \n \n \n
              \n \n
              \n
              \n \n
              \n \n
              \n \n This field will be archived.  It can be
              re-enabled by using Restore Fields.\n
              \n \n Deleted items can only be re-enabled
              within 30 days by using Restore Fields.\n
              \n
              \n
              '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
              \n
              Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
              {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
              {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
              {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
              \n
              \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

              \n
              \n \n \n
              \n
              \n
              \n \n \n
              \n \n
              \n
              \n
              \n Notice:
              \n

              Please go to LEAF Programmer\n to ensure continued access to this area.

              \n
              '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
              \n
              \n

              Stapled forms will show up on the same page as the primary form.

              \n

              The order of the forms will be determined by the forms\' assigned sort values.

              \n
              \n
                \n
              • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
              • \n
              \n

              \n
              \n \n
              There are no available forms to merge
              \n
              \n
              '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
              \n

              What is this?

              \n

              With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

              \n
              \n

              To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

              \n
              \n

              The following groups can update {{formNameStripped()}} records at any time:

              \n
              \n
              \n \n \n

              \n
              \n \n
              There are no available groups to add
              \n
              \n
              '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
              \n
              Are you sure you want to delete this form?
              \n
              {{formName}}
              \n
              {{formDescription}}
              \n
              ⚠️ This form still has stapled forms attached
              \n
              '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
              \n \x3c!-- LOADING SPINNER --\x3e\n
              \n Loading... \n
              \n
              \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
              \n
              \n
              Choose Delete to remove this condition, or cancel to return to the editor
              \n
              {{ conditionOverviewText }}
              \n
              \n \n \n
              \n
              \n \n
              \n
              '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
              \n

              This is a Nationally Standardized Subordinate Site

              \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

            '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
            \n \n \n\n \n\n \n\n \n\n \n\n \n \n
            File Attachment(s)\n

            Select File to attach:

            \n \n
            \n\n \n\n \n \n \n \n \n\n \n
            '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
            '.concat(this.formPage+1,"
            "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
            \n
            \n \x3c!-- TOOLBAR --\x3e\n
            \n\n
            \n \n \n \n \n
            \n \n \n \n 🔒\n ⛓️\n ⚙️\n
            \n
            \n
            \n \x3c!-- NAME --\x3e\n
            \n
            \n
            \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
            '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","toggleIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
          13. \n
            \n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n\n
            \n
            \n \n
            \n \n
            \n \n \n
            \n
            \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
              \n\n \n \n
            \n
            \n \n
            \n
            \n
          14. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
            \n {{formID}}\n (internal for {{formParentID}})\n \n
            \n \n \n \n \n \n
            \n
            \n
            \n \n
            \n \n
            This is an Internal Form
            \n
            \n
            '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=this.focusedIndicatorID!==e?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o||(null==t?void 0:t.offsetY)>=48)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id),t.target.classList.add("is_being_dragged");var n=null!==t.target.querySelector("ul > li");"80px"!==+t.target.style.height&&(t.target.style.height="80px");var i=document.getElementById("drag_drop_default_img_replacement");if(null!==i){var r;this.$refs.drag_drop_custom_display.textContent="test";var a=null===(r=document.querySelector("#".concat(t.target.id," .name")))||void 0===r?void 0:r.textContent;a=this.shortIndicatorNameStripped(a),n&&(a+=" (and all sub-questions)"),this.$refs.drag_drop_custom_display.textContent=a,t.dataTransfer.setDragImage(i,0,0)}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-5:5;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
            \n
            \n Loading... \n \n
            \n
            \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
            \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
            '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
            \n
            \n \n
            {{nameCharsRemaining}}
            \n
            \n \n
            \n \n
            {{descrCharsRemaining}}
            \n
            \n \n
            '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
            \n
            \n Loading...\n \n
            \n
            \n
            \n \n \n
            \n
            '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
            \n Move column left\n Move column right
            \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
            \n \n \n
            \n
            \n \n \n \n \n
            \n
            '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
            \n Special access restrictions\n
            \n This prevents anyone from reading stored data unless they\'re part of the following groups.
            \n If a group is assigned below, everyone else will see "[protected data]".\n
            \n \n
            {{ statusMessageError }}
            \n \n
            \n \n \n
            \n
            '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
              ","
            1. ","
              ","

              ","","

              ","

              ","

              ","

              ","","
              "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
              \n
              \n
              \n \n \n \n \n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n \n \n
              \n
              \n

              Format Information

              \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
              \n
              \n
              \n \n \n
              \n
              \n \n \n
              \n
              \n \n
              \n
              \n  Columns ({{gridJSON.length}}):\n
              \n
              \n \n \n
              \n
              \n
              \n \n
              \n
              \n \n
              \n
              \n
              \n Attributes\n
              \n \n \n
              \n \n
              \n
              \n \n
              \n \n
              \n \n This field will be archived.  It can be
              re-enabled by using Restore Fields.\n
              \n \n Deleted items can only be re-enabled
              within 30 days by using Restore Fields.\n
              \n
              \n
              '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
              \n
              Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
              {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
              {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
              {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
              \n
              \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

              \n
              \n \n \n
              \n
              \n
              \n \n \n
              \n \n
              \n
              \n
              \n Notice:
              \n

              Please go to LEAF Programmer\n to ensure continued access to this area.

              \n
              '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
              \n
              \n

              Stapled forms will show up on the same page as the primary form.

              \n

              The order of the forms will be determined by the forms\' assigned sort values.

              \n
              \n
                \n
              • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
              • \n
              \n

              \n
              \n \n
              There are no available forms to merge
              \n
              \n
              '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
              \n

              What is this?

              \n

              With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

              \n
              \n

              To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

              \n
              \n

              The following groups can update {{formNameStripped()}} records at any time:

              \n
              \n
              \n \n \n

              \n
              \n \n
              There are no available groups to add
              \n
              \n
              '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
              \n
              Are you sure you want to delete this form?
              \n
              {{formName}}
              \n
              {{formDescription}}
              \n
              ⚠️ This form still has stapled forms attached
              \n
              '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
              \n \x3c!-- LOADING SPINNER --\x3e\n
              \n Loading... \n
              \n
              \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
              \n
              \n
              Choose Delete to remove this condition, or cancel to return to the editor
              \n
              {{ conditionOverviewText }}
              \n
              \n \n \n
              \n
              \n \n
              \n
              '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
              \n

              This is a Nationally Standardized Subordinate Site

              \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
              '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
              \n \n \n\n \n\n \n\n \n\n \n\n \n \n
              File Attachment(s)\n

              Select File to attach:

              \n \n
              \n\n \n\n \n \n \n \n \n\n \n
              '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
              '.concat(this.formPage+1,"
              "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
              \n
              \n \x3c!-- TOOLBAR --\x3e\n
              \n\n
              \n \n \n \n \n
              \n \n \n \n 🔒\n ⛓️\n ⚙️\n
              \n
              \n
              \n \x3c!-- NAME --\x3e\n
              \n
              \n
              \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
              '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","toggleIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
            2. \n
              \n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n\n
              \n
              \n \n
              \n \n
              \n \n \n
              \n
              \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
                \n\n \n \n
              \n
              \n \n
              \n
              \n
            3. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
              \n {{formID}}\n (internal for {{formParentID}})\n \n
              \n \n \n \n \n \n
              \n
              \n
              \n \n
              \n \n
              This is an Internal Form
              \n
              \n
              '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=this.focusedIndicatorID!==e?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o||(null==t?void 0:t.offsetY)>=48)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id),t.target.classList.add("is_being_dragged");var n=null!==t.target.querySelector("ul > li");"80px"!==+t.target.style.height&&(t.target.style.height="80px");var i=document.getElementById("drag_drop_default_img_replacement");if(null!==i){var r;this.$refs.drag_drop_custom_display.textContent="test";var a=null===(r=document.querySelector("#".concat(t.target.id," .name")))||void 0===r?void 0:r.textContent;a=this.shortIndicatorNameStripped(a),n&&(a+=" (includes sub-questions)"),this.$refs.drag_drop_custom_display.textContent=a,t.dataTransfer.setDragImage(i,0,0)}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-5:5;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
              \n
              \n Loading... \n \n
              \n
              \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
              \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
              '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss index 69102e5e0..115110ce4 100644 --- a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss +++ b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss @@ -505,6 +505,7 @@ table[class$="SelectorTable"] th { li { position: relative; margin: 0.5rem 0; + border-radius: 3px; &:first-child { margin-top: 0.675rem; } @@ -656,7 +657,6 @@ table[class$="SelectorTable"] th { padding-left: 0; } &:not(.form-header):not(.preview) { - margin-left: 0.25rem; border: 1px solid #c1c1c1; box-shadow: 1px 1px 2px 1px rgba(0,0,20,0.4); transition: box-shadow 0.5s; diff --git a/docker/vue-app/src/form_editor/views/FormEditorView.js b/docker/vue-app/src/form_editor/views/FormEditorView.js index 4e30f9768..6b47fa25f 100644 --- a/docker/vue-app/src/form_editor/views/FormEditorView.js +++ b/docker/vue-app/src/form_editor/views/FormEditorView.js @@ -692,7 +692,7 @@ export default { let text = document.querySelector(`#${event.target.id} .name`)?.textContent; text = this.shortIndicatorNameStripped(text); if (targetHasSublist) { - text += ' (and all sub-questions)'; + text += ' (includes sub-questions)'; } this.$refs.drag_drop_custom_display.textContent = text; event.dataTransfer.setDragImage(elReplacementImg, 0, 0); From 2fba629ba9adaf72328876b3e4c7f80bae1b7e05 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Mon, 18 Nov 2024 15:25:08 -0500 Subject: [PATCH 15/37] LEAF 4585 min step coords 0, handle any current neg vals --- .../admin/templates/mod_workflow.tpl | 14 +++++++++++--- LEAF_Request_Portal/sources/Workflow.php | 8 +++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/LEAF_Request_Portal/admin/templates/mod_workflow.tpl b/LEAF_Request_Portal/admin/templates/mod_workflow.tpl index da99eabc8..5818c3af3 100644 --- a/LEAF_Request_Portal/admin/templates/mod_workflow.tpl +++ b/LEAF_Request_Portal/admin/templates/mod_workflow.tpl @@ -2249,14 +2249,22 @@ type: 'GET', url: '../api/workflow/' + workflowID, success: function(res) { - var minY = 80; - var maxY = 80; + const minY = 80; + const minX = 0; + let maxY = 80; + + let posY = 0; + let posX = 0; for (let i in res) { steps[res[i].stepID] = res[i]; posY = parseFloat(res[i].posY); + posX = parseFloat(res[i].posX); if (posY < minY) { posY = minY; } + if (posX < minX) { + posX = minX; + } let emailNotificationIcon = ''; if (typeof res[i].stepData == 'string' && isJSON(res[i].stepData)) { @@ -2279,7 +2287,7 @@ ); $('#step_' + res[i].stepID).css({ - 'left': parseFloat(res[i].posX) + 'px', + 'left': posX + 'px', 'top': posY + 'px', 'background-color': res[i].stepBgColor }); diff --git a/LEAF_Request_Portal/sources/Workflow.php b/LEAF_Request_Portal/sources/Workflow.php index cc02a513b..1c1de8150 100644 --- a/LEAF_Request_Portal/sources/Workflow.php +++ b/LEAF_Request_Portal/sources/Workflow.php @@ -303,10 +303,12 @@ public function setEditorPosition($stepID, $x, $y) return 'Restricted command.'; } - $vars = array(':workflowID' => $this->workflowID, + $vars = array( + ':workflowID' => $this->workflowID, ':stepID' => $stepID, - ':x' => $x, - ':y' => $y, ); + ':x' => max(0, $x), + ':y' => max(0, $y), + ); $res = $this->db->prepared_query('UPDATE workflow_steps SET posX=:x, posY=:y WHERE workflowID=:workflowID From 211eed9f0472df735850a71400ed5efcadf3e0a0 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Mon, 18 Nov 2024 16:38:36 -0500 Subject: [PATCH 16/37] LEAF 4585 add jsPlumb draggable config option --- LEAF_Request_Portal/admin/templates/mod_workflow.tpl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/LEAF_Request_Portal/admin/templates/mod_workflow.tpl b/LEAF_Request_Portal/admin/templates/mod_workflow.tpl index 5818c3af3..c0d475e99 100644 --- a/LEAF_Request_Portal/admin/templates/mod_workflow.tpl +++ b/LEAF_Request_Portal/admin/templates/mod_workflow.tpl @@ -2087,11 +2087,11 @@ routes = res; if (endPoints[-1] == undefined) { endPoints[-1] = jsPlumb.addEndpoint('step_-1', {anchor: 'Continuous'}, endpointOptions); - jsPlumb.draggable('step_-1'); + jsPlumb.draggable('step_-1', { allowNegative: false }); } if (endPoints[0] == undefined) { endPoints[0] = jsPlumb.addEndpoint('step_0', {anchor: 'Continuous'}, endpointOptions); - jsPlumb.draggable('step_0'); + jsPlumb.draggable('step_0', { allowNegative: false }); } // draw connector @@ -2295,6 +2295,7 @@ if (endPoints[res[i].stepID] == undefined) { endPoints[res[i].stepID] = jsPlumb.addEndpoint('step_' + res[i].stepID, {anchor: 'Continuous'}, endpointOptions); jsPlumb.draggable('step_' + res[i].stepID, { + allowNegative: false, // save position of the box when moved stop: function(stepID) { return function() { From 9e5dbaec0483ef7fe66b5a31d6ae5f131a592800 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Tue, 19 Nov 2024 13:07:45 -0500 Subject: [PATCH 17/37] LEAF 4435 adjust click option visibility, note drag bug at certain scroll position --- .../vue-dest/form_editor/LEAF_FormEditor.css | 2 +- .../form_editor/form-editor-view.chunk.js | 2 +- .../src/form_editor/LEAF_FormEditor.scss | 31 ++++++++++--------- .../form_editor_view/FormIndexListing.js | 29 +++++++++-------- .../src/form_editor/views/FormEditorView.js | 15 +++++---- 5 files changed, 39 insertions(+), 40 deletions(-) diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css index 7ad4692d1..4ca672d2f 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css @@ -1 +1 @@ -body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.75rem 1rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0;border-radius:3px}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container{display:flex;justify-content:center;align-items:center;cursor:grab;position:absolute;width:1.375rem;left:0;top:0;flex-direction:column;background-color:#f0f0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle{cursor:grab;border-radius:4px 0 0 0;height:42px;width:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle .icon_drag{opacity:.4;font-size:16px;display:flex;justify-content:center}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .focus_indicator_button{margin-top:2px;color:#005ea2;width:100%;border:1px solid rgba(0,0,0,0);border-top:1px solid #d0d0d0;border-radius:0;padding:0 0 4px 0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:pointer;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up{margin-top:.375rem;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down{margin-top:.675rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.375rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} +body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.75rem 1rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0;border-radius:3px}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container{display:flex;justify-content:center;align-items:center;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle{cursor:grab;background-color:#f0f0f0;border-radius:4px 0 0 0;height:70px;width:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle .icon_drag{opacity:.4;font-size:16px;display:flex;justify-content:center}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options{opacity:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options.click_buttons_visible{opacity:1}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options.click_buttons_visible .icon_move{cursor:pointer}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:auto;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up{margin-top:.375rem;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.5rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:2px;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index 75d0f39d5..a2df85a2f 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
              \n
              \n \n
              {{nameCharsRemaining}}
              \n
              \n \n
              \n \n
              {{descrCharsRemaining}}
              \n
              \n \n
              '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
              \n
              \n Loading...\n \n
              \n
              \n
              \n \n \n
              \n
              '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
              \n Move column left\n Move column right
              \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
              \n \n \n
              \n
              \n \n \n \n \n
              \n
              '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
              \n Special access restrictions\n
              \n This prevents anyone from reading stored data unless they\'re part of the following groups.
              \n If a group is assigned below, everyone else will see "[protected data]".\n
              \n \n
              {{ statusMessageError }}
              \n \n
              \n \n \n
              \n
              '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
                ","
              1. ","
                ","

                ","","

                ","

                ","

                ","

                ","","
                "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
                \n
                \n
                \n \n \n \n \n
                \n
                \n \n \n
                \n
                \n
                \n \n
                \n \n \n
                \n
                \n

                Format Information

                \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
                \n
                \n
                \n \n \n
                \n
                \n \n \n
                \n
                \n \n
                \n
                \n  Columns ({{gridJSON.length}}):\n
                \n
                \n \n \n
                \n
                \n
                \n \n
                \n
                \n \n
                \n
                \n
                \n Attributes\n
                \n \n \n
                \n \n
                \n
                \n \n
                \n \n
                \n \n This field will be archived.  It can be
                re-enabled by using Restore Fields.\n
                \n \n Deleted items can only be re-enabled
                within 30 days by using Restore Fields.\n
                \n
                \n
                '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
                \n
                Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
                {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
                {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
                {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
                \n
                \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

                \n
                \n \n \n
                \n
                \n
                \n \n \n
                \n \n
                \n
                \n
                \n Notice:
                \n

                Please go to LEAF Programmer\n to ensure continued access to this area.

                \n
                '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
                \n
                \n

                Stapled forms will show up on the same page as the primary form.

                \n

                The order of the forms will be determined by the forms\' assigned sort values.

                \n
                \n
                  \n
                • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
                • \n
                \n

                \n
                \n \n
                There are no available forms to merge
                \n
                \n
                '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
                \n

                What is this?

                \n

                With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

                \n
                \n

                To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

                \n
                \n

                The following groups can update {{formNameStripped()}} records at any time:

                \n
                \n
                \n \n \n

                \n
                \n \n
                There are no available groups to add
                \n
                \n
                '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
                \n
                Are you sure you want to delete this form?
                \n
                {{formName}}
                \n
                {{formDescription}}
                \n
                ⚠️ This form still has stapled forms attached
                \n
                '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
                \n \x3c!-- LOADING SPINNER --\x3e\n
                \n Loading... \n
                \n
                \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
                \n
                \n
                Choose Delete to remove this condition, or cancel to return to the editor
                \n
                {{ conditionOverviewText }}
                \n
                \n \n \n
                \n
                \n \n
                \n
                '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
                \n

                This is a Nationally Standardized Subordinate Site

                \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
                '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
                \n \n \n\n \n\n \n\n \n\n \n\n \n \n
                File Attachment(s)\n

                Select File to attach:

                \n \n
                \n\n \n\n \n \n \n \n \n\n \n
                '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
                '.concat(this.formPage+1,"
                "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
                \n
                \n \x3c!-- TOOLBAR --\x3e\n
                \n\n
                \n \n \n \n \n
                \n \n \n \n 🔒\n ⛓️\n ⚙️\n
                \n
                \n
                \n \x3c!-- NAME --\x3e\n
                \n
                \n
                \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
                '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","toggleIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'
              2. \n
                \n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n\n
                \n
                \n \n
                \n \n
                \n \n \n
                \n
                \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
                  \n\n \n \n
                \n
                \n \n
                \n
                \n
              3. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
                \n {{formID}}\n (internal for {{formParentID}})\n \n
                \n \n \n \n \n \n
                \n
                \n
                \n \n
                \n \n
                This is an Internal Form
                \n
                \n
                '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},toggleIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID=this.focusedIndicatorID!==e?e:null},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=((null==t||null===(e=t.target)||void 0===e?void 0:e.classList)||[]).contains("subindicator_heading")?30:24;if((null==t?void 0:t.offsetX)>o||(null==t?void 0:t.offsetY)>=48)t.preventDefault();else if(!this.previewMode&&null!=t&&t.dataTransfer){t.dataTransfer.dropEffect="move",t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",t.target.id),t.target.classList.add("is_being_dragged");var n=null!==t.target.querySelector("ul > li");"80px"!==+t.target.style.height&&(t.target.style.height="80px");var i=document.getElementById("drag_drop_default_img_replacement");if(null!==i){var r;this.$refs.drag_drop_custom_display.textContent="test";var a=null===(r=document.querySelector("#".concat(t.target.id," .name")))||void 0===r?void 0:r.textContent;a=this.shortIndicatorNameStripped(a),n&&(a+=" (includes sub-questions)"),this.$refs.drag_drop_custom_display.textContent=a,t.dataTransfer.setDragImage(i,0,0)}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-5:5;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
                \n
                \n Loading... \n \n
                \n
                \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
                \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
                '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
                \n
                \n \n
                {{nameCharsRemaining}}
                \n
                \n \n
                \n \n
                {{descrCharsRemaining}}
                \n
                \n \n
                '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
                \n
                \n Loading...\n \n
                \n
                \n
                \n \n \n
                \n
                '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
                \n Move column left\n Move column right
                \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
                \n \n \n
                \n
                \n \n \n \n \n
                \n
                '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
                \n Special access restrictions\n
                \n This prevents anyone from reading stored data unless they\'re part of the following groups.
                \n If a group is assigned below, everyone else will see "[protected data]".\n
                \n \n
                {{ statusMessageError }}
                \n \n
                \n \n \n
                \n
                '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
                  ","
                1. ","
                  ","

                  ","","

                  ","

                  ","

                  ","

                  ","","
                  "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
                  \n
                  \n
                  \n \n \n \n \n
                  \n
                  \n \n \n
                  \n
                  \n
                  \n \n
                  \n \n \n
                  \n
                  \n

                  Format Information

                  \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
                  \n
                  \n
                  \n \n \n
                  \n
                  \n \n \n
                  \n
                  \n \n
                  \n
                  \n  Columns ({{gridJSON.length}}):\n
                  \n
                  \n \n \n
                  \n
                  \n
                  \n \n
                  \n
                  \n \n
                  \n
                  \n
                  \n Attributes\n
                  \n \n \n
                  \n \n
                  \n
                  \n \n
                  \n \n
                  \n \n This field will be archived.  It can be
                  re-enabled by using Restore Fields.\n
                  \n \n Deleted items can only be re-enabled
                  within 30 days by using Restore Fields.\n
                  \n
                  \n
                  '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
                  \n
                  Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
                  {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
                  {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
                  {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
                  \n
                  \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

                  \n
                  \n \n \n
                  \n
                  \n
                  \n \n \n
                  \n \n
                  \n
                  \n
                  \n Notice:
                  \n

                  Please go to LEAF Programmer\n to ensure continued access to this area.

                  \n
                  '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
                  \n
                  \n

                  Stapled forms will show up on the same page as the primary form.

                  \n

                  The order of the forms will be determined by the forms\' assigned sort values.

                  \n
                  \n
                    \n
                  • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
                  • \n
                  \n

                  \n
                  \n \n
                  There are no available forms to merge
                  \n
                  \n
                  '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
                  \n

                  What is this?

                  \n

                  With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

                  \n
                  \n

                  To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

                  \n
                  \n

                  The following groups can update {{formNameStripped()}} records at any time:

                  \n
                  \n
                  \n \n \n

                  \n
                  \n \n
                  There are no available groups to add
                  \n
                  \n
                  '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
                  \n
                  Are you sure you want to delete this form?
                  \n
                  {{formName}}
                  \n
                  {{formDescription}}
                  \n
                  ⚠️ This form still has stapled forms attached
                  \n
                  '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
                  \n \x3c!-- LOADING SPINNER --\x3e\n
                  \n Loading... \n
                  \n
                  \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
                  \n
                  \n
                  Choose Delete to remove this condition, or cancel to return to the editor
                  \n
                  {{ conditionOverviewText }}
                  \n
                  \n \n \n
                  \n
                  \n \n
                  \n
                  '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
                  \n

                  This is a Nationally Standardized Subordinate Site

                  \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
                  '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
                  \n \n \n\n \n\n \n\n \n\n \n\n \n \n
                  File Attachment(s)\n

                  Select File to attach:

                  \n \n
                  \n\n \n\n \n \n \n \n \n\n \n
                  '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
                  '.concat(this.formPage+1,"
                  "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
                  \n
                  \n \x3c!-- TOOLBAR --\x3e\n
                  \n\n
                  \n \n \n \n \n
                  \n \n \n \n 🔒\n ⛓️\n ⚙️\n
                  \n
                  \n
                  \n \x3c!-- NAME --\x3e\n
                  \n
                  \n
                  \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
                  '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","setIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'\n
                  \n\n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n
                  \n
                  \n \n
                  \n
                  \n \n \n
                  \n
                  \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
                    \n\n \n \n
                  \n
                  \n \n
                  \n
                  \n

                2. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
                  \n {{formID}}\n (internal for {{formParentID}})\n \n
                  \n \n \n \n \n \n
                  \n
                  \n
                  \n \n
                  \n \n
                  This is an Internal Form
                  \n
                  \n
                  '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},setIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID!==e&&(this.focusedIndicatorID=e)},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode&&o===this.focusedIndicatorID){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((null==e?void 0:e.offsetX)>=24||(null==e?void 0:e.offsetY)>=78)e.preventDefault();else if(!this.previewMode&&null!=e&&e.dataTransfer){e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id),e.target.classList.add("is_being_dragged");var t=null!==e.target.querySelector("ul > li");"80px"!==+e.target.style.height&&(e.target.style.height="80px");var o=document.getElementById("drag_drop_default_img_replacement");if(null!==o){var n,i=null===(n=document.querySelector("#".concat(e.target.id," .name")))||void 0===n?void 0:n.textContent;i=this.shortIndicatorNameStripped(i),t&&(i+=" (includes sub-questions)"),this.$refs.drag_drop_custom_display.textContent=i,e.dataTransfer.setDragImage(o,0,0)}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-5:5;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
                  \n
                  \n Loading... \n \n
                  \n
                  \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
                  \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
                  '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss index 115110ce4..d73e9cca4 100644 --- a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss +++ b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss @@ -515,18 +515,17 @@ table[class$="SelectorTable"] th { .move_question_container { @include flexcenter; - cursor: grab; position: absolute; - width: 1.375rem; + width: 1.5rem; left: 0; top: 0; flex-direction: column; - background-color: #f0f0f0; div.drag_question_handle { cursor: grab; + background-color: #f0f0f0; border-radius: 4px 0 0 0; - height: 42px; + height: 70px; width: 100%; left: 0; top: 0; @@ -540,18 +539,19 @@ table[class$="SelectorTable"] th { justify-content: center; } } - .focus_indicator_button { - margin-top: 2px; - color: $base-navy; - width: 100%; - border: 1px solid transparent; - border-top: 1px solid #d0d0d0; - border-radius: 0; - padding: 0 0 4px 0; + .click_to_move_options { + opacity: 0; + &.click_buttons_visible { + opacity: 1; + + .icon_move { + cursor: pointer; + } + } } .icon_move { @include flexcenter; - cursor: pointer; + cursor: auto; width: 0; height: 0; padding: 0; @@ -573,7 +573,7 @@ table[class$="SelectorTable"] th { } } &.down { - margin-top: 0.675rem; + margin-top: 0.625rem; border-top: 18px solid $BG-DarkNavy; border-bottom: 2px; &:disabled { @@ -636,7 +636,7 @@ table[class$="SelectorTable"] th { div.printResponse { position: relative; padding: 0; - padding-left: 1.375rem; + padding-left: 1.5rem; float: none; /* style.css style collision */ border-radius: 4px; background-color: white; @@ -657,6 +657,7 @@ table[class$="SelectorTable"] th { padding-left: 0; } &:not(.form-header):not(.preview) { + margin-left: 2px; border: 1px solid #c1c1c1; box-shadow: 1px 1px 2px 1px rgba(0,0,20,0.4); transition: box-shadow 0.5s; diff --git a/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js b/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js index a78e822b6..963212ce9 100644 --- a/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js +++ b/docker/vue-app/src/form_editor/components/form_editor_view/FormIndexListing.js @@ -20,7 +20,7 @@ export default { 'clearListItem', 'addToListTracker', 'previewMode', - 'toggleIndicatorFocus', + 'setIndicatorFocus', 'clickToMoveListItem', 'focusedIndicatorID', 'startDrag', @@ -56,35 +56,34 @@ export default { return this.currentListLength > 1; } }, - template:`
                3. + template:`
                4. - +
                  -
                  - -
                  +
                  diff --git a/docker/vue-app/src/form_editor/views/FormEditorView.js b/docker/vue-app/src/form_editor/views/FormEditorView.js index 6b47fa25f..29801ddb8 100644 --- a/docker/vue-app/src/form_editor/views/FormEditorView.js +++ b/docker/vue-app/src/form_editor/views/FormEditorView.js @@ -109,7 +109,7 @@ export default { editQuestion: this.editQuestion, clearListItem: this.clearListItem, addToListTracker: this.addToListTracker, - toggleIndicatorFocus: this.toggleIndicatorFocus, + setIndicatorFocus: this.setIndicatorFocus, startDrag: this.startDrag, endDrag: this.endDrag, handleOnDragCustomizations: this.handleOnDragCustomizations, @@ -539,8 +539,10 @@ export default { /** * @param {Number|null} nodeID indicatorID of the form section selected in the Form Index */ - toggleIndicatorFocus(nodeID = null) { - this.focusedIndicatorID = this.focusedIndicatorID !== nodeID ? nodeID : null; + setIndicatorFocus(nodeID = null) { + if (this.focusedIndicatorID !== nodeID) { + this.focusedIndicatorID = nodeID + } }, /** * switch between edit and preview mode @@ -565,7 +567,7 @@ export default { * @param {boolean} moveup click/enter moves the item up (false moves it down) */ clickToMoveListItem(event = {}, indID = 0, moveup = false) { - if(!this.previewMode) { + if(!this.previewMode && indID === this.focusedIndicatorID) { if (event?.keyCode === 32) event.preventDefault(); this.ariaStatusFormDisplay = ''; this.focusAfterFormUpdateSelector = '#' + event?.target?.id || ''; @@ -671,9 +673,7 @@ export default { }, startDrag(event = {}) { //restrict action to bounds of visual drag indicator tab - const classList = event?.target?.classList || []; - const dragLimitX = classList.contains('subindicator_heading') ? 30 : 24; - if (event?.offsetX > dragLimitX || event?.offsetY >= 48) { + if (event?.offsetX >= 24 || event?.offsetY >= 78) { event.preventDefault(); } else { if(!this.previewMode && event?.dataTransfer) { @@ -688,7 +688,6 @@ export default { } const elReplacementImg = document.getElementById(`drag_drop_default_img_replacement`); if(elReplacementImg !== null) { - this.$refs.drag_drop_custom_display.textContent = "test"; let text = document.querySelector(`#${event.target.id} .name`)?.textContent; text = this.shortIndicatorNameStripped(text); if (targetHasSublist) { From e6515e91f2db45337877184f66b93e39fd072273 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Wed, 20 Nov 2024 16:23:23 -0500 Subject: [PATCH 18/37] LEAF 4435 drop zone spacer behavior, classes and styles, index size drag-drop troubleshooting --- .../vue-dest/form_editor/LEAF_FormEditor.css | 2 +- .../form_editor/form-editor-view.chunk.js | 2 +- .../src/form_editor/LEAF_FormEditor.scss | 19 +++++ .../src/form_editor/views/FormEditorView.js | 70 +++++++++++++++---- 4 files changed, 78 insertions(+), 15 deletions(-) diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css index 4ca672d2f..d554b619e 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css @@ -1 +1 @@ -body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.75rem 1rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22)}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0;border-radius:3px}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container{display:flex;justify-content:center;align-items:center;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle{cursor:grab;background-color:#f0f0f0;border-radius:4px 0 0 0;height:70px;width:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle .icon_drag{opacity:.4;font-size:16px;display:flex;justify-content:center}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options{opacity:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options.click_buttons_visible{opacity:1}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options.click_buttons_visible .icon_move{cursor:pointer}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:auto;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up{margin-top:.375rem;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.5rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:2px;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} +body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.75rem 1rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22);box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset;outline:2px solid #2491ff;border-radius:3px}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] ul.add_drop_style{height:80px;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset;outline:2px solid #2491ff;margin-bottom:.5rem}#form_entry_and_preview ul[id^=base_drop_area] ul.add_drop_style_last{margin-bottom:.5rem}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0;border-radius:3px}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container{display:flex;justify-content:center;align-items:center;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle{cursor:grab;background-color:#f0f0f0;border-radius:4px 0 0 0;height:70px;width:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle .icon_drag{opacity:.4;font-size:16px;display:flex;justify-content:center}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options{opacity:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options.click_buttons_visible{opacity:1}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options.click_buttons_visible .icon_move{cursor:pointer}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:auto;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up{margin-top:.375rem;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area] li.add_drop_style{margin-top:80px}#form_entry_and_preview ul[id^=base_drop_area] li.add_drop_style_last{margin-bottom:80px}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.5rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:2px;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index a2df85a2f..a4be22988 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
                  \n
                  \n \n
                  {{nameCharsRemaining}}
                  \n
                  \n \n
                  \n \n
                  {{descrCharsRemaining}}
                  \n
                  \n \n
                  '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
                  \n
                  \n Loading...\n \n
                  \n
                  \n
                  \n \n \n
                  \n
                  '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
                  \n Move column left\n Move column right
                  \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
                  \n \n \n
                  \n
                  \n \n \n \n \n
                  \n
                  '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
                  \n Special access restrictions\n
                  \n This prevents anyone from reading stored data unless they\'re part of the following groups.
                  \n If a group is assigned below, everyone else will see "[protected data]".\n
                  \n \n
                  {{ statusMessageError }}
                  \n \n
                  \n \n \n
                  \n
                  '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
                    ","
                  1. ","
                    ","

                    ","","

                    ","

                    ","

                    ","

                    ","","
                    "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
                    \n
                    \n
                    \n \n \n \n \n
                    \n
                    \n \n \n
                    \n
                    \n
                    \n \n
                    \n \n \n
                    \n
                    \n

                    Format Information

                    \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
                    \n
                    \n
                    \n \n \n
                    \n
                    \n \n \n
                    \n
                    \n \n
                    \n
                    \n  Columns ({{gridJSON.length}}):\n
                    \n
                    \n \n \n
                    \n
                    \n
                    \n \n
                    \n
                    \n \n
                    \n
                    \n
                    \n Attributes\n
                    \n \n \n
                    \n \n
                    \n
                    \n \n
                    \n \n
                    \n \n This field will be archived.  It can be
                    re-enabled by using Restore Fields.\n
                    \n \n Deleted items can only be re-enabled
                    within 30 days by using Restore Fields.\n
                    \n
                    \n
                    '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
                    \n
                    Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
                    {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
                    {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
                    {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
                    \n
                    \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

                    \n
                    \n \n \n
                    \n
                    \n
                    \n \n \n
                    \n \n
                    \n
                    \n
                    \n Notice:
                    \n

                    Please go to LEAF Programmer\n to ensure continued access to this area.

                    \n
                    '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
                    \n
                    \n

                    Stapled forms will show up on the same page as the primary form.

                    \n

                    The order of the forms will be determined by the forms\' assigned sort values.

                    \n
                    \n
                      \n
                    • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
                    • \n
                    \n

                    \n
                    \n \n
                    There are no available forms to merge
                    \n
                    \n
                    '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
                    \n

                    What is this?

                    \n

                    With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

                    \n
                    \n

                    To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

                    \n
                    \n

                    The following groups can update {{formNameStripped()}} records at any time:

                    \n
                    \n
                    \n \n \n

                    \n
                    \n \n
                    There are no available groups to add
                    \n
                    \n
                    '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
                    \n
                    Are you sure you want to delete this form?
                    \n
                    {{formName}}
                    \n
                    {{formDescription}}
                    \n
                    ⚠️ This form still has stapled forms attached
                    \n
                    '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
                    \n \x3c!-- LOADING SPINNER --\x3e\n
                    \n Loading... \n
                    \n
                    \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
                    \n
                    \n
                    Choose Delete to remove this condition, or cancel to return to the editor
                    \n
                    {{ conditionOverviewText }}
                    \n
                    \n \n \n
                    \n
                    \n \n
                    \n
                    '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
                    \n

                    This is a Nationally Standardized Subordinate Site

                    \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n

                  '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
                  \n \n \n\n \n\n \n\n \n\n \n\n \n \n
                  File Attachment(s)\n

                  Select File to attach:

                  \n \n
                  \n\n \n\n \n \n \n \n \n\n \n
                  '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
                  '.concat(this.formPage+1,"
                  "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
                  \n
                  \n \x3c!-- TOOLBAR --\x3e\n
                  \n\n
                  \n \n \n \n \n
                  \n \n \n \n 🔒\n ⛓️\n ⚙️\n
                  \n
                  \n
                  \n \x3c!-- NAME --\x3e\n
                  \n
                  \n
                  \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
                  '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","setIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'\n
                  \n\n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n
                  \n
                  \n \n
                  \n
                  \n \n \n
                  \n
                  \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
                    \n\n \n \n
                  \n
                  \n \n
                  \n
                  \n
                5. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
                  \n {{formID}}\n (internal for {{formParentID}})\n \n
                  \n \n \n \n \n \n
                  \n
                  \n
                  \n \n
                  \n \n
                  This is an Internal Form
                  \n
                  \n
                  '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#drop_area_parent_".concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},setIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID!==e&&(this.focusedIndicatorID=e)},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode&&o===this.focusedIndicatorID){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("index_listing_".concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((null==e?void 0:e.offsetX)>=24||(null==e?void 0:e.offsetY)>=78)e.preventDefault();else if(!this.previewMode&&null!=e&&e.dataTransfer){e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id),e.target.classList.add("is_being_dragged");var t=null!==e.target.querySelector("ul > li");"80px"!==+e.target.style.height&&(e.target.style.height="80px");var o=document.getElementById("drag_drop_default_img_replacement");if(null!==o){var n,i=null===(n=document.querySelector("#".concat(e.target.id," .name")))||void 0===n?void 0:n.textContent;i=this.shortIndicatorNameStripped(i),t&&(i+=" (includes sub-questions)"),this.$refs.drag_drop_custom_display.textContent=i,e.dataTransfer.setDragImage(o,0,0)}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-5:5;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.add("entered-drop-zone")},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
                  \n
                  \n Loading... \n \n
                  \n
                  \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
                  \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
                  '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
                  \n
                  \n \n
                  {{nameCharsRemaining}}
                  \n
                  \n \n
                  \n \n
                  {{descrCharsRemaining}}
                  \n
                  \n \n
                  '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
                  \n
                  \n Loading...\n \n
                  \n
                  \n
                  \n \n \n
                  \n
                  '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
                  \n Move column left\n Move column right
                  \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
                  \n \n \n
                  \n
                  \n \n \n \n \n
                  \n
                  '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
                  \n Special access restrictions\n
                  \n This prevents anyone from reading stored data unless they\'re part of the following groups.
                  \n If a group is assigned below, everyone else will see "[protected data]".\n
                  \n \n
                  {{ statusMessageError }}
                  \n \n
                  \n \n \n
                  \n
                  '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
                    ","
                  1. ","
                    ","

                    ","","

                    ","

                    ","

                    ","

                    ","","
                    "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
                    \n
                    \n
                    \n \n \n \n \n
                    \n
                    \n \n \n
                    \n
                    \n
                    \n \n
                    \n \n \n
                    \n
                    \n

                    Format Information

                    \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
                    \n
                    \n
                    \n \n \n
                    \n
                    \n \n \n
                    \n
                    \n \n
                    \n
                    \n  Columns ({{gridJSON.length}}):\n
                    \n
                    \n \n \n
                    \n
                    \n
                    \n \n
                    \n
                    \n \n
                    \n
                    \n
                    \n Attributes\n
                    \n \n \n
                    \n \n
                    \n
                    \n \n
                    \n \n
                    \n \n This field will be archived.  It can be
                    re-enabled by using Restore Fields.\n
                    \n \n Deleted items can only be re-enabled
                    within 30 days by using Restore Fields.\n
                    \n
                    \n
                    '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
                    \n
                    Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
                    {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
                    {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
                    {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
                    \n
                    \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

                    \n
                    \n \n \n
                    \n
                    \n
                    \n \n \n
                    \n \n
                    \n
                    \n
                    \n Notice:
                    \n

                    Please go to LEAF Programmer\n to ensure continued access to this area.

                    \n
                    '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
                    \n
                    \n

                    Stapled forms will show up on the same page as the primary form.

                    \n

                    The order of the forms will be determined by the forms\' assigned sort values.

                    \n
                    \n
                      \n
                    • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
                    • \n
                    \n

                    \n
                    \n \n
                    There are no available forms to merge
                    \n
                    \n
                    '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
                    \n

                    What is this?

                    \n

                    With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

                    \n
                    \n

                    To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

                    \n
                    \n

                    The following groups can update {{formNameStripped()}} records at any time:

                    \n
                    \n
                    \n \n \n

                    \n
                    \n \n
                    There are no available groups to add
                    \n
                    \n
                    '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
                    \n
                    Are you sure you want to delete this form?
                    \n
                    {{formName}}
                    \n
                    {{formDescription}}
                    \n
                    ⚠️ This form still has stapled forms attached
                    \n
                    '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
                    \n \x3c!-- LOADING SPINNER --\x3e\n
                    \n Loading... \n
                    \n
                    \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
                    \n
                    \n
                    Choose Delete to remove this condition, or cancel to return to the editor
                    \n
                    {{ conditionOverviewText }}
                    \n
                    \n \n \n
                    \n
                    \n \n
                    \n
                    '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
                    \n

                    This is a Nationally Standardized Subordinate Site

                    \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
                    '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
                    \n \n \n\n \n\n \n\n \n\n \n\n \n \n
                    File Attachment(s)\n

                    Select File to attach:

                    \n \n
                    \n\n \n\n \n \n \n \n \n\n \n
                    '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
                    '.concat(this.formPage+1,"
                    "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
                    \n
                    \n \x3c!-- TOOLBAR --\x3e\n
                    \n\n
                    \n \n \n \n \n
                    \n \n \n \n 🔒\n ⛓️\n ⚙️\n
                    \n
                    \n
                    \n \x3c!-- NAME --\x3e\n
                    \n
                    \n
                    \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
                    '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","setIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'\n
                    \n\n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n
                    \n
                    \n \n
                    \n
                    \n \n \n
                    \n
                    \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
                      \n\n \n \n
                    \n
                    \n \n
                    \n
                    \n

                  2. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
                    \n {{formID}}\n (internal for {{formParentID}})\n \n
                    \n \n \n \n \n \n
                    \n
                    \n
                    \n \n
                    \n \n
                    This is an Internal Form
                    \n
                    \n
                    '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#".concat(this.dragUL_Prefix).concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},setIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID!==e&&(this.focusedIndicatorID=e)},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode&&o===this.focusedIndicatorID){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("".concat(this.dragLI_Prefix).concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((null==e?void 0:e.offsetX)>25||(null==e?void 0:e.offsetY)>78)e.preventDefault();else if(!this.previewMode&&null!=e&&e.dataTransfer){e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id),e.target.style.height="80px",e.target.classList.add("is_being_dragged");var t=document.getElementById("drag_drop_default_img_replacement");if(null!==t){var o;e.dataTransfer.setDragImage(t,0,0);var n=null===(o=document.querySelector("#".concat(e.target.id," .name")))||void 0===o?void 0:o.textContent;n=this.shortIndicatorNameStripped(n),null!==e.target.querySelector("ul > li")&&(n+=" (includes sub-questions)"),this.$refs.drag_drop_custom_display.textContent=n,this.draggedElID=e.target.id}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-4:4;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Array.from(document.querySelectorAll("#base_drop_area_".concat(this.focusedFormID,' li[id^="').concat(this.dragLI_Prefix,'"],\n #base_drop_area_').concat(this.focusedFormID,' ul[id^="').concat(this.dragUL_Prefix,'"]'))).forEach((function(e){e.classList.remove("add_drop_style"),e.classList.remove("add_drop_style_last")})),null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")){var o,n=Array.from(t.target.querySelectorAll("#"+t.target.id+"> li")),i=t.target.getBoundingClientRect().top,r=document.getElementById(this.draggedElID),a=n.indexOf(r),l=n.find((function(e){return t.clientY-i<=e.offsetTop+e.offsetHeight/2}))||null,s=a>-1,c=this.draggedElID===(null==l?void 0:l.id),d=s&&(null===l&&n.length-1===a||null!==l&&(null==n||null===(o=n[n.indexOf(r)+1])||void 0===o?void 0:o.id)===(null==l?void 0:l.id));c||d||(t.target.classList.add("entered-drop-zone"),0===n.length?t.target.classList.add("add_drop_style"):null!==l?l.classList.add("add_drop_style"):(n[n.length-1].classList.add("add_drop_style_last"),t.target.classList.add("add_drop_style_last")))}},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
                    \n
                    \n Loading... \n \n
                    \n
                    \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
                    \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
                    '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss index d73e9cca4..150faf4ee 100644 --- a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss +++ b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss @@ -491,6 +491,9 @@ table[class$="SelectorTable"] th { padding: 1px 0; //top and bottom padding needed for drop area visibility &.entered-drop-zone, ul.entered-drop-zone { background-color: rgba(0,0,25,0.22); + box-shadow: 2px 2px 4px 1px rgba(0,0,25,0.3) inset; + outline: 2px solid $LEAF_CSS_outline; + border-radius: 3px; } ul[id^="drop_area_parent_"] { position: relative; @@ -502,6 +505,16 @@ table[class$="SelectorTable"] th { background-clip: content-box; min-height: 10px; } + ul.add_drop_style { + height: 80px; + border-radius: 3px; + box-shadow: 2px 2px 4px 1px rgba(0,0,25,0.3) inset; + outline: 2px solid $LEAF_CSS_outline; + margin-bottom: 0.5rem; + } + ul.add_drop_style_last { + margin-bottom: 0.5rem; + } li { position: relative; margin: 0.5rem 0; @@ -598,6 +611,12 @@ table[class$="SelectorTable"] th { display: none } } + &.add_drop_style { + margin-top: 80px; + } + &.add_drop_style_last { + margin-bottom: 80px; + } } > li { background-color: white; diff --git a/docker/vue-app/src/form_editor/views/FormEditorView.js b/docker/vue-app/src/form_editor/views/FormEditorView.js index 29801ddb8..987957168 100644 --- a/docker/vue-app/src/form_editor/views/FormEditorView.js +++ b/docker/vue-app/src/form_editor/views/FormEditorView.js @@ -21,6 +21,7 @@ export default { return { dragLI_Prefix: 'index_listing_', dragUL_Prefix: 'drop_area_parent_', + draggedElID: '', listTracker: {}, previewMode: false, sortOffset: 128, //number to subtract from listindex when comparing or updating sort values @@ -499,7 +500,7 @@ export default { * @param {number|null} parentID of the new subquestion. null for new sections. */ newQuestion(parentID = null) { - const parentUl = parentID === null ? `ul#base_drop_area_${this.focusedFormID}` : `ul#drop_area_parent_${parentID}`; + const parentUl = parentID === null ? `ul#base_drop_area_${this.focusedFormID}` : `ul#${this.dragUL_Prefix}${parentID}`; this.focusAfterFormUpdateSelector = `${parentUl} > li:last-child button[id^="edit_indicator"]`; this.openIndicatorEditingDialog(null, parentID, {}); this.focusedIndicatorID = null; @@ -572,7 +573,7 @@ export default { this.ariaStatusFormDisplay = ''; this.focusAfterFormUpdateSelector = '#' + event?.target?.id || ''; const parentEl = event?.currentTarget?.closest('ul'); - const elToMove = document.getElementById(`index_listing_${indID}`); + const elToMove = document.getElementById(`${this.dragLI_Prefix}${indID}`); const oldElsLI = Array.from(document.querySelectorAll(`#${parentEl.id} > li`)); const newElsLI = oldElsLI.filter(li => li !== elToMove); const listitem = this.listTracker[indID]; @@ -583,7 +584,7 @@ export default { newElsLI.splice(oldIndex + spliceLoc, 0, elToMove); oldElsLI.forEach(li => parentEl.removeChild(li)); newElsLI.forEach((li, i) => { - const liIndID = parseInt(li.id.replace('index_listing_', '')); + const liIndID = parseInt(li.id.replace(this.dragLI_Prefix, '')); parentEl.appendChild(li); this.listTracker[liIndID].listIndex = i; }); @@ -673,28 +674,27 @@ export default { }, startDrag(event = {}) { //restrict action to bounds of visual drag indicator tab - if (event?.offsetX >= 24 || event?.offsetY >= 78) { + if (event?.offsetX > 25 || event?.offsetY > 78) { event.preventDefault(); } else { if(!this.previewMode && event?.dataTransfer) { event.dataTransfer.dropEffect = 'move'; event.dataTransfer.effectAllowed = 'move'; event.dataTransfer.setData('text/plain', event.target.id); + event.target.style.height = '80px'; event.target.classList.add("is_being_dragged"); - const targetHasSublist = event.target.querySelector('ul > li') !== null; - if(+event.target.style.height !== '80px') { - event.target.style.height = '80px'; - } const elReplacementImg = document.getElementById(`drag_drop_default_img_replacement`); if(elReplacementImg !== null) { + event.dataTransfer.setDragImage(elReplacementImg, 0, 0); let text = document.querySelector(`#${event.target.id} .name`)?.textContent; text = this.shortIndicatorNameStripped(text); + const targetHasSublist = event.target.querySelector('ul > li') !== null; if (targetHasSublist) { text += ' (includes sub-questions)'; } this.$refs.drag_drop_custom_display.textContent = text; - event.dataTransfer.setDragImage(elReplacementImg, 0, 0); + this.draggedElID = event.target.id; } } } @@ -714,7 +714,7 @@ export default { const scrollBuffer = 75; const y = +event?.clientY; if (y < scrollBuffer || y > window.innerHeight - scrollBuffer) { - const scrollIncrement = 5; + const scrollIncrement = 4; const sX = window.scrollX; const sY = window.scrollY; const increment = y < scrollBuffer ? -scrollIncrement : scrollIncrement; @@ -782,8 +782,52 @@ export default { * @param {Object} event adds the drop zone hilite if target is ul */ onDragEnter(event = {}) { - if(event?.dataTransfer && event.dataTransfer.effectAllowed === 'move' && event?.target?.classList.contains('form-index-listing-ul')){ - event.target.classList.add('entered-drop-zone'); + //remove possible padding classes + let prevEls = Array.from(document.querySelectorAll( + `#base_drop_area_${this.focusedFormID} li[id^="${this.dragLI_Prefix}"], + #base_drop_area_${this.focusedFormID} ul[id^="${this.dragUL_Prefix}"]` + ) + ); + prevEls.forEach(li => { + li.classList.remove('add_drop_style'); + li.classList.remove('add_drop_style_last'); + }); + if(event?.dataTransfer && event.dataTransfer.effectAllowed === 'move' && event?.target?.classList.contains('form-index-listing-ul')) { + let dropTargetDirectLIs = Array.from(event.target.querySelectorAll('#' + event.target.id + '> li')); + + const ulTop = event.target.getBoundingClientRect().top; + const draggedLi = document.getElementById(this.draggedElID); + const draggedLiIndex = dropTargetDirectLIs.indexOf(draggedLi); + const closestLi = dropTargetDirectLIs.find(item => event.clientY - ulTop <= item.offsetTop + item.offsetHeight/2) || null; + const isSameList = draggedLiIndex > -1; + const isDirectlyAboveCurrentLocation = this.draggedElID === closestLi?.id; + const isDirectlyBelowCurrentLocation = + isSameList && + ( + //at the end and the dragged item is last + closestLi === null && dropTargetDirectLIs.length - 1 === draggedLiIndex + || + //next li is immediately next to the dragged one + closestLi !== null && + dropTargetDirectLIs?.[dropTargetDirectLIs.indexOf(draggedLi) + 1]?.id === closestLi?.id + ) + + //don't bother doing anything further if it's in the same location + if (!isDirectlyAboveCurrentLocation && !isDirectlyBelowCurrentLocation) { + event.target.classList.add('entered-drop-zone'); + if(dropTargetDirectLIs.length === 0) { //no items in this list - add class to target (UL) + event.target.classList.add('add_drop_style'); + } else { //add class to closest LI + if (closestLi !== null) { + closestLi.classList.add('add_drop_style'); + } else { + //element is at bottom of list + let lastLI = dropTargetDirectLIs[dropTargetDirectLIs.length - 1] + lastLI.classList.add('add_drop_style_last'); + event.target.classList.add('add_drop_style_last'); + } + } + } } }, /** @@ -947,7 +991,7 @@ export default { @dragleave="onDragLeave"> Date: Wed, 20 Nov 2024 17:37:19 -0500 Subject: [PATCH 19/37] LEAF 4435 programmatically define form display min height when dragging --- app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js | 2 +- docker/vue-app/src/form_editor/views/FormEditorView.js | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index a4be22988..2b0b61dd7 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
                    \n
                    \n \n
                    {{nameCharsRemaining}}
                    \n
                    \n \n
                    \n \n
                    {{descrCharsRemaining}}
                    \n
                    \n \n
                    '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
                    \n
                    \n Loading...\n \n
                    \n
                    \n
                    \n \n \n
                    \n
                    '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
                    \n Move column left\n Move column right
                    \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
                    \n \n \n
                    \n
                    \n \n \n \n \n
                    \n
                    '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
                    \n Special access restrictions\n
                    \n This prevents anyone from reading stored data unless they\'re part of the following groups.
                    \n If a group is assigned below, everyone else will see "[protected data]".\n
                    \n \n
                    {{ statusMessageError }}
                    \n \n
                    \n \n \n
                    \n
                    '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
                      ","
                    1. ","
                      ","

                      ","","

                      ","

                      ","

                      ","

                      ","","
                      "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
                      \n
                      \n
                      \n \n \n \n \n
                      \n
                      \n \n \n
                      \n
                      \n
                      \n \n
                      \n \n \n
                      \n
                      \n

                      Format Information

                      \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
                      \n
                      \n
                      \n \n \n
                      \n
                      \n \n \n
                      \n
                      \n \n
                      \n
                      \n  Columns ({{gridJSON.length}}):\n
                      \n
                      \n \n \n
                      \n
                      \n
                      \n \n
                      \n
                      \n \n
                      \n
                      \n
                      \n Attributes\n
                      \n \n \n
                      \n \n
                      \n
                      \n \n
                      \n \n
                      \n \n This field will be archived.  It can be
                      re-enabled by using Restore Fields.\n
                      \n \n Deleted items can only be re-enabled
                      within 30 days by using Restore Fields.\n
                      \n
                      \n
                      '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
                      \n
                      Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
                      {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
                      {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
                      {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
                      \n
                      \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

                      \n
                      \n \n \n
                      \n
                      \n
                      \n \n \n
                      \n \n
                      \n
                      \n
                      \n Notice:
                      \n

                      Please go to LEAF Programmer\n to ensure continued access to this area.

                      \n
                      '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
                      \n
                      \n

                      Stapled forms will show up on the same page as the primary form.

                      \n

                      The order of the forms will be determined by the forms\' assigned sort values.

                      \n
                      \n
                        \n
                      • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
                      • \n
                      \n

                      \n
                      \n \n
                      There are no available forms to merge
                      \n
                      \n
                      '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
                      \n

                      What is this?

                      \n

                      With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

                      \n
                      \n

                      To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

                      \n
                      \n

                      The following groups can update {{formNameStripped()}} records at any time:

                      \n
                      \n
                      \n \n \n

                      \n
                      \n \n
                      There are no available groups to add
                      \n
                      \n
                      '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
                      \n
                      Are you sure you want to delete this form?
                      \n
                      {{formName}}
                      \n
                      {{formDescription}}
                      \n
                      ⚠️ This form still has stapled forms attached
                      \n
                      '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
                      \n \x3c!-- LOADING SPINNER --\x3e\n
                      \n Loading... \n
                      \n
                      \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
                      \n
                      \n
                      Choose Delete to remove this condition, or cancel to return to the editor
                      \n
                      {{ conditionOverviewText }}
                      \n
                      \n \n \n
                      \n
                      \n \n
                      \n
                      '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
                      \n

                      This is a Nationally Standardized Subordinate Site

                      \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
                      '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
                      \n \n \n\n \n\n \n\n \n\n \n\n \n \n
                      File Attachment(s)\n

                      Select File to attach:

                      \n \n
                      \n\n \n\n \n \n \n \n \n\n \n
                      '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
                      '.concat(this.formPage+1,"
                      "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
                      \n
                      \n \x3c!-- TOOLBAR --\x3e\n
                      \n\n
                      \n \n \n \n \n
                      \n \n \n \n 🔒\n ⛓️\n ⚙️\n
                      \n
                      \n
                      \n \x3c!-- NAME --\x3e\n
                      \n
                      \n
                      \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
                      '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","setIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'\n
                      \n\n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n
                      \n
                      \n \n
                      \n
                      \n \n \n
                      \n
                      \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
                        \n\n \n \n
                      \n
                      \n \n
                      \n
                      \n

                    2. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
                      \n {{formID}}\n (internal for {{formParentID}})\n \n
                      \n \n \n \n \n \n
                      \n
                      \n
                      \n \n
                      \n \n
                      This is an Internal Form
                      \n
                      \n
                      '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function P(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(P({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(P({},t.categories[i]));o.push(P(P({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(P(P({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(P({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=P(P({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#".concat(this.dragUL_Prefix).concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},setIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID!==e&&(this.focusedIndicatorID=e)},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode&&o===this.focusedIndicatorID){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("".concat(this.dragLI_Prefix).concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=P({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((null==e?void 0:e.offsetX)>25||(null==e?void 0:e.offsetY)>78)e.preventDefault();else if(!this.previewMode&&null!=e&&e.dataTransfer){e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id),e.target.style.height="80px",e.target.classList.add("is_being_dragged");var t=document.getElementById("drag_drop_default_img_replacement");if(null!==t){var o;e.dataTransfer.setDragImage(t,0,0);var n=null===(o=document.querySelector("#".concat(e.target.id," .name")))||void 0===o?void 0:o.textContent;n=this.shortIndicatorNameStripped(n),null!==e.target.querySelector("ul > li")&&(n+=" (includes sub-questions)"),this.$refs.drag_drop_custom_display.textContent=n,this.draggedElID=e.target.id}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-4:4;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Array.from(document.querySelectorAll("#base_drop_area_".concat(this.focusedFormID,' li[id^="').concat(this.dragLI_Prefix,'"],\n #base_drop_area_').concat(this.focusedFormID,' ul[id^="').concat(this.dragUL_Prefix,'"]'))).forEach((function(e){e.classList.remove("add_drop_style"),e.classList.remove("add_drop_style_last")})),null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")){var o,n=Array.from(t.target.querySelectorAll("#"+t.target.id+"> li")),i=t.target.getBoundingClientRect().top,r=document.getElementById(this.draggedElID),a=n.indexOf(r),l=n.find((function(e){return t.clientY-i<=e.offsetTop+e.offsetHeight/2}))||null,s=a>-1,c=this.draggedElID===(null==l?void 0:l.id),d=s&&(null===l&&n.length-1===a||null!==l&&(null==n||null===(o=n[n.indexOf(r)+1])||void 0===o?void 0:o.id)===(null==l?void 0:l.id));c||d||(t.target.classList.add("entered-drop-zone"),0===n.length?t.target.classList.add("add_drop_style"):null!==l?l.classList.add("add_drop_style"):(n[n.length-1].classList.add("add_drop_style_last"),t.target.classList.add("add_drop_style_last")))}},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
                      \n
                      \n Loading... \n \n
                      \n
                      \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
                      \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
                      '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
                      \n
                      \n \n
                      {{nameCharsRemaining}}
                      \n
                      \n \n
                      \n \n
                      {{descrCharsRemaining}}
                      \n
                      \n \n
                      '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
                      \n
                      \n Loading...\n \n
                      \n
                      \n
                      \n \n \n
                      \n
                      '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
                      \n Move column left\n Move column right
                      \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
                      \n \n \n
                      \n
                      \n \n \n \n \n
                      \n
                      '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
                      \n Special access restrictions\n
                      \n This prevents anyone from reading stored data unless they\'re part of the following groups.
                      \n If a group is assigned below, everyone else will see "[protected data]".\n
                      \n \n
                      {{ statusMessageError }}
                      \n \n
                      \n \n \n
                      \n
                      '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
                        ","
                      1. ","
                        ","

                        ","","

                        ","

                        ","

                        ","

                        ","","
                        "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
                        \n
                        \n
                        \n \n \n \n \n
                        \n
                        \n \n \n
                        \n
                        \n
                        \n \n
                        \n \n \n
                        \n
                        \n

                        Format Information

                        \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
                        \n
                        \n
                        \n \n \n
                        \n
                        \n \n \n
                        \n
                        \n \n
                        \n
                        \n  Columns ({{gridJSON.length}}):\n
                        \n
                        \n \n \n
                        \n
                        \n
                        \n \n
                        \n
                        \n \n
                        \n
                        \n
                        \n Attributes\n
                        \n \n \n
                        \n \n
                        \n
                        \n \n
                        \n \n
                        \n \n This field will be archived.  It can be
                        re-enabled by using Restore Fields.\n
                        \n \n Deleted items can only be re-enabled
                        within 30 days by using Restore Fields.\n
                        \n
                        \n
                        '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
                        \n
                        Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
                        {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
                        {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
                        {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
                        \n
                        \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

                        \n
                        \n \n \n
                        \n
                        \n
                        \n \n \n
                        \n \n
                        \n
                        \n
                        \n Notice:
                        \n

                        Please go to LEAF Programmer\n to ensure continued access to this area.

                        \n
                        '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
                        \n
                        \n

                        Stapled forms will show up on the same page as the primary form.

                        \n

                        The order of the forms will be determined by the forms\' assigned sort values.

                        \n
                        \n
                          \n
                        • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
                        • \n
                        \n

                        \n
                        \n \n
                        There are no available forms to merge
                        \n
                        \n
                        '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
                        \n

                        What is this?

                        \n

                        With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

                        \n
                        \n

                        To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

                        \n
                        \n

                        The following groups can update {{formNameStripped()}} records at any time:

                        \n
                        \n
                        \n \n \n

                        \n
                        \n \n
                        There are no available groups to add
                        \n
                        \n
                        '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
                        \n
                        Are you sure you want to delete this form?
                        \n
                        {{formName}}
                        \n
                        {{formDescription}}
                        \n
                        ⚠️ This form still has stapled forms attached
                        \n
                        '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
                        \n \x3c!-- LOADING SPINNER --\x3e\n
                        \n Loading... \n
                        \n
                        \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
                        \n
                        \n
                        Choose Delete to remove this condition, or cancel to return to the editor
                        \n
                        {{ conditionOverviewText }}
                        \n
                        \n \n \n
                        \n
                        \n \n
                        \n
                        '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
                        \n

                        This is a Nationally Standardized Subordinate Site

                        \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
                        '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
                        \n \n \n\n \n\n \n\n \n\n \n\n \n \n
                        File Attachment(s)\n

                        Select File to attach:

                        \n \n
                        \n\n \n\n \n \n \n \n \n\n \n
                        '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
                        '.concat(this.formPage+1,"
                        "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
                        \n
                        \n \x3c!-- TOOLBAR --\x3e\n
                        \n\n
                        \n \n \n \n \n
                        \n \n \n \n 🔒\n ⛓️\n ⚙️\n
                        \n
                        \n
                        \n \x3c!-- NAME --\x3e\n
                        \n
                        \n
                        \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
                        '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","setIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'\n
                        \n\n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n
                        \n
                        \n \n
                        \n
                        \n \n \n
                        \n
                        \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
                          \n\n \n \n
                        \n
                        \n \n
                        \n
                        \n

                      2. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
                        \n {{formID}}\n (internal for {{formParentID}})\n \n
                        \n \n \n \n \n \n
                        \n
                        \n
                        \n \n
                        \n \n
                        This is an Internal Form
                        \n
                        \n
                        '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#".concat(this.dragUL_Prefix).concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},setIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID!==e&&(this.focusedIndicatorID=e)},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode&&o===this.focusedIndicatorID){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("".concat(this.dragLI_Prefix).concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((null==e?void 0:e.offsetX)>25||(null==e?void 0:e.offsetY)>78)e.preventDefault();else if(!this.previewMode&&null!=e&&e.dataTransfer){e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id);var t=document.getElementById("form_entry_and_preview"),o=+t.getBoundingClientRect().height.toFixed(0);t.style.minHeight=o+"px",e.target.style.height="80px",e.target.classList.add("is_being_dragged");var n=document.getElementById("drag_drop_default_img_replacement");if(null!==n){var i;e.dataTransfer.setDragImage(n,0,0);var r=null===(i=document.querySelector("#".concat(e.target.id," .name")))||void 0===i?void 0:i.textContent;r=this.shortIndicatorNameStripped(r),null!==e.target.querySelector("ul > li")&&(r+=" (includes sub-questions)"),this.$refs.drag_drop_custom_display.textContent=r,this.draggedElID=e.target.id}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-4:4;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Array.from(document.querySelectorAll("#base_drop_area_".concat(this.focusedFormID,' li[id^="').concat(this.dragLI_Prefix,'"],\n #base_drop_area_').concat(this.focusedFormID,' ul[id^="').concat(this.dragUL_Prefix,'"]'))).forEach((function(e){e.classList.remove("add_drop_style"),e.classList.remove("add_drop_style_last")})),null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")){var o,n=Array.from(t.target.querySelectorAll("#"+t.target.id+"> li")),i=t.target.getBoundingClientRect().top,r=document.getElementById(this.draggedElID),a=n.indexOf(r),l=n.find((function(e){return t.clientY-i<=e.offsetTop+e.offsetHeight/2}))||null,s=a>-1,c=this.draggedElID===(null==l?void 0:l.id),d=s&&(null===l&&n.length-1===a||null!==l&&(null==n||null===(o=n[n.indexOf(r)+1])||void 0===o?void 0:o.id)===(null==l?void 0:l.id));c||d||(t.target.classList.add("entered-drop-zone"),0===n.length?t.target.classList.add("add_drop_style"):null!==l?l.classList.add("add_drop_style"):(n[n.length-1].classList.add("add_drop_style_last"),t.target.classList.add("add_drop_style_last")))}},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
                        \n
                        \n Loading... \n \n
                        \n
                        \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
                        \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
                        '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/views/FormEditorView.js b/docker/vue-app/src/form_editor/views/FormEditorView.js index 987957168..544457d06 100644 --- a/docker/vue-app/src/form_editor/views/FormEditorView.js +++ b/docker/vue-app/src/form_editor/views/FormEditorView.js @@ -681,6 +681,11 @@ export default { event.dataTransfer.dropEffect = 'move'; event.dataTransfer.effectAllowed = 'move'; event.dataTransfer.setData('text/plain', event.target.id); + //define/update a min height for the form preview element or the dragged item could be dropped when its size changes. + let elFormDisplay = document.getElementById(`form_entry_and_preview`); + const currentFormHeight = +elFormDisplay.getBoundingClientRect().height.toFixed(0); + elFormDisplay.style.minHeight = currentFormHeight + 'px'; + //size needs to be set programmatically. All other styles in CSS. event.target.style.height = '80px'; event.target.classList.add("is_being_dragged"); From 69da416edae543ac20411a1c8cdba4e5fc4f1133 Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Thu, 21 Nov 2024 08:54:55 -0500 Subject: [PATCH 20/37] LEAF 4435 adjust styles for dragged display and drop area --- app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css | 2 +- .../js/vue-dest/form_editor/form-editor-view.chunk.js | 2 +- docker/vue-app/src/form_editor/LEAF_FormEditor.scss | 10 +++++++++- .../components/form_editor_view/FormQuestionDisplay.js | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css index d554b619e..9d52f28c1 100644 --- a/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css +++ b/app/libs/js/vue-dest/form_editor/LEAF_FormEditor.css @@ -1 +1 @@ -body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.75rem 1rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22);box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset;outline:2px solid #2491ff;border-radius:3px}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] ul.add_drop_style{height:80px;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset;outline:2px solid #2491ff;margin-bottom:.5rem}#form_entry_and_preview ul[id^=base_drop_area] ul.add_drop_style_last{margin-bottom:.5rem}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0;border-radius:3px}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container{display:flex;justify-content:center;align-items:center;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle{cursor:grab;background-color:#f0f0f0;border-radius:4px 0 0 0;height:70px;width:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle .icon_drag{opacity:.4;font-size:16px;display:flex;justify-content:center}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options{opacity:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options.click_buttons_visible{opacity:1}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options.click_buttons_visible .icon_move{cursor:pointer}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:auto;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up{margin-top:.375rem;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area] li.add_drop_style{margin-top:80px}#form_entry_and_preview ul[id^=base_drop_area] li.add_drop_style_last{margin-bottom:80px}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.5rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:2px;border:1px solid #c1c1c1;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} +body{min-width:-moz-fit-content;min-width:fit-content}[v-cloak]{display:none}.page_loading{border:2px solid #000;text-align:center;font-size:24px;font-weight:bold;padding:1rem;background-color:#fff}input[type=color]{cursor:pointer}#vue-formeditor-app{min-height:100vh}#vue-formeditor-app #vue_app_main{margin:0}#vue-formeditor-app #vue_app_main>section{margin:auto;padding:0 .5em;max-width:1800px}#vue-formeditor-app *,#site-designer-app *,#leaf_dialog_content *{box-sizing:border-box}#vue-formeditor-app label,#site-designer-app label,#leaf_dialog_content label{font-family:"Source Sans Pro Web",Helvetica,Arial,sans-serif}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]),#vue-formeditor-app a.btn-general,#site-designer-app button:not(.choices__button,[class*=trumbowyg]),#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]){display:flex;justify-content:center;align-items:center;cursor:pointer;font-weight:bolder;padding:2px .4em;border-radius:3px;white-space:nowrap;line-height:normal;text-decoration:none}#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#vue-formeditor-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#vue-formeditor-app a.btn-general:not(.disabled):hover,#vue-formeditor-app a.btn-general:not(.disabled):focus,#vue-formeditor-app a.btn-general:not(.disabled):active,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#site-designer-app button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):hover,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):focus,#leaf_dialog_content button:not(.choices__button,[class*=trumbowyg]):not(.disabled):active{outline:2px solid #20a0f0}button.btn-general,a.btn-general,button.btn-confirm{background-color:#e8f2ff;color:#005ea2;border:2px solid #005ea2}button.btn-general:not(.disabled):hover,button.btn-general:not(.disabled):focus,button.btn-general:not(.disabled):active,a.btn-general:not(.disabled):hover,a.btn-general:not(.disabled):focus,a.btn-general:not(.disabled):active,button.btn-confirm:not(.disabled):hover,button.btn-confirm:not(.disabled):focus,button.btn-confirm:not(.disabled):active{background-color:#005ea2;color:#fff;border:2px solid #000 !important}button.btn-general.disabled,a.btn-general.disabled,button.btn-confirm.disabled{cursor:not-allowed !important;background-color:#c9c9c9;color:#454545}button.btn-general.disabled:active,a.btn-general.disabled:active,button.btn-confirm.disabled:active{border:2px solid #005ea2 !important}button.btn-general a,button.btn-general a:visited,button.btn-general a:active,button.btn-general a:focus,a.btn-general a,a.btn-general a:visited,a.btn-general a:active,a.btn-general a:focus,button.btn-confirm a,button.btn-confirm a:visited,button.btn-confirm a:active,button.btn-confirm a:focus{text-decoration:none;color:inherit}button.btn-confirm{color:#fff;background-color:#005ea2}ul{list-style-type:none;margin:0;padding:0}label{padding:0;display:flex;align-items:center;font-weight:bolder;white-space:nowrap;margin-bottom:2px}label.checkable{margin-bottom:0}a.router-link{display:flex;justify-content:center;align-items:center;text-decoration:none;color:inherit;border-radius:3px}td a.router-link{justify-content:flex-start}#leaf-vue-dialog-background{position:fixed;top:0;left:0;width:100%;height:100%;z-index:100;background-color:rgba(0,0,20,.5)}#leaf_dialog_content{position:absolute;margin:auto;width:auto;min-width:450px;resize:horizontal;z-index:101;max-width:900px;height:auto;min-height:0;border-radius:4px;background-color:#fff;box-shadow:0 0 5px 1px rgba(0,0,25,.25);overflow:visible}#leaf_dialog_content p{margin:0;padding:0;line-height:1.5}#leaf_dialog_content>div{padding:.75rem 1rem}#leaf_dialog_content li{display:flex;align-items:center}#leaf_dialog_content .leaf-vue-dialog-title{color:#252f3e;border-top:3px solid #fff;border-left:3px solid #fff;border-right:3px solid #cadff0;border-bottom:2px solid #cadff0;border-radius:3px;background-color:#e8f2ff;cursor:move}#leaf_dialog_content .leaf-vue-dialog-title h2{color:inherit;font-size:22px;margin:0 1.5rem 0 0}#leaf_dialog_content #leaf-vue-dialog-close{display:flex;justify-content:center;align-items:center;position:absolute;top:8px;right:8px;width:25px;height:25px;cursor:pointer;font-weight:bold;font-size:1.2rem;border:0;background-color:rgba(0,0,0,0)}#leaf_dialog_content #leaf-vue-dialog-cancel-save{display:flex;justify-content:space-between;margin-top:1em}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_save{margin-right:auto}#leaf_dialog_content #leaf-vue-dialog-cancel-save #button_cancelchange{margin-left:auto}#history-slice td{word-break:break-word}.checkable.leaf_check{cursor:pointer;position:relative;display:flex;align-items:center;width:-moz-fit-content;width:fit-content;max-width:600px;margin-bottom:.2em;white-space:normal}input[class*=icheck][class*=leaf_check],input[class*=ischecked][class*=leaf_check]{opacity:0;cursor:pointer;width:18px;flex:0 0 18px;height:18px;margin:2px}span.leaf_check{position:absolute;top:50%;transform:translate(0, -50%);left:0;width:18px;height:18px;background-color:#fff;border:1px solid #979695;border-radius:2px}span.leaf_check:hover,span.leaf_check:focus,span.leaf_check:active,input[class*=ischecked][class*=leaf_check]:focus~span.leaf_check,input[class*=icheck][class*=leaf_check]:focus~span.leaf_check{border:2px solid #47e;background-color:rgba(0,0,0,0)}input[type=radio][class*=icheck][class*=leaf_check]~span.leaf_check{border-radius:50%}span.leaf_check::after{content:"";box-sizing:content-box;position:absolute;top:10%;left:30%;width:25%;height:50%;background-color:rgba(0,0,0,0);border:1px solid #fff;border-width:0px 3px 3px 0px;border-radius:2px;transform:rotate(40deg);display:none}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check{background-color:#47e;border:1px solid #47e;opacity:1}input[class*=icheck][class*=leaf_check]:checked~span.leaf_check::after,input[class*=ischecked][class*=leaf_check]:checked~span.leaf_check::after{display:block}.choices__inner div.choices__item.choices__item--selectable,.choices__inner div.choices__item.is-highlighted{background-color:#f6faff;background-image:linear-gradient(0, #eee 50%, #fff 53%);border:1px solid #aaa;border-radius:4px;color:#000}button.choices__button{filter:brightness(25%)}button.choices__button:hover,button.choices__button:focus,button.choices__button:active{filter:brightness(0);transform:scale(1.05);border-left:1px solid #000 !important}.choices__list{color:#000}.choices__list.choices__list--dropdown.is-active .is-highlighted{background-color:#e8f2ff;box-shadow:0px 0px 1px 1px rgba(0,165,187,.3764705882) inset}.choices__list[aria-expanded] .choices__item--selectable.is-highlighted::after{opacity:.75}.choices input{float:none}.choices input:hover,.choices input:focus,.choices input:active{outline:none}nav#top-menu-nav{width:100%}nav#top-menu-nav ul{display:flex;justify-content:center;align-items:center;justify-content:flex-start;color:#252f3e;background-color:#e8f2ff;border-bottom:1px solid #252f3e;position:relative;z-index:10;margin-bottom:1rem}nav#top-menu-nav li{display:flex;justify-content:center;align-items:center;position:relative;height:32px;font-size:14px;font-weight:bolder}nav#top-menu-nav li:not(:last-child)::after{content:"";position:absolute;right:0;display:block;height:50%;border-radius:2px;width:2px;background-color:#000}nav#top-menu-nav li button,nav#top-menu-nav li a{margin:0;padding-right:.4rem;display:flex;justify-content:center;align-items:center;position:relative;background-color:inherit;text-decoration:inherit;color:inherit;width:100%;height:100%;border:2px solid rgba(0,0,0,0)}nav#top-menu-nav li button:hover,nav#top-menu-nav li button:focus,nav#top-menu-nav li button:active,nav#top-menu-nav li a:hover,nav#top-menu-nav li a:focus,nav#top-menu-nav li a:active{border:2px solid #2491ff;outline:none !important;background-color:#005ea2;color:#fff}nav#top-menu-nav li span[role=img]{margin-left:.25rem}#page_breadcrumbs{display:flex;align-items:center;flex-wrap:wrap;gap:.125rem}#form_browser_tables h3{color:#000}#form_browser_tables table{width:100%;background-color:#fff;border-collapse:collapse;border:1px solid #252f3e;border-radius:2px;margin-bottom:2rem}#form_browser_tables table td,#form_browser_tables table th{padding:.25rem .5rem;border:1px solid #252f3e}#form_browser_tables table td a,#form_browser_tables table th a{padding:.25rem .5rem;display:flex;height:100%;align-items:center;color:inherit;border:2px solid rgba(0,0,0,0)}#form_browser_tables table td a:hover,#form_browser_tables table td a:focus,#form_browser_tables table td a:active,#form_browser_tables table th a:hover,#form_browser_tables table th a:focus,#form_browser_tables table th a:active{background-color:#e8f2ff;border:2px solid #2491ff !important}#form_browser_tables table td.form-name{padding:0}#form_browser_tables table th{background-color:#252f3e;color:#fff;border:1px solid #000}#form_browser_tables table tr:not(.header-row){color:#000;border-bottom:1px solid #252f3e}#form_browser_tables table tr.sub-row{color:#333;background-color:#f6f6ff;font-size:85%}#form_browser_tables table tr.sub-row .form-name{padding-left:.75rem}#form_browser_tables table .need-to-know-enabled{display:flex;justify-content:center;align-items:center;color:#c00;font-size:12px}div[class$=SelectorBorder]{display:flex}div[class$=SelectorBorder] div{display:flex;justify-content:center;align-items:center}div[class$=SelectorBorder] input{width:100%;border:1px solid #bbb}table[class$=SelectorTable] th{color:#252f3e}#advanced_options_dialog_content{min-height:50px}#advanced_options_dialog_content fieldset{min-width:700px;padding:.5em;margin:0}#advanced_options_dialog_content fieldset table.table{border-collapse:collapse;margin:0;width:100%}#advanced_options_dialog_content fieldset>div.save_code{display:flex;justify-content:space-between;align-items:flex-end}#advanced_options_dialog_content fieldset>div.save_code img{width:16px;height:16px}#indicator-editing-dialog-content>div{margin-bottom:2rem}#indicator-editing-dialog-content button{font-size:80%}#indicator-editing-dialog-content input,#indicator-editing-dialog-content select{min-height:24px}#indicator-editing-dialog-content #name:not(.trumbowyg-textarea){width:100%;margin-bottom:.4rem;padding:.2rem .4rem;display:block}#indicator-editing-dialog-content #description,#indicator-editing-dialog-content #indicatorType,#indicator-editing-dialog-content #defaultValue,#indicator-editing-dialog-content #indicatorMultiAnswer{width:100%;max-width:100%}#indicator-editing-dialog-content #formatDetails{margin:.5rem 0}#indicator-editing-dialog-content #indicator-editing-attributes{position:relative;margin-top:1.5rem;padding:0;min-width:-moz-fit-content;min-width:fit-content}#indicator-editing-dialog-content #indicator-editing-attributes .attribute-row{display:flex;align-items:stretch;justify-content:flex-start;margin:1rem 0}#indicator-editing-dialog-content #indicator-editing-attributes #archived-warning,#indicator-editing-dialog-content #indicator-editing-attributes #deletion-warning{position:absolute;right:0;top:0;color:#a00;font-size:90%}#indicator-editing-dialog-content #indicator-editing-attributes #indicatorPrivileges{line-height:1.4}#indicator-editing-dialog-content div.cell{width:200px;min-width:200px;text-align:center;border:1px gray solid;padding:10px;vertical-align:top;display:table-cell}#indicator-editing-dialog-content div.cell span.columnNumber{display:flex;justify-content:center;align-items:center;margin-bottom:1rem;font-weight:bolder}#indicator-editing-dialog-content div.cell input,#indicator-editing-dialog-content div.cell select{width:100%;margin-bottom:1rem}#edit-properties-panel{padding:0;position:relative;display:flex;margin-bottom:.75rem;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);overflow:hidden}#edit-properties-panel>div{min-width:400px;padding:.75rem;display:flex;flex-direction:column;width:50%}#edit-properties-panel input,#edit-properties-panel select{border:1px inset #dde;border-radius:2px;line-height:normal;min-height:24px}#edit-properties-panel input{padding-left:.4em}#edit-properties-panel #edit-properties-description{display:flex;flex-direction:column;height:100%;align-self:center;border-right:1px solid #252f3e;min-width:400px}#edit-properties-panel #edit-properties-description #categoryName{width:100%;margin-bottom:1rem}#edit-properties-panel #edit-properties-description textarea{width:100%;height:100%;padding:.2rem .5rem;border:1px inset #dde;border-radius:2px;resize:none}#edit-properties-panel #edit-properties-description span{margin-left:auto;font-size:80%;align-self:flex-end}#edit-properties-panel .form-id{position:absolute;right:.75rem;bottom:1px;font-size:.75rem}#edit-properties-panel #editFormPermissions:hover,#edit-properties-panel #editFormPermissions:focus,#edit-properties-panel #editFormPermissions:active span{color:#fff}#edit-properties-panel .panel-properties{flex-wrap:wrap;gap:.5rem 1rem;display:flex;margin-top:1rem;height:100%}#edit-properties-panel .panel-properties input,#edit-properties-panel .panel-properties select{margin-left:3px}#edit-properties-panel .panel-properties input[type=number]{width:50px}#edit-properties-panel .panel-properties label{margin-bottom:0}#edit-properties-panel .panel-properties #workflow_info{display:flex;gap:2px;align-items:center}#edit-properties-panel .panel-properties #workflow_info #view_workflow{font-size:14px;height:26px;text-decoration:underline}#form_properties_last_update{color:#005ea2;font-size:90%;background-color:rgba(0,0,0,0);border:2px solid rgba(0,0,0,0)}#history-slice td{font-size:14px !important}#history-page-buttons button#next,#history-slice button#prev{width:135px}#form_index_and_editing{display:flex;gap:1rem}#form_index_display{margin-top:.5625rem;position:relative;padding:.875rem .75rem;width:330px;flex:0 0 330px;align-self:flex-start;background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);max-height:90vh;overflow-y:auto}#form_index_display button.preview{width:134px;margin-bottom:1rem}#form_index_display ul li.form_menu_preview{padding:.5rem 0}#form_index_display ul li.form_menu_preview:not(:last-child){border-bottom:1px solid #f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li{min-height:46px;border:2px solid #f0f0f0;border-radius:2px}#form_index_display ul[id^=layoutFormRecords_]>li:not(:last-child){margin-bottom:1rem}#form_index_display ul[id^=layoutFormRecords_]>li button.layout-listitem{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;border:0;background-clip:padding-box;overflow:hidden;border-radius:0;padding:0 .5rem;color:#252f3e;background-color:#f2f2f6}#form_index_display ul[id^=layoutFormRecords_]>li.selected button.layout-listitem{color:#fff;background-color:#005ea2;cursor:default}#form_index_display div.internal_forms{padding:.75rem;padding-top:0}#form_index_display ul[id^=internalFormRecords_]{border-left:4px solid #f2f2f6;padding-top:.75rem}#form_index_display ul[id^=internalFormRecords_]>li:not(:last-child){margin-bottom:.5rem}#form_index_display ul[id^=internalFormRecords_]>li button{padding:.25rem;display:flex;justify-content:flex-start;width:100%;height:46px;overflow:hidden;border:2px solid rgba(0,0,0,0);border-radius:1px}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse){background-color:#f2f2f6}#form_index_display ul[id^=internalFormRecords_]>li button:not(#addInternalUse).selected{cursor:auto;color:#fff;background-color:#005ea2;border:2px solid #2491ff}#form_index_display ul[id^=internalFormRecords_]>li button:hover,#form_index_display ul[id^=internalFormRecords_]>li button:focus,#form_index_display ul[id^=internalFormRecords_]>li button:active{border:2px solid #2491ff;outline:none !important}#form_index_display button#indicator_toolbar_toggle,#form_index_display button[id^=addInternalUse_],#form_index_display button[id^=addStaple_]{margin-bottom:1rem;height:2.25rem;width:100%;border:2px solid #005ea2;justify-content:flex-start}#form_entry_and_preview{position:relative;top:0;display:flex;flex-direction:column;align-self:flex-start;width:100%;min-width:420px;padding:0;background-color:rgba(0,0,0,0);border-radius:4px}#form_entry_and_preview #drag_drop_default_img_replacement{position:absolute;left:-9999px;height:1px;width:1px;background-color:rgba(0,0,0,0) !important}#form_entry_and_preview #drag_drop_custom_display{cursor:pointer;position:absolute;left:-9999px;width:600px;height:100px;padding:.75rem 1rem;z-index:1001;background-color:#fff;border:1px solid #000;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.25)}#form_entry_and_preview ul[id^=base_drop_area]{position:relative;padding:1px 0}#form_entry_and_preview ul[id^=base_drop_area].entered-drop-zone,#form_entry_and_preview ul[id^=base_drop_area] ul.entered-drop-zone{background-color:rgba(0,0,25,.22);box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset;outline:2px solid #2491ff;border-radius:3px}#form_entry_and_preview ul[id^=base_drop_area] ul[id^=drop_area_parent_]{position:relative}#form_entry_and_preview ul[id^=base_drop_area] ul.form-index-listing-ul{margin:0;display:flex;flex-direction:column;background-clip:content-box;min-height:10px}#form_entry_and_preview ul[id^=base_drop_area] ul.add_drop_style{height:80px;border-radius:3px;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset;outline:2px solid #2491ff;margin-bottom:.5rem;margin-right:.5rem}#form_entry_and_preview ul[id^=base_drop_area] ul.add_drop_style_last{margin-bottom:.5rem;margin-right:0}#form_entry_and_preview ul[id^=base_drop_area] li{position:relative;margin:.5rem 0;border-radius:3px}#form_entry_and_preview ul[id^=base_drop_area] li:first-child{margin-top:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li:last-child{margin-bottom:.675rem}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container{display:flex;justify-content:center;align-items:center;position:absolute;width:1.5rem;left:0;top:0;flex-direction:column}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle{cursor:grab;background-color:#f0f0f0;border-radius:4px 0 0 0;height:70px;width:100%;left:0;top:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle:active{outline:2px solid #20a0f0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container div.drag_question_handle .icon_drag{opacity:.4;font-size:16px;display:flex;justify-content:center}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options{opacity:0}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options.click_buttons_visible{opacity:1}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .click_to_move_options.click_buttons_visible .icon_move{cursor:pointer}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move{display:flex;justify-content:center;align-items:center;cursor:auto;width:0;height:0;padding:0;background-color:rgba(0,0,0,0);border:9px solid rgba(0,0,0,0)}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up{margin-top:.375rem;border-bottom:18px solid #162e51;border-top:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:disabled{cursor:auto;border-bottom:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.up:active:not(:disabled){border-bottom:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down{margin-top:.625rem;border-top:18px solid #162e51;border-bottom:2px}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:disabled{cursor:auto;border-top:18px solid gray}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus,#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active{outline:none !important}#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:hover:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:focus:not(:disabled),#form_entry_and_preview ul[id^=base_drop_area] li .move_question_container .icon_move.down:active:not(:disabled){border-top:18px solid #00bde3}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged{overflow:hide;margin-bottom:1rem;background-color:#d0d0d4;box-shadow:2px 2px 4px 1px rgba(0,0,25,.3) inset}#form_entry_and_preview ul[id^=base_drop_area] li.is_being_dragged *{display:none}#form_entry_and_preview ul[id^=base_drop_area] li ul[id^=drop_area_parent_] li.is_being_dragged{margin-right:.5rem}#form_entry_and_preview ul[id^=base_drop_area] li.add_drop_style{margin-top:80px !important}#form_entry_and_preview ul[id^=base_drop_area] li.add_drop_style_last{margin-bottom:80px}#form_entry_and_preview ul[id^=base_drop_area]>li{background-color:#fff;border-radius:4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);margin-bottom:1.25rem}#form_entry_and_preview ul[id^=base_drop_area]>li:first-child{margin-top:.5rem}#form_entry_and_preview .form_page{display:inline-flex;justify-content:center;align-items:center;font-weight:bold;color:#fff;background-color:#000;font-size:1.5rem;height:2.25rem;padding:.2em 9px;border-radius:3px;margin-right:.4rem}#form_entry_and_preview div.printformblock{height:auto;position:relative;break-inside:avoid;height:auto;max-height:none}#form_entry_and_preview div.printformblock div.printResponse{position:relative;padding:0;padding-left:1.5rem;float:none;border-radius:4px;background-color:#fff}#form_entry_and_preview div.printformblock div.printResponse.form-header,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header{border-top:.3125rem solid #000}#form_entry_and_preview div.printformblock div.printResponse.form-header>.form_editing_area,#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>.form_editing_area{border-radius:4px}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header>ul{padding:.5em}#form_entry_and_preview div.printformblock div.printResponse.preview.form-header li{margin:0}#form_entry_and_preview div.printformblock div.printResponse.preview{border:0;padding-left:0}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview){margin-left:2px;border:1px solid #c1c1c1;border-right:0;border-radius:4px 0 0 4px;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4);transition:box-shadow .5s}#form_entry_and_preview div.printformblock div.printResponse:not(.form-header):not(.preview):hover{box-shadow:1px 1px 8px 4px rgba(0,0,20,.25)}#form_entry_and_preview #blank_section_preview{margin-top:.5rem;background-color:#fff;border-radius:4px;padding:.75rem;box-shadow:1px 1px 2px 1px rgba(0,0,20,.4)}#form_entry_and_preview #blank_section_preview button{border:2px dashed hsl(240,18.1818181818%,81.3333333333%);width:100%;height:2rem}#form_entry_and_preview button.new_section_question{height:2rem;width:100%;border:2px dashed hsl(240,18.1818181818%,81.3333333333%)}#form_entry_and_preview .form_editing_area{display:flex;flex-direction:column;margin-bottom:.25rem;background-color:#fff}#form_entry_and_preview .form_editing_area .name_and_toolbar{width:100%}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header{font-weight:bolder;background-color:#e0e0e0;border-radius:0}#form_entry_and_preview .form_editing_area .name_and_toolbar.form-header .indicator-name-preview{padding:.5em}#form_entry_and_preview .form_editing_area .name_and_toolbar:not(.preview){min-height:60px}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move){border:1px solid #1476bd}#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):hover,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):focus,#form_entry_and_preview .form_editing_area .name_and_toolbar button:not(.icon_move):active{border:1px solid #2491ff !important;outline:1px solid #2491ff}#form_entry_and_preview .form_editing_area .indicator-name-preview{padding:.25rem .25rem .75rem .5rem;width:100%}#form_entry_and_preview .form_editing_area .indicator-name-preview .required-sensitive{color:#a00;margin-left:.4em}#form_entry_and_preview .form_editing_area .indicator-name-preview ul{list-style-type:disc;padding-inline-start:40px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]{float:right;margin-left:.25rem;padding:.25rem;border-radius:3px;display:flex;flex-direction:column;align-items:stretch;font-size:90%;gap:3px 2px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_]>div{display:flex;align-items:center;gap:4px 5px;min-width:260px}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] button{padding:4px;font-weight:normal}#form_entry_and_preview .form_editing_area div[id^=form_editing_toolbar_] img{width:16px;height:16px}#form_entry_and_preview .form_editing_area .format_preview{padding:.5rem .25rem .75rem .5rem;min-height:50px}#form_entry_and_preview .form_editing_area .format_preview .text_input_preview{display:inline-block;width:75%;font-size:1.3em;font-family:monospace;background-color:#fff;border:1px solid gray;padding:.25em}#form_entry_and_preview .form_editing_area .format_preview .textarea_input_preview{width:75%;padding:.5em;font-size:1.3em;font-family:monospace}#form_entry_and_preview .form_editing_area .format_preview div[id*=textarea_format_button_],#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box,#form_entry_and_preview .form_editing_area .format_preview .choices,#form_entry_and_preview .form_editing_area .format_preview fieldset{width:75%}#form_entry_and_preview .form_editing_area .format_preview .trumbowyg-box{margin-left:0}#form_entry_and_preview .form_editing_area .format_preview div.tableinput{overflow-x:auto;max-width:900px}#form_entry_and_preview .form_editing_area .format_preview .employeeSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .groupSelectorInput,#form_entry_and_preview .form_editing_area .format_preview .positionSelectorInput{margin-bottom:.5em;width:75%}#form_entry_and_preview .form_editing_area .format_preview div[class*=SelectorBorder]{background-color:rgba(0,0,0,0)}#form_entry_and_preview .form_editing_area .format_preview tr[class*=Selector]:hover{background-color:#e1f3f8}#condition_editor_dialog_content{min-width:700px;max-width:900px;margin:auto;background-color:#fff}#condition_editor_dialog_content #ifthen_deletion_dialog{margin-bottom:-0.75rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options{display:flex;justify-content:space-between;margin-top:2rem}#condition_editor_dialog_content #ifthen_deletion_dialog .options button{width:120px}#condition_editor_dialog_content #savedConditionsLists{padding-bottom:.5em}#condition_editor_dialog_content #savedConditionsLists ul{margin-bottom:1rem}#condition_editor_dialog_content #savedConditionsLists button.btn_remove_condition{width:1.75em}#condition_editor_dialog_content #outcome_select{max-width:700px}#condition_editor_dialog_content #condition_editor_inputs>div{padding:1rem 0}#condition_editor_dialog_content #condition_editor_inputs>div .choices__inner{width:100%;max-width:700px}#condition_editor_dialog_content #if-then-setup{display:flex;max-width:700px;gap:.75rem;align-items:center;min-height:60px;padding-bottom:0}#condition_editor_dialog_content #if-then-setup>select,#condition_editor_dialog_content #if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content #if-then-setup input{width:35%;margin:0}#condition_editor_dialog_content #if-then-setup #operator_select{width:25%}#condition_editor_dialog_content #if-then-setup>div.crosswalks{display:flex;flex-wrap:wrap;gap:1rem 2rem;max-width:600px}#condition_editor_dialog_content #if-then-setup .choices__inner{max-width:300px}#condition_editor_dialog_content select,#condition_editor_dialog_content input:not(.choices__input){font-size:1rem;padding:2px;text-overflow:ellipsis;width:100%;border:1px inset gray}#condition_editor_dialog_content select:not(:last-child),#condition_editor_dialog_content input:not(.choices__input):not(:last-child){margin-bottom:1em}#condition_editor_dialog_content li.savedConditionsCard{display:flex;align-items:center;margin-bottom:.5rem}#condition_editor_dialog_content button.btnSavedConditions{display:block;width:100%;text-align:left;font-weight:normal;background-color:#fff;padding:6px;border:1px outset #005ea2;box-shadow:1px 1px 6px rgba(0,0,25,.5);border-radius:3px;margin-right:1rem;white-space:normal;max-width:700px;overflow:hidden;transition:box-shadow .1s ease}#condition_editor_dialog_content button.btnSavedConditions.isOrphan{background-color:#d8d8d8;color:#000;border:1px solid #000}#condition_editor_dialog_content button.btnSavedConditions:hover:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:focus:not(.isOrphan),#condition_editor_dialog_content button.btnSavedConditions:active:not(.isOrphan){color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content button.btn-confirm.new{padding:4px 6px}#condition_editor_dialog_content .changesDetected{color:#c80000}#condition_editor_dialog_content .selectedConditionEdit .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:hover .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:focus .changesDetected,#condition_editor_dialog_content button.btnSavedConditions:active .changesDetected{color:#fff}#condition_editor_dialog_content button.selectedConditionEdit{color:#fff;border:1px outset #005ea2 !important;background-color:#005ea2;box-shadow:0px 0px 2px rgba(0,0,25,.75)}#condition_editor_dialog_content .btn_remove_condition{background-color:#922;border:1px solid #922;color:#fff}#condition_editor_dialog_content .btn_remove_condition:hover,#condition_editor_dialog_content .btn_remove_condition:active,#condition_editor_dialog_content .btn_remove_condition:focus{border:1px solid #000 !important;background-color:#600}#condition_editor_dialog_content .ifthen_label{font-weight:bolder;color:#005ea2}@media only screen and (max-width: 600px){#leaf_dialog_content{min-width:400px}#vue-formeditor-app{min-width:400px}#vue-formeditor-app>div{flex-direction:column}#vue-formeditor-app #vue_app_main>section{margin:0;padding:0}#vue-formeditor-app nav#top-menu-nav{width:100%}#vue-formeditor-app nav#top-menu-nav ul{flex-direction:column;height:fit-content}#vue-formeditor-app nav#top-menu-nav ul li{width:100%;height:fit-content;flex-direction:column}#vue-formeditor-app nav#top-menu-nav ul li::after{content:"";background-color:rgba(0,0,0,0)}#vue-formeditor-app nav#top-menu-nav ul li button,#vue-formeditor-app nav#top-menu-nav ul li a{height:36px;padding:0;border-radius:0;justify-content:center !important}#vue-formeditor-app nav#top-menu-nav ul li button span,#vue-formeditor-app nav#top-menu-nav ul li a span{margin-left:10px}#vue-formeditor-app #secure_forms_info{display:flex;flex-wrap:wrap;justify-content:space-between}#vue-formeditor-app #edit-properties-panel{flex-direction:column;border-radius:0}#vue-formeditor-app #edit-properties-panel>div{width:100%}#vue-formeditor-app #edit-properties-panel #edit-properties-description{border-right:0;border-bottom:1px solid #252f3e}#vue-formeditor-app #internalFormRecordsDisplay{min-width:100%}#vue-formeditor-app #form_index_and_editing{flex-direction:column;gap:1.25rem}#vue-formeditor-app #form_index_and_editing>div{border-radius:0}#vue-formeditor-app #form_index_and_editing #form_index_display{width:100%;flex:0 0 100%}#vue-formeditor-app #form_index_and_editing .tableinput{max-width:580px}#condition_editor_dialog_content{width:100%;min-width:400px;border:0}#condition_editor_dialog_content div#if-then-setup{flex-direction:column}#condition_editor_dialog_content div#if-then-setup>select,#condition_editor_dialog_content div#if-then-setup>h3,#condition_editor_dialog_content div#if-then-setup #parent_choices_wrapper,#condition_editor_dialog_content div#if-then-setup #operator_select{width:100%}#condition_editor_dialog_content div#if-then-setup .choices__inner{max-width:100%}} diff --git a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js index 2b0b61dd7..9b69fae45 100644 --- a/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js +++ b/app/libs/js/vue-dest/form_editor/form-editor-view.chunk.js @@ -1 +1 @@ -"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
                        \n
                        \n \n
                        {{nameCharsRemaining}}
                        \n
                        \n \n
                        \n \n
                        {{descrCharsRemaining}}
                        \n
                        \n \n
                        '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
                        \n
                        \n Loading...\n \n
                        \n
                        \n
                        \n \n \n
                        \n
                        '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
                        \n Move column left\n Move column right
                        \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
                        \n \n \n
                        \n
                        \n \n \n \n \n
                        \n
                        '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
                        \n Special access restrictions\n
                        \n This prevents anyone from reading stored data unless they\'re part of the following groups.
                        \n If a group is assigned below, everyone else will see "[protected data]".\n
                        \n \n
                        {{ statusMessageError }}
                        \n \n
                        \n \n \n
                        \n
                        '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
                          ","
                        1. ","
                          ","

                          ","","

                          ","

                          ","

                          ","

                          ","","
                          "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
                          \n
                          \n
                          \n \n \n \n \n
                          \n
                          \n \n \n
                          \n
                          \n
                          \n \n
                          \n \n \n
                          \n
                          \n

                          Format Information

                          \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
                          \n
                          \n
                          \n \n \n
                          \n
                          \n \n \n
                          \n
                          \n \n
                          \n
                          \n  Columns ({{gridJSON.length}}):\n
                          \n
                          \n \n \n
                          \n
                          \n
                          \n \n
                          \n
                          \n \n
                          \n
                          \n
                          \n Attributes\n
                          \n \n \n
                          \n \n
                          \n
                          \n \n
                          \n \n
                          \n \n This field will be archived.  It can be
                          re-enabled by using Restore Fields.\n
                          \n \n Deleted items can only be re-enabled
                          within 30 days by using Restore Fields.\n
                          \n
                          \n
                          '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
                          \n
                          Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
                          {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
                          {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
                          {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
                          \n
                          \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

                          \n
                          \n \n \n
                          \n
                          \n
                          \n \n \n
                          \n \n
                          \n
                          \n
                          \n Notice:
                          \n

                          Please go to LEAF Programmer\n to ensure continued access to this area.

                          \n
                          '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
                          \n
                          \n

                          Stapled forms will show up on the same page as the primary form.

                          \n

                          The order of the forms will be determined by the forms\' assigned sort values.

                          \n
                          \n
                            \n
                          • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
                          • \n
                          \n

                          \n
                          \n \n
                          There are no available forms to merge
                          \n
                          \n
                          '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
                          \n

                          What is this?

                          \n

                          With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

                          \n
                          \n

                          To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

                          \n
                          \n

                          The following groups can update {{formNameStripped()}} records at any time:

                          \n
                          \n
                          \n \n \n

                          \n
                          \n \n
                          There are no available groups to add
                          \n
                          \n
                          '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
                          \n
                          Are you sure you want to delete this form?
                          \n
                          {{formName}}
                          \n
                          {{formDescription}}
                          \n
                          ⚠️ This form still has stapled forms attached
                          \n
                          '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
                          \n \x3c!-- LOADING SPINNER --\x3e\n
                          \n Loading... \n
                          \n
                          \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
                          \n
                          \n
                          Choose Delete to remove this condition, or cancel to return to the editor
                          \n
                          {{ conditionOverviewText }}
                          \n
                          \n \n \n
                          \n
                          \n \n
                          \n
                          '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
                          \n

                          This is a Nationally Standardized Subordinate Site

                          \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
                          '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
                          \n \n \n\n \n\n \n\n \n\n \n\n \n \n
                          File Attachment(s)\n

                          Select File to attach:

                          \n \n
                          \n\n \n\n \n \n \n \n \n\n \n
                          '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
                          '.concat(this.formPage+1,"
                          "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
                          \n
                          \n \x3c!-- TOOLBAR --\x3e\n
                          \n\n
                          \n \n \n \n \n
                          \n \n \n \n 🔒\n ⛓️\n ⚙️\n
                          \n
                          \n
                          \n \x3c!-- NAME --\x3e\n
                          \n
                          \n
                          \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
                          '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","setIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'\n
                          \n\n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n
                          \n
                          \n \n
                          \n
                          \n \n \n
                          \n
                          \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
                            \n\n \n \n
                          \n
                          \n \n
                          \n
                          \n

                        2. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
                          \n {{formID}}\n (internal for {{formParentID}})\n \n
                          \n \n \n \n \n \n
                          \n
                          \n
                          \n \n
                          \n \n
                          This is an Internal Form
                          \n
                          \n
                          '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#".concat(this.dragUL_Prefix).concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},setIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID!==e&&(this.focusedIndicatorID=e)},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode&&o===this.focusedIndicatorID){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("".concat(this.dragLI_Prefix).concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((null==e?void 0:e.offsetX)>25||(null==e?void 0:e.offsetY)>78)e.preventDefault();else if(!this.previewMode&&null!=e&&e.dataTransfer){e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id);var t=document.getElementById("form_entry_and_preview"),o=+t.getBoundingClientRect().height.toFixed(0);t.style.minHeight=o+"px",e.target.style.height="80px",e.target.classList.add("is_being_dragged");var n=document.getElementById("drag_drop_default_img_replacement");if(null!==n){var i;e.dataTransfer.setDragImage(n,0,0);var r=null===(i=document.querySelector("#".concat(e.target.id," .name")))||void 0===i?void 0:i.textContent;r=this.shortIndicatorNameStripped(r),null!==e.target.querySelector("ul > li")&&(r+=" (includes sub-questions)"),this.$refs.drag_drop_custom_display.textContent=r,this.draggedElID=e.target.id}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-4:4;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Array.from(document.querySelectorAll("#base_drop_area_".concat(this.focusedFormID,' li[id^="').concat(this.dragLI_Prefix,'"],\n #base_drop_area_').concat(this.focusedFormID,' ul[id^="').concat(this.dragUL_Prefix,'"]'))).forEach((function(e){e.classList.remove("add_drop_style"),e.classList.remove("add_drop_style_last")})),null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")){var o,n=Array.from(t.target.querySelectorAll("#"+t.target.id+"> li")),i=t.target.getBoundingClientRect().top,r=document.getElementById(this.draggedElID),a=n.indexOf(r),l=n.find((function(e){return t.clientY-i<=e.offsetTop+e.offsetHeight/2}))||null,s=a>-1,c=this.draggedElID===(null==l?void 0:l.id),d=s&&(null===l&&n.length-1===a||null!==l&&(null==n||null===(o=n[n.indexOf(r)+1])||void 0===o?void 0:o.id)===(null==l?void 0:l.id));c||d||(t.target.classList.add("entered-drop-zone"),0===n.length?t.target.classList.add("add_drop_style"):null!==l?l.classList.add("add_drop_style"):(n[n.length-1].classList.add("add_drop_style_last"),t.target.classList.add("add_drop_style_last")))}},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
                          \n
                          \n Loading... \n \n
                          \n
                          \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
                          \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
                          '}}}]); \ No newline at end of file +"use strict";(self.webpackChunkleaf_vue=self.webpackChunkleaf_vue||[]).push([[245],{392:(e,t,o)=>{o.d(t,{A:()=>n});const n={data:function(){return{scrollY:window.scrollY,initialTop:15,modalElementID:"leaf_dialog_content",modalBackgroundID:"leaf-vue-dialog-background",elBody:null,elModal:null,elBackground:null,elClose:null,lastFocus:null}},inject:["dialogTitle","closeFormDialog","formSaveFunction","dialogButtonText","lastModalTab"],created:function(){this.lastFocus=document.activeElement||null},mounted:function(){this.elBody=document.querySelector("body"),this.elModal=document.getElementById(this.modalElementID),this.elModal.style.left=window.scrollX+window.innerWidth/2-this.elModal.clientWidth/2+"px",this.elBackground=document.getElementById(this.modalBackgroundID),this.elClose=document.getElementById("leaf-vue-dialog-close"),this.makeDraggable(this.elModal);var e=document.activeElement;null===(null!==e?e.closest(".leaf-vue-dialog-content"):null)&&this.elClose.focus()},beforeUnmount:function(){var e,t=(null===(e=this.lastFocus)||void 0===e?void 0:e.id)||null;if(null!==t){var o=document.getElementById(t);null!==o&&o.focus()}else null!==this.lastFocus&&this.lastFocus.focus()},methods:{firstTab:function(e){if(!0===(null==e?void 0:e.shiftKey)){var t=document.querySelector("#ifthen_deletion_dialog button.btn-general"),o=document.getElementById("next"),n=document.getElementById("button_cancelchange"),i=t||o||n;null!==i&&"function"==typeof i.focus&&(i.focus(),e.preventDefault())}},makeDraggable:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=0,n=0,i=0,r=0,a=function(e){(e=e||window.event).preventDefault(),o=i-e.clientX,n=r-e.clientY,i=e.clientX,r=e.clientY,t.style.top=t.offsetTop-n+"px",t.style.left=t.offsetLeft-o+"px",s()},l=function(){document.onmouseup=null,document.onmousemove=null},s=function(){t.offsetTopwindow.innerWidth+window.scrollX&&(t.style.left=window.innerWidth+window.scrollX-t.clientWidth-18+"px"),e.elBackground.style.minWidth=e.elBody.clientWidth+"px",e.elBackground.style.minHeight=e.elModal.offsetTop+e.elBody.clientHeight+"px"};document.getElementById(this.modalElementID+"_drag_handle")&&(document.getElementById(this.modalElementID+"_drag_handle").onmousedown=function(e){(e=e||window.event).preventDefault(),i=e.clientX,r=e.clientY,document.onmouseup=l,document.onmousemove=a})}},template:'\n \n \n '}},448:(e,t,o)=>{o.d(t,{A:()=>n});const n={name:"new-form-dialog",data:function(){return{requiredDataProperties:["parentID"],categoryName:"",categoryDescription:"",newFormParentID:this.dialogData.parentID}},inject:["APIroot","CSRFToken","decodeAndStripHTML","setDialogSaveFunction","dialogData","checkRequiredData","addNewCategory","closeFormDialog"],created:function(){this.checkRequiredData(this.requiredDataProperties),this.setDialogSaveFunction(this.onSave)},mounted:function(){document.getElementById("name").focus()},emits:["get-form"],computed:{nameCharsRemaining:function(){return Math.max(50-this.categoryName.length,0)},descrCharsRemaining:function(){return Math.max(255-this.categoryDescription.length,0)}},methods:{onSave:function(){var e=this,t=XSSHelpers.stripAllTags(this.categoryName),o=XSSHelpers.stripAllTags(this.categoryDescription);$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/new"),data:{name:t,description:o,parentID:this.newFormParentID,CSRFToken:this.CSRFToken},success:function(n){var i=n,r={};r.categoryID=i,r.categoryName=t,r.categoryDescription=o,r.parentID=e.newFormParentID,r.workflowID=0,r.needToKnow=0,r.visible=-1,r.sort=0,r.type="",r.stapledFormIDs=[],r.destructionAge=null,e.addNewCategory(i,r),""===e.newFormParentID?e.$router.push({name:"category",query:{formID:i}}):e.$emit("get-form",i),e.closeFormDialog()},error:function(e){console.log("error posting new form",e)}})}},template:'
                          \n
                          \n \n
                          {{nameCharsRemaining}}
                          \n
                          \n \n
                          \n \n
                          {{descrCharsRemaining}}
                          \n
                          \n \n
                          '}},211:(e,t,o)=>{o.r(t),o.d(t,{default:()=>E});var n=o(425),i=o(392);const r={name:"history-dialog",data:function(){return{requiredDataProperties:["historyType","historyID"],divSaveCancelID:"leaf-vue-dialog-cancel-save",page:1,historyType:this.dialogData.historyType,historyID:this.dialogData.historyID,ajaxRes:null}},inject:["dialogData","checkRequiredData","lastModalTab"],created:function(){this.checkRequiredData(this.requiredDataProperties)},mounted:function(){document.getElementById(this.divSaveCancelID).style.display="none",this.getPage()},computed:{showNext:function(){return null!==this.ajaxRes&&-1===this.ajaxRes.indexOf("No history to show")},showPrev:function(){return this.page>1}},methods:{getNext:function(){this.page++,this.getPage()},getPrev:function(){this.page--,this.getPage()},getPage:function(){var e=this;try{var t="ajaxIndex.php?a=gethistory&type=".concat(this.historyType,"&gethistoryslice=1&page=").concat(this.page,"&id=").concat(this.historyID);fetch(t).then((function(t){t.text().then((function(t){return e.ajaxRes=t}))}))}catch(e){console.log("error getting history",e)}}},template:'
                          \n
                          \n Loading...\n \n
                          \n
                          \n
                          \n \n \n
                          \n
                          '},a={name:"indicator-editing-dialog",data:function(){var e,t,o,n,i,r,a,l,s,c,d,u,p,m,h,f;return{requiredDataProperties:["indicator","indicatorID","parentID"],initialFocusElID:"name",trumbowygTitleClassMap:{Formatting:"trumbowyg-dropdown-formatting",Link:"trumbowyg-dropdown-link","Text color":"trumbowyg-dropdown-foreColor"},showAdditionalOptions:!1,showDetailedFormatInfo:!1,formats:{text:"Single line text",textarea:"Multi-line text",grid:"Grid (Table with rows and columns)",number:"Numeric",currency:"Currency",date:"Date",radio:"Radio (single select, multiple options)",checkbox:"Checkbox (A single checkbox)",checkboxes:"Checkboxes (Multiple Checkboxes)",multiselect:"Multi-Select Dropdown",dropdown:"Dropdown Menu (single select, multiple options)",fileupload:"File Attachment",image:"Image Attachment",orgchart_group:"Orgchart Group",orgchart_position:"Orgchart Position",orgchart_employee:"Orgchart Employee",raw_data:"Raw Data (for programmers)"},formatInfo:{text:"A single input for short text entries.",textarea:"A large area for multiple lines of text and limited text formatting options.",grid:"A table format with rows and columns. Additional rows can be added, removed, or moved during data entry.",number:"A single input used to store numeric data. Useful for information that will be used for calculations.",currency:"A single input used to store currency values in dollars to two decimal places.",date:"Embeds a datepicker.",radio:"Radio buttons allow a single selection from multiple options. All of the question's options will display.",checkbox:"A single checkbox is typically used for confirmation. The checkbox label text can be further customized.",checkboxes:"Checkboxes will allow the selection of multiple options. All of the question's options will display.",multiselect:"Multi-Select format will allow the selection of several options from a selection box with a dropdown. Only selected items will display.",dropdown:"A dropdown menu will allow one selection from multiple options. Only the selected option will display.",fileupload:"File Attachment",image:"Similar to file upload, but only image format files will be shown during selection",orgchart_group:"Orgchart Group format is used to select a specific LEAF User Access Group",orgchart_position:"Orgchart Position format is used to select a specific LEAF user by their position in the orgchart",orgchart_employee:"Orgchart Employee format is used to select a specific LEAF user from the orgchart",raw_data:"Raw Data is associated with Advanced Options, which can be used by programmers to run custom code during form data entry or review"},listForParentIDs:[],isLoadingParentIDs:!0,multianswerFormats:["checkboxes","radio","multiselect","dropdown"],ariaTextEditorStatus:"",name:this.removeScriptTags(this.decodeHTMLEntities((null===(e=this.dialogData)||void 0===e||null===(e=e.indicator)||void 0===e?void 0:e.name)||"")),options:(null===(t=this.dialogData)||void 0===t||null===(t=t.indicator)||void 0===t?void 0:t.options)||[],format:(null===(o=this.dialogData)||void 0===o||null===(o=o.indicator)||void 0===o?void 0:o.format)||"",description:(null===(n=this.dialogData)||void 0===n||null===(n=n.indicator)||void 0===n?void 0:n.description)||"",defaultValue:this.decodeAndStripHTML((null===(i=this.dialogData)||void 0===i||null===(i=i.indicator)||void 0===i?void 0:i.default)||""),required:1===parseInt(null===(r=this.dialogData)||void 0===r||null===(r=r.indicator)||void 0===r?void 0:r.required)||!1,is_sensitive:1===parseInt(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a?void 0:a.is_sensitive)||!1,parentID:(null===(l=this.dialogData)||void 0===l?void 0:l.parentID)||null,sort:void 0!==(null===(s=this.dialogData)||void 0===s||null===(s=s.indicator)||void 0===s?void 0:s.sort)?parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.sort):null,singleOptionValue:"checkbox"===(null===(d=this.dialogData)||void 0===d||null===(d=d.indicator)||void 0===d?void 0:d.format)?null===(u=this.dialogData)||void 0===u?void 0:u.indicator.options:"",multiOptionValue:["checkboxes","radio","multiselect","dropdown"].includes(null===(p=this.dialogData)||void 0===p||null===(p=p.indicator)||void 0===p?void 0:p.format)?((null===(m=this.dialogData)||void 0===m?void 0:m.indicator.options)||[]).join("\n"):"",gridJSON:"grid"===(null===(h=this.dialogData)||void 0===h||null===(h=h.indicator)||void 0===h?void 0:h.format)?JSON.parse(null===(f=this.dialogData)||void 0===f||null===(f=f.indicator)||void 0===f?void 0:f.options[0]):[],archived:!1,deleted:!1}},inject:["APIroot","CSRFToken","dialogData","checkRequiredData","setDialogSaveFunction","advancedMode","hasDevConsoleAccess","initializeOrgSelector","closeFormDialog","showLastUpdate","focusedFormRecord","focusedFormTree","getFormByCategoryID","truncateText","decodeAndStripHTML","orgchartFormats"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},provide:function(){var e=this;return{gridJSON:(0,n.EW)((function(){return e.gridJSON})),updateGridJSON:this.updateGridJSON}},components:{GridCell:{name:"grid-cell",data:function(){var e,t,o,n,i,r;return{name:(null===(e=this.cell)||void 0===e?void 0:e.name)||"No title",id:(null===(t=this.cell)||void 0===t?void 0:t.id)||this.makeColumnID(),gridType:(null===(o=this.cell)||void 0===o?void 0:o.type)||"text",textareaDropOptions:null!==(n=this.cell)&&void 0!==n&&n.options?this.cell.options.join("\n"):[],file:(null===(i=this.cell)||void 0===i?void 0:i.file)||"",hasHeader:null!==(r=this.cell)&&void 0!==r&&r.hasHeader?1:0}},props:{cell:Object,column:Number},inject:["libsPath","gridJSON","updateGridJSON","fileManagerTextFiles"],mounted:function(){0===this.gridJSON.length&&this.updateGridJSON()},computed:{gridJSONlength:function(){return this.gridJSON.length}},methods:{makeColumnID:function(){return"col_"+(65536*(1+Math.random())|0).toString(16).substring(1)},deleteColumn:function(){var e,t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),o=document.getElementById("gridcell_col_parent"),n=Array.from(o.querySelectorAll("div.cell")),i=n.indexOf(t)+1,r=n.length;2===r?(t.remove(),r--,e=n[0]):(e=null===t.querySelector('[title="Move column right"]')?t.previousElementSibling.querySelector('[title="Delete column"]'):t.nextElementSibling.querySelector('[title="Delete column"]'),t.remove(),r--),document.getElementById("tableStatus").setAttribute("aria-label","column ".concat(i," removed, ").concat(r," total.")),e.focus(),this.updateGridJSON()},moveRight:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.nextElementSibling,o=e.nextElementSibling.querySelector('[title="Move column right"]');t.after(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"left":"right",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved right to column ".concat(this.column+1," of ").concat(this.gridJSONlength)),this.updateGridJSON()},moveLeft:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).currentTarget.closest("div.cell"),t=e.previousElementSibling,o=e.previousElementSibling.querySelector('[title="Move column left"]');t.before(e),setTimeout((function(){var t;null===(t=e.querySelector('[title="Move column '.concat(null===o?"right":"left",'"]')))||void 0===t||t.focus()}),0),document.getElementById("tableStatus").setAttribute("aria-label","Moved left to column ".concat(this.column-1," of ").concat(this.gridJSONlength)),this.updateGridJSON()}},watch:{gridJSONlength:function(e,t){e>t&&document.getElementById("tableStatus").setAttribute("aria-label","Added a new column, ".concat(this.gridJSONlength," total."))}},template:'
                          \n Move column left\n Move column right
                          \n \n Column #{{column}}:\n Delete column\n \n \n \n \n \n
                          \n \n \n
                          \n
                          \n \n \n \n \n
                          \n
                          '},IndicatorPrivileges:{name:"indicator-privileges",data:function(){return{allGroups:[],groupsWithPrivileges:[],group:0,statusMessageError:"",ariaGroupStatus:""}},props:{indicatorID:{type:Number,required:!0}},inject:["APIroot","CSRFToken","showLastUpdate","focusedFormRecord","getFormByCategoryID"],mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)}}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),success:function(t){e.groupsWithPrivileges=t},error:function(t){console.log(t),e.statusMessageError="There was an error retrieving the Indicator Privileges. Please try again."}})];Promise.all(t).then((function(e){})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.groupsWithPrivileges.map((function(t){return e.push(parseInt(t.id))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""}},methods:{removeIndicatorPrivilege:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";0!==t&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges/remove"),data:{groupID:t,CSRFToken:this.CSRFToken},success:function(n){e.groupsWithPrivileges=e.groupsWithPrivileges.filter((function(e){return e.id!==t})),e.ariaGroupStatus="removed group id ".concat(t,", ").concat(o),e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log(e)}})},addIndicatorPrivilege:function(){var e=this;0!==this.group&&$.ajax({method:"POST",url:"".concat(this.APIroot,"formEditor/indicator/").concat(this.indicatorID,"/privileges"),data:{groupIDs:[this.group.groupID],CSRFToken:this.CSRFToken},success:function(){e.groupsWithPrivileges.push({id:e.group.groupID,name:e.group.name}),e.ariaGroupStatus="added group id ".concat(e.group.groupID,", ").concat(e.group.name),e.group=0,e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("an error occurred while setting group access restrictions",e)}})}},template:'
                          \n Special access restrictions\n
                          \n This prevents anyone from reading stored data unless they\'re part of the following groups.
                          \n If a group is assigned below, everyone else will see "[protected data]".\n
                          \n \n
                          {{ statusMessageError }}
                          \n \n
                          \n \n \n
                          \n
                          '}},mounted:function(){var e=this;if(!0===this.isEditingModal&&this.getFormParentIDs().then((function(t){e.listForParentIDs=t,e.isLoadingParentIDs=!1})).catch((function(e){return console.log("an error has occurred",e)})),null===this.sort&&(this.sort=this.newQuestionSortValue),this.containsRichText(this.name)?(document.getElementById("advNameEditor").click(),document.querySelector(".trumbowyg-editor").focus()):document.getElementById(this.initialFocusElID).focus(),this.orgchartFormats.includes(this.format)){var t=this.format.slice(this.format.indexOf("_")+1);this.initializeOrgSelector(t,this.indicatorID,"modal_",this.defaultValue,this.setOrgSelDefaultValue);var o=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==o&&o.addEventListener("change",(function(t){""===t.target.value.trim()&&(e.defaultValue="")}))}},computed:{isEditingModal:function(){return+this.indicatorID>0},indicatorID:function(){var e;return(null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID)||null},formID:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryID)||""},nameLabelText:function(){return null===this.parentID?"Section Heading":"Field Name"},showFormatSelect:function(){return null!==this.parentID||!0===this.advancedMode||""!==this.format||hasDevConsoleAccess},showDefaultTextarea:function(){return!["","raw_data","fileupload","image","grid","checkboxes","multiselect"].includes(this.format)},shortLabelTriggered:function(){return this.name.trim().split(" ").length>2||this.containsRichText(this.name)||hasDevConsoleAccess},formatBtnText:function(){return this.showDetailedFormatInfo?"Hide Details":"What's this?"},isMultiOptionQuestion:function(){return this.multianswerFormats.includes(this.format)},fullFormatForPost:function(){var e=this.format;switch(this.format.toLowerCase()){case"grid":this.updateGridJSON(),e=e+"\n"+JSON.stringify(this.gridJSON);break;case"radio":case"checkboxes":case"multiselect":case"dropdown":e=e+"\n"+this.formatIndicatorMultiAnswer();break;case"checkbox":e=e+"\n"+this.singleOptionValue}return e},shortlabelCharsRemaining:function(){return 50-this.description.length},newQuestionSortValue:function(){var e="#drop_area_parent_".concat(this.parentID," > li");return null===this.parentID?this.focusedFormTree.length-128:Array.from(document.querySelectorAll(e)).length-128}},methods:{containsRichText:function(e){return XSSHelpers.containsTags(e,["","","","
                            ","
                          1. ","
                            ","

                            ","","

                            ","

                            ","

                            ","

                            ","","
                            "])},decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},removeScriptTags:function(e){var t=document.createElement("div");t.innerHTML=e;for(var o=t.getElementsByTagName("script"),n=0;n0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.defaultValue=e.selection.toString())},toggleSelection:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"showDetailedFormatInfo";"boolean"==typeof this[t]&&(this[t]=!this[t])},getFormParentIDs:function(){var e=this;return new Promise((function(t,o){$.ajax({type:"GET",url:"".concat(e.APIroot,"/form/_").concat(e.formID,"/flat"),success:function(e){for(var o in e)e[o][1].name=XSSHelpers.stripAllTags(e[o][1].name);t(e)},error:function(e){return o(e)}})}))},preventSelectionIfFormatNone:function(){""!==this.format||!0!==this.required&&!0!==this.is_sensitive||(this.required=!1,this.is_sensitive=!1,alert('You can\'t mark a field as sensitive or required if the Input Format is "None".'))},onSave:function(){var e=this,t=document.querySelector(".trumbowyg-editor");null!=t&&(this.name=t.innerHTML);var o=[];if(this.isEditingModal){var n,i,r,a,l,s,c,d,u,p=this.name!==(null===(n=this.dialogData)||void 0===n?void 0:n.indicator.name),m=this.description!==(null===(i=this.dialogData)||void 0===i?void 0:i.indicator.description),h=null!==(r=this.dialogData)&&void 0!==r&&null!==(r=r.indicator)&&void 0!==r&&r.options?"\n"+(null===(a=this.dialogData)||void 0===a||null===(a=a.indicator)||void 0===a||null===(a=a.options)||void 0===a?void 0:a.join("\n")):"",f=this.fullFormatForPost!==(null===(l=this.dialogData)||void 0===l?void 0:l.indicator.format)+h,v=this.decodeAndStripHTML(this.defaultValue)!==this.decodeAndStripHTML(null===(s=this.dialogData)||void 0===s?void 0:s.indicator.default),g=+this.required!==parseInt(null===(c=this.dialogData)||void 0===c?void 0:c.indicator.required),y=+this.is_sensitive!==parseInt(null===(d=this.dialogData)||void 0===d?void 0:d.indicator.is_sensitive),b=this.parentID!==(null===(u=this.dialogData)||void 0===u?void 0:u.indicator.parentID),I=!0===this.archived,D=!0===this.deleted;p&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/name"),data:{name:this.name,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind name post err",e)}})),m&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/description"),data:{description:this.description,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind desciption post err",e)}})),f&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/format"),data:{format:this.fullFormatForPost,CSRFToken:this.CSRFToken},success:function(e){"size limit exceeded"===e&&alert("The input format was not saved because it was too long.\nIf you require extended length, please submit a YourIT ticket.")},error:function(e){return console.log("ind format post err",e)}})),v&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/default"),data:{default:this.defaultValue,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind default value post err",e)}})),g&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/required"),data:{required:this.required?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind required post err",e)}})),y&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/sensitive"),data:{is_sensitive:this.is_sensitive?1:0,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind is_sensitive post err",e)}})),y&&!0===this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),I&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:1,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (archive) post err",e)}})),D&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/disabled"),data:{disabled:2,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind disabled (deletion) post err",e)}})),b&&this.parentID!==this.indicatorID&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/parentID"),data:{parentID:this.parentID,CSRFToken:this.CSRFToken},error:function(e){return console.log("ind parentID post err",e)}}))}else this.is_sensitive&&1!=+this.focusedFormRecord.needToKnow&&o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:1,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){var e=document.querySelector("select#needToKnow");null!==e&&(e.value=1,e.dispatchEvent(new Event("change")))},error:function(e){return console.log("set form need to know post err",e)}})),o.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/newIndicator"),data:{name:this.name,format:this.fullFormatForPost,description:this.description,default:this.defaultValue,parentID:this.parentID,categoryID:this.formID,required:this.required?1:0,is_sensitive:this.is_sensitive?1:0,sort:this.newQuestionSortValue,CSRFToken:this.CSRFToken},success:function(e){},error:function(e){return console.log("error posting new question",e)}}));Promise.all(o).then((function(t){t.length>0&&(e.getFormByCategoryID(e.formID),e.showLastUpdate("form_properties_last_update")),e.closeFormDialog()})).catch((function(e){return console.log("an error has occurred",e)}))},radioBehavior:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=null==e?void 0:e.target.id;"archived"===t.toLowerCase()&&this.deleted&&(document.getElementById("deleted").checked=!1,this.deleted=!1),"deleted"===t.toLowerCase()&&this.archived&&(document.getElementById("archived").checked=!1,this.archived=!1)},appAddCell:function(){this.gridJSON.push({})},formatGridDropdown:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=[];if(null!==e&&0!==e.length){var o=e.replaceAll(/,/g,"").split("\n");o=(o=o.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),t=Array.from(new Set(o))}return t},updateGridJSON:function(){var e=this,t=[],o=document.getElementById("gridcell_col_parent");Array.from(o.querySelectorAll("div.cell")).forEach((function(o){var n,i,r,a,l=o.id,s=((null===(n=document.getElementById("gridcell_type_"+l))||void 0===n?void 0:n.value)||"").toLowerCase(),c=new Object;if(c.id=l,c.name=(null===(i=document.getElementById("gridcell_title_"+l))||void 0===i?void 0:i.value)||"No Title",c.type=s,"dropdown"===s){var d=document.getElementById("gridcell_options_"+l);c.options=e.formatGridDropdown(d.value||"")}"dropdown_file"===s&&(c.file=(null===(r=document.getElementById("dropdown_file_select_"+l))||void 0===r?void 0:r.value)||"",c.hasHeader=Boolean(+(null===(a=document.getElementById("dropdown_file_header_select_"+l))||void 0===a?void 0:a.value))),t.push(c)})),this.gridJSON=t},formatIndicatorMultiAnswer:function(){var e=this.multiOptionValue.split("\n");return e=(e=e.map((function(e){return e.trim()}))).map((function(e){return"no"===e?"No":e})),Array.from(new Set(e)).join("\n")},advNameEditorClick:function(){var e=this;$("#advNameEditor").css("display","none"),$("#rawNameEditor").css("display","block"),$("#name").trumbowyg({resetCss:!0,btns:["formatting","bold","italic","underline","|","unorderedList","orderedList","|","link","|","foreColor","|","justifyLeft","justifyCenter","justifyRight"]}),$(".trumbowyg-box").css({"min-height":"130px","max-width":"700px",margin:"0.5rem 0"}),$(".trumbowyg-editor, .trumbowyg-texteditor").css({"min-height":"100px","max-width":"695px","min-width":"506px",height:"100px",padding:"1rem",resize:"both"});var t=Array.from(document.querySelectorAll(".trumbowyg-box button")),o=function(t){var o=t.currentTarget,n=o.classList.contains("trumbowyg-open-dropdown"),i=o.classList.contains("trumbowyg-active");if(13!==(null==t?void 0:t.which)&&32!==(null==t?void 0:t.which)||(o.dispatchEvent(new Event("mousedown")),t.preventDefault(),n&&o.setAttribute("aria-expanded",!i)),9===(null==t?void 0:t.which)){var r=document.querySelector('button[aria-controls="'.concat(o.parentNode.id,'"]')),a=n?"id_".concat(e.trumbowygTitleClassMap[o.title]):"".concat(o.parentNode.id);if(""!==a){var l=document.querySelector("#".concat(a," button")),s=document.querySelector("#".concat(a," button:last-child"));if(!1===t.shiftKey&&n&&i&&null!==l&&(l.focus(),t.preventDefault()),!1===t.shiftKey&&o===s){var c,d=(null==r||null===(c=r.parentNode)||void 0===c?void 0:c.nextSibling)||null;if(null!==d){var u=d.querySelector("button");null!==u&&(u.focus(),t.preventDefault(),r.dispatchEvent(new Event("mousedown")),r.setAttribute("aria-expanded",!1))}}!0===t.shiftKey&&o===l&&null!==r&&(r.focus(),t.preventDefault())}}"click"===t.type&&n&&o.setAttribute("aria-expanded",i)};t.forEach((function(t){if(t.setAttribute("tabindex","0"),["keydown","click"].forEach((function(e){return t.addEventListener(e,o)})),t.classList.contains("trumbowyg-open-dropdown")){var n;t.setAttribute("aria-expanded",!1);var i=(null===(n=e.trumbowygTitleClassMap)||void 0===n?void 0:n[t.title])||null;if(null!==i){t.setAttribute("aria-controls","id_"+i);var r=document.querySelector("."+i);null!==r&&r.setAttribute("id","id_"+i)}}})),this.ariaTextEditorStatus="Using Advanced formatting.",document.getElementById("rawNameEditor").focus()},rawNameEditorClick:function(){$("#advNameEditor").css("display","block"),$("#rawNameEditor").css("display","none"),$("#name").trumbowyg("destroy"),this.ariaTextEditorStatus="Showing formatted code.",document.getElementById("advNameEditor").focus()}},watch:{format:function(e,t){var o=this;if(this.defaultValue="",this.orgchartFormats.includes(e)){var n=e.slice(e.indexOf("_")+1);this.initializeOrgSelector(n,this.indicatorID,"modal_","",this.setOrgSelDefaultValue);var i=document.querySelector("#modal_orgSel_".concat(this.indicatorID," input"));null!==i&&i.addEventListener("change",(function(e){""===e.target.value.trim()&&(o.defaultValue="")}))}}},template:'
                            \n
                            \n
                            \n \n \n \n \n
                            \n
                            \n \n \n
                            \n
                            \n
                            \n \n
                            \n \n \n
                            \n
                            \n

                            Format Information

                            \n {{ format !== \'\' ? formatInfo[format] : \'No format. Indicators without a format are often used to provide additional information for the user. They are often used for form section headers.\' }}\n
                            \n
                            \n
                            \n \n \n
                            \n
                            \n \n \n
                            \n
                            \n \n
                            \n
                            \n  Columns ({{gridJSON.length}}):\n
                            \n
                            \n \n \n
                            \n
                            \n
                            \n \n
                            \n
                            \n \n
                            \n
                            \n
                            \n Attributes\n
                            \n \n \n
                            \n \n
                            \n
                            \n \n
                            \n \n
                            \n \n This field will be archived.  It can be
                            re-enabled by using Restore Fields.\n
                            \n \n Deleted items can only be re-enabled
                            within 30 days by using Restore Fields.\n
                            \n
                            \n
                            '},l={name:"advanced-options-dialog",data:function(){var e,t;return{requiredDataProperties:["indicatorID","html","htmlPrint"],initialFocusElID:"#advanced legend",left:"{{",right:"}}",codeEditorHtml:{},codeEditorHtmlPrint:{},html:(null===(e=this.dialogData)||void 0===e?void 0:e.html)||"",htmlPrint:(null===(t=this.dialogData)||void 0===t?void 0:t.htmlPrint)||""}},inject:["APIroot","libsPath","CSRFToken","setDialogSaveFunction","dialogData","checkRequiredData","closeFormDialog","focusedFormRecord","getFormByCategoryID","hasDevConsoleAccess"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){var e;null===(e=document.querySelector(this.initialFocusElID))||void 0===e||e.focus(),this.hasDevConsoleAccess&&this.setupAdvancedOptions()},computed:{indicatorID:function(){var e;return null===(e=this.dialogData)||void 0===e?void 0:e.indicatorID},formID:function(){return this.focusedFormRecord.categoryID}},methods:{setupAdvancedOptions:function(){var e=this;this.codeEditorHtml=CodeMirror.fromTextArea(document.getElementById("html"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTML()}}}),this.addCodeMirrorAria("html","codemirror_html_label"),this.codeEditorHtmlPrint=CodeMirror.fromTextArea(document.getElementById("htmlPrint"),{mode:"htmlmixed",lineNumbers:!0,extraKeys:{F11:function(e){e.setOption("fullScreen",!e.getOption("fullScreen"))},Esc:function(e){if(e.getOption("fullScreen"))e.setOption("fullScreen",!1);else{var t={Tab:!1,"Shift-Tab":!1};e.addKeyMap(t),setTimeout((function(){e.removeKeyMap(t)}),2500)}},"Ctrl-S":function(t){e.saveCodeHTMLPrint()}}}),this.addCodeMirrorAria("htmlPrint","codemirror_htmlPrint_label"),$(".CodeMirror").css("border","1px solid black")},addCodeMirrorAria:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=document.querySelector("#".concat(e," + .CodeMirror textarea"));null!==o&&(o.setAttribute("id",t),o.setAttribute("role","textbox"),o.setAttribute("aria-multiline",!0),o.setAttribute("aria-label","Coding area. Press escape twice followed by tab to navigate out."))},saveCodeHTML:function(){var e=this,t=this.codeEditorHtml.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:t,CSRFToken:this.CSRFToken},success:function(){e.html=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_html").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},saveCodeHTMLPrint:function(){var e=this,t=this.codeEditorHtmlPrint.getValue();$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:t,CSRFToken:this.CSRFToken},success:function(){e.htmlPrint=t;var o=(new Date).toLocaleTimeString();document.getElementById("codeSaveStatus_htmlPrint").innerHTML=", Last saved: "+o,e.getFormByCategoryID(e.formID)},error:function(e){return console.log(e)}})},onSave:function(){var e=this,t=[],o=this.html!==this.codeEditorHtml.getValue(),n=this.htmlPrint!==this.codeEditorHtmlPrint.getValue();o&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/html"),data:{html:this.codeEditorHtml.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind html post err",e)}})),n&&t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.indicatorID,"/htmlPrint"),data:{htmlPrint:this.codeEditorHtmlPrint.getValue(),CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind htmlPrint post err",e)}})),Promise.all(t).then((function(t){e.closeFormDialog(),t.length>0&&e.getFormByCategoryID(e.formID)})).catch((function(e){return console.log("an error has occurred",e)}))}},template:'
                            \n
                            Template Variables and Controls\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
                            {{ left }} iID {{ right }}The indicatorID # of the current data field.Ctrl-SSave the focused section
                            {{ left }} recordID {{ right }}The record ID # of the current request.F11Toggle Full Screen mode for the focused section
                            {{ left }} data {{ right }}The contents of the current data field as stored in the database.EscEscape Full Screen mode
                            \n
                            \n Within the code editor, tab enters a tab character. If using the keyboard to navigate, press escape followed by tab to exit the editor.\n

                            \n
                            \n \n \n
                            \n
                            \n
                            \n \n \n
                            \n \n
                            \n
                            \n
                            \n Notice:
                            \n

                            Please go to LEAF Programmer\n to ensure continued access to this area.

                            \n
                            '};var s=o(448);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function d(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function u(e,t,o){return(t=function(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=c(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p={name:"staple-form-dialog",data:function(){var e;return{requiredDataProperties:["mainFormID"],mainFormID:(null===(e=this.dialogData)||void 0===e?void 0:e.mainFormID)||"",catIDtoStaple:"",ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","truncateText","decodeAndStripHTML","categories","dialogData","checkRequiredData","closeFormDialog","updateStapledFormsInfo"],created:function(){this.setDialogSaveFunction(this.onSave),this.checkRequiredData(this.requiredDataProperties)},mounted:function(){if(this.isSubform&&this.closeFormDialog(),this.mergeableForms.length>0){var e=document.getElementById("select-form-to-staple");null!==e&&e.focus()}else{var t=document.getElementById("button_save");null!==t&&(t.style.display="none")}},computed:{isSubform:function(){var e;return""!==(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.parentID)},currentStapleIDs:function(){var e;return(null===(e=this.categories[this.mainFormID])||void 0===e?void 0:e.stapledFormIDs)||[]},mergeableForms:function(){var e=this,t=[],o=function(){var o=parseInt(e.categories[n].workflowID),i=e.categories[n].categoryID,r=e.categories[n].parentID,a=e.currentStapleIDs.every((function(e){return e!==i}));0===o&&""===r&&i!==e.mainFormID&&a&&t.push(function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"";$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(){var o;e.ariaStatus="Removed stapled form ".concat((null===(o=e.categories[t])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,t,!0)},error:function(e){return console.log(e)}})},onSave:function(){var e=this;""!==this.catIDtoStaple&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.mainFormID,"/stapled"),data:{CSRFToken:this.CSRFToken,stapledCategoryID:this.catIDtoStaple},success:function(t){var o;1!=+t?alert(t):(e.ariaStatus="Added stapled form ".concat((null===(o=e.categories[e.catIDtoStaple])||void 0===o?void 0:o.categoryName)||""),e.updateStapledFormsInfo(e.mainFormID,e.catIDtoStaple),e.catIDtoStaple="")},error:function(e){return console.log(e)},cache:!1})}},watch:{mergeableForms:function(e,t){var o=e.length,n=t.length;if(0===o||0===n&&o>0){var i=document.getElementById("button_save");null!==i&&(i.style.display=0===o?"none":"flex")}}},template:'
                            \n
                            \n

                            Stapled forms will show up on the same page as the primary form.

                            \n

                            The order of the forms will be determined by the forms\' assigned sort values.

                            \n
                            \n
                              \n
                            • \n {{truncateText(decodeAndStripHTML(categories[id]?.categoryName || \'Untitled\')) }}\n \n
                            • \n
                            \n

                            \n
                            \n \n
                            There are no available forms to merge
                            \n
                            \n
                            '},m={name:"edit-collaborators-dialog",data:function(){return{formID:this.focusedFormRecord.categoryID,group:"",allGroups:[],collaborators:[],ariaStatus:""}},inject:["APIroot","CSRFToken","setDialogSaveFunction","categories","focusedFormRecord","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},mounted:function(){var e=this,t=[$.ajax({type:"GET",url:"".concat(this.APIroot,"system/groups"),success:function(t){e.allGroups=t},error:function(e){return console.log(e)},cache:!1}),$.ajax({type:"GET",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),success:function(t){e.collaborators=t},error:function(e){return console.log(e)},cache:!1})];Promise.all(t).then((function(){var e=document.getElementById("selectFormCollaborators");null!==e&&e.focus()})).catch((function(e){return console.log("an error has occurred",e)}))},computed:{availableGroups:function(){var e=[];return this.collaborators.map((function(t){return e.push(parseInt(t.groupID))})),this.allGroups.filter((function(t){return!e.includes(parseInt(t.groupID))}))}},methods:{removePermission:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:t,read:0,write:0},success:function(n){e.collaborators=e.collaborators.filter((function(e){return parseInt(e.groupID)!==t})),e.ariaStatus="Removed ".concat(o," from collaborators")},error:function(e){return console.log(e)}})},formNameStripped:function(){var e=this.categories[this.formID].categoryName;return XSSHelpers.stripAllTags(e)||"Untitled"},onSave:function(){var e=this;""!==this.group&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/_").concat(this.formID,"/privileges"),data:{CSRFToken:this.CSRFToken,groupID:parseInt(this.group.groupID),read:1,write:1},success:function(t){void 0===e.collaborators.find((function(t){return parseInt(t.groupID)===parseInt(e.group.groupID)}))&&(e.ariaStatus="Added ".concat(e.group.name," to collaborators"),e.collaborators.push({groupID:e.group.groupID,name:e.group.name}),e.group="")},error:function(e){return console.log(e)},cache:!1})}},template:'
                            \n

                            What is this?

                            \n

                            With paper forms, people who have posession of the record have the ability to update it. This rule is used in LEAF, and people gain posession when a record reaches their step in the workflow. All modifications are timestamped with their respective authors.

                            \n
                            \n

                            To provide flexibility, specific groups can be granted permission to update information at any time in the workflow. This can be useful if you have internal-use fields, and want certain groups of people to update information at any time.

                            \n
                            \n

                            The following groups can update {{formNameStripped()}} records at any time:

                            \n
                            \n
                            \n \n \n

                            \n
                            \n \n
                            There are no available groups to add
                            \n
                            \n
                            '},h={name:"confirm-delete-dialog",inject:["APIroot","CSRFToken","setDialogSaveFunction","decodeAndStripHTML","focusedFormRecord","getFormByCategoryID","removeCategory","closeFormDialog"],created:function(){this.setDialogSaveFunction(this.onSave)},computed:{formName:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryName))},formDescription:function(){return XSSHelpers.stripAllTags(this.decodeAndStripHTML(this.focusedFormRecord.categoryDescription))},currentStapleIDs:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e?void 0:e.stapledFormIDs)||[]}},methods:{onSave:function(){var e=this;if(0===this.currentStapleIDs.length){var t=this.focusedFormRecord.categoryID,o=this.focusedFormRecord.parentID;$.ajax({type:"DELETE",url:"".concat(this.APIroot,"formStack/_").concat(t,"?")+$.param({CSRFToken:this.CSRFToken}),success:function(n){1==+n?(e.removeCategory(t),""===o?e.$router.push({name:"browser"}):e.getFormByCategoryID(o,!0),e.closeFormDialog()):alert(n)},error:function(e){return console.log("an error has occurred",e)}})}else alert("Please remove all stapled forms before deleting.")}},template:'
                            \n
                            Are you sure you want to delete this form?
                            \n
                            {{formName}}
                            \n
                            {{formDescription}}
                            \n
                            ⚠️ This form still has stapled forms attached
                            \n
                            '};function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function v(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function g(e,t,o){return(t=function(e){var t=function(e){if("object"!=f(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=f(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o0&&void 0!==arguments[0]?arguments[0]:0;this.parentIndID=e,this.selectedParentValueOptions.includes(this.selectedParentValue)||(this.selectedParentValue="")},updateSelectedOutcome:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.selectedOutcome=e.toLowerCase(),this.selectedChildValue="",this.crosswalkFile="",this.crosswalkHasHeader=!1,this.level2IndID=null,"pre-fill"===this.selectedOutcome&&this.addOrgSelector()},updateSelectedOptionValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"parent",o="";if(!0===(null==e?void 0:e.multiple)?(Array.from(e.selectedOptions).forEach((function(e){o+=e.label.trim()+"\n"})),o=o.trim()):o=e.value.trim(),"parent"===t.toLowerCase()){if(this.selectedParentValue=XSSHelpers.stripAllTags(o),"number"===this.parentFormat||"currency"===this.parentFormat)if(/^(\d*)(\.\d+)?$/.test(o)){var n=parseFloat(o);this.selectedParentValue="currency"===this.parentFormat?(Math.round(100*n)/100).toFixed(2):String(n)}else this.selectedParentValue=""}else"child"===t.toLowerCase()&&(this.selectedChildValue=XSSHelpers.stripAllTags(o))},newCondition:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.selectedConditionJSON="",this.showConditionEditor=e,this.selectedOperator="",this.parentIndID=0,this.selectedParentValue="",this.selectedOutcome="",this.selectedChildValue="",e&&(this.ariaStatus="Entering new condition")},postConditions:function(){var e,t=this,o=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.conditionComplete||!1===o){this.ariaStatus="";var n=(e=this.savedConditions,function(e){if(Array.isArray(e))return y(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?y(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).filter((function(e){return JSON.stringify(e)!==t.selectedConditionJSON}));n.forEach((function(e){e.childIndID=parseInt(e.childIndID),e.parentIndID=parseInt(e.parentIndID),e.selectedChildValue=XSSHelpers.stripAllTags(e.selectedChildValue),e.selectedParentValue=XSSHelpers.stripAllTags(e.selectedParentValue)}));var i=JSON.stringify(this.conditions),r=n.every((function(e){return JSON.stringify(e)!==i}));!0===o&&r&&n.push(this.conditions),n=n.length>0?JSON.stringify(n):"",$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/").concat(this.childIndID,"/conditions"),data:{conditions:n,CSRFToken:this.CSRFToken},success:function(e){if("Invalid Token."!==e){t.getFormByCategoryID(t.formID),t.indicators.find((function(e){return e.indicatorID===t.childIndID})).conditions=n,t.showRemoveModal=!1,t.newCondition(!1);var o=document.getElementById("leaf-vue-dialog-close");null!==o&&o.focus(),setTimeout((function(){t.ariaStatus="Updated question conditions"}))}else console.log("error adding condition",e)},error:function(e){return console.log(e)}})}},removeCondition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.confirmDelete,o=void 0!==t&&t,n=e.condition,i=void 0===n?{}:n;!0===o?this.postConditions(!1):(this.selectConditionFromList(i),this.showRemoveModal=!0)},selectConditionFromList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.selectedConditionJSON=JSON.stringify(e),this.parentIndID=parseInt((null==e?void 0:e.parentIndID)||0),this.selectedOperator=(null==e?void 0:e.selectedOp)||"",this.selectedOutcome=((null==e?void 0:e.selectedOutcome)||"").toLowerCase(),this.selectedParentValue=(null==e?void 0:e.selectedParentValue)||"",this.selectedChildValue=(null==e?void 0:e.selectedChildValue)||"",this.crosswalkFile=(null==e?void 0:e.crosswalkFile)||"",this.crosswalkHasHeader=(null==e?void 0:e.crosswalkHasHeader)||!1,this.level2IndID=(null==e?void 0:e.level2IndID)||null,this.showConditionEditor=!0,this.ariaStatus="Editing conditions",this.addOrgSelector()},getIndicatorName:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=(null===(e=this.indicators.find((function(e){return parseInt(e.indicatorID)===t})))||void 0===e?void 0:e.name)||"";return o=this.decodeAndStripHTML(o),this.truncateText(o)},getOperatorText:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.parentFormat.toLowerCase(),o=e.selectedOp,n=e.selectedOp;switch(n){case"==":o=this.multiOptionFormats.includes(t)?"includes":"is";break;case"!=":o=this.multiOptionFormats.includes(t)?"does not include":"is not";break;case"gt":case"gte":case"lt":case"lte":var i=n.includes("g")?"greater than":"less than",r=n.includes("e")?" or equal to":"";o="is ".concat(i).concat(r)}return o},isOrphan:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=parseInt((null==e?void 0:e.parentIndID)||0);return"crosswalk"!==e.selectedOutcome.toLowerCase()&&!this.selectableParents.some((function(e){return parseInt(e.indicatorID)===t}))},listHeaderText:function(){var e="";switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"show":e="This field will be hidden except:";break;case"hide":e="This field will be shown except:";break;case"prefill":e="This field will be pre-filled:";break;case"crosswalk":e="This field has loaded dropdown(s)"}return e},childFormatChangedSinceSave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=((null==e?void 0:e.childFormat)||"").toLowerCase().trim(),o=((null==e?void 0:e.parentFormat)||"").toLowerCase().trim(),n=parseInt((null==e?void 0:e.parentIndID)||0),i=this.selectableParents.find((function(e){return e.indicatorID===n})),r=(null==i?void 0:i.format)||"";return t!==this.childFormat||o!==r},updateChoicesJS:function(){var e=this;setTimeout((function(){var t,o=document.querySelector("#child_choices_wrapper > div.choices"),n=document.getElementById("parent_compValue_entry_multi"),i=document.getElementById("child_prefill_entry_multi"),r=e.conditions.selectedOutcome;if(e.multiOptionFormats.includes(e.parentFormat)&&null!==n&&!0!==(null==n||null===(t=n.choicesjs)||void 0===t?void 0:t.initialised)){var a=e.conditions.selectedParentValue.split("\n")||[];a=a.map((function(t){return e.decodeAndStripHTML(t).trim()}));var l=e.selectedParentValueOptions;l=l.map((function(e){return{value:e.trim(),label:e.trim(),selected:a.includes(e.trim())}}));var s=new Choices(n,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});n.choicesjs=s;var c=document.querySelector(".child_prefill_entry_multi input.choices__input");null!==c&&(c.setAttribute("aria-label","child prefill value choices"),c.setAttribute("role","searchbox"))}if("pre-fill"===r&&e.multiOptionFormats.includes(e.childFormat)&&null!==i&&null===o){var d=e.conditions.selectedChildValue.split("\n")||[];d=d.map((function(t){return e.decodeAndStripHTML(t).trim()}));var u=e.selectedChildValueOptions;u=u.map((function(e){return{value:e.trim(),label:e.trim(),selected:d.includes(e.trim())}}));var p=new Choices(i,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:u.filter((function(e){return""!==e.value}))});i.choicesjs=p;var m=document.querySelector(".parent_compValue_entry_multi input.choices__input");null!==m&&(m.setAttribute("aria-label","parent value choices"),m.setAttribute("role","searchbox"))}}))},addOrgSelector:function(){var e=this;if("pre-fill"===this.selectedOutcome&&this.orgchartFormats.includes(this.childFormat)){var t=this.childFormat.slice(this.childFormat.indexOf("_")+1);setTimeout((function(){e.initializeOrgSelector(t,e.childIndID,"ifthen_child_",e.selectedChildValue,e.setOrgSelChildValue)}))}},setOrgSelChildValue:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};void 0!==e.selection&&(this.orgchartSelectData=e.selectionData[e.selection],this.selectedChildValue=e.selection.toString())},onSave:function(){this.postConditions(!0)}},computed:{formID:function(){return this.focusedFormRecord.categoryID},showSetup:function(){return this.showConditionEditor&&this.selectedOutcome&&("crosswalk"===this.selectedOutcome||this.selectableParents.length>0)},conditionOverviewText:function(){return"crosswalk"!==this.selectedOutcome.toLowerCase()?"If ".concat(this.getIndicatorName(this.parentIndID)," ").concat(this.getOperatorText(this.conditions)," ").concat(this.decodeAndStripHTML(this.selectedParentValue),"\n then ").concat(this.selectedOutcome," this question."):"Question options loaded from ".concat(this.conditions.crosswalkFile)},noOptions:function(){return!["","crosswalk"].includes(this.selectedOutcome)&&this.selectableParents.length<1},childIndID:function(){return this.dialogData.indicatorID},childIndicator:function(){var e=this;return this.indicators.find((function(t){return t.indicatorID===e.childIndID}))},selectedParentIndicator:function(){var e=this,t=this.selectableParents.find((function(t){return t.indicatorID===parseInt(e.parentIndID)}));return void 0===t?{}:function(e){for(var t=1;t1?"s":"";i="".concat(r," '").concat(this.decodeAndStripHTML(this.selectedChildValue),"'");break;default:i=" '".concat(this.decodeAndStripHTML(this.selectedChildValue),"'")}return i},childChoicesKey:function(){return this.selectedConditionJSON+this.selectedOutcome},parentChoicesKey:function(){return this.selectedConditionJSON+String(this.parentIndID)+this.selectedOperator},conditions:function(){var e,t;return{childIndID:parseInt((null===(e=this.childIndicator)||void 0===e?void 0:e.indicatorID)||0),parentIndID:parseInt((null===(t=this.selectedParentIndicator)||void 0===t?void 0:t.indicatorID)||0),selectedOp:this.selectedOperator,selectedParentValue:XSSHelpers.stripAllTags(this.selectedParentValue),selectedChildValue:XSSHelpers.stripAllTags(this.selectedChildValue),selectedOutcome:this.selectedOutcome.toLowerCase(),crosswalkFile:this.crosswalkFile,crosswalkHasHeader:this.crosswalkHasHeader,level2IndID:this.level2IndID,childFormat:this.childFormat,parentFormat:this.parentFormat}},conditionComplete:function(){var e=this.conditions,t=e.parentIndID,o=e.selectedOp,n=e.selectedParentValue,i=e.selectedChildValue,r=e.selectedOutcome,a=e.crosswalkFile,l=!1;if(!this.showRemoveModal)switch(r){case"pre-fill":l=0!==t&&""!==o&&""!==n&&""!==i;break;case"hide":case"show":l=0!==t&&""!==o&&""!==n;break;case"crosswalk":l=""!==a}var s=document.getElementById("button_save");return null!==s&&(s.style.display=!0===l?"block":"none"),l},savedConditions:function(){return"string"==typeof this.childIndicator.conditions&&"["===this.childIndicator.conditions[0]?JSON.parse(this.childIndicator.conditions):[]},conditionTypes:function(){return{show:this.savedConditions.filter((function(e){return"show"===e.selectedOutcome.toLowerCase()})),hide:this.savedConditions.filter((function(e){return"hide"===e.selectedOutcome.toLowerCase()})),prefill:this.savedConditions.filter((function(e){return"pre-fill"===e.selectedOutcome.toLowerCase()})),crosswalk:this.savedConditions.filter((function(e){return"crosswalk"===e.selectedOutcome.toLowerCase()}))}}},watch:{showRemoveModal:function(e){var t=document.getElementById("leaf-vue-dialog-cancel-save");null!==t&&(t.style.display=!0===e?"none":"flex",!0===e?t.setAttribute("aria-hidden",!0):t.removeAttribute("aria-hidden"),this.ariaStatus=!0===e?"Confirm Deletion":"")},childChoicesKey:function(e,t){"pre-fill"==this.selectedOutcome.toLowerCase()&&this.multiOptionFormats.includes(this.childFormat)&&this.updateChoicesJS()},parentChoicesKey:function(e,t){this.multiOptionFormats.includes(this.parentFormat)&&this.updateChoicesJS()},selectedOperator:function(e,t){""!==t&&this.numericOperators.includes(e)&&!this.numericOperators.includes(t)&&(this.selectedParentValue="")}},template:'
                            \n \x3c!-- LOADING SPINNER --\x3e\n
                            \n Loading... \n
                            \n
                            \n \x3c!-- NOTE: DELETION DIALOG --\x3e\n
                            \n
                            \n
                            Choose Delete to remove this condition, or cancel to return to the editor
                            \n
                            {{ conditionOverviewText }}
                            \n
                            \n \n \n
                            \n
                            \n \n
                            \n
                            '};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function w(e){for(var t=1;t\n
                            \n

                            This is a Nationally Standardized Subordinate Site

                            \n Do not make modifications!  Synchronization problems will occur.  Please contact your process POC if modifications need to be made.\n
                            '},F={name:"form-question-display",props:{categoryID:String,depth:Number,formPage:Number,index:Number,currentListLength:Number,formNode:Object},components:{FormatPreview:{name:"format-preview",data:function(){return{indID:this.indicator.indicatorID}},props:{indicator:Object},inject:["libsPath","initializeOrgSelector","orgchartFormats","decodeAndStripHTML","updateChosenAttributes"],computed:{baseFormat:function(){var e;return(null===(e=this.indicator.format)||void 0===e||null===(e=e.toLowerCase())||void 0===e?void 0:e.trim())||""},truncatedOptions:function(){var e;return(null===(e=this.indicator.options)||void 0===e?void 0:e.slice(0,6))||[]},defaultValue:function(){var e;return(null===(e=this.indicator)||void 0===e?void 0:e.default)||""},strippedDefault:function(){return this.decodeAndStripHTML(this.defaultValue||"")},inputElID:function(){return"input_preview_".concat(this.indID)},selType:function(){return this.baseFormat.slice(this.baseFormat.indexOf("_")+1)},labelSelector:function(){return"format_label_"+this.indID},printResponseID:function(){return"xhrIndicator_".concat(this.indID,"_").concat(this.indicator.series)},gridOptions:function(){var e,t=JSON.parse((null===(e=this.indicator)||void 0===e?void 0:e.options)||"[]");return t.map((function(e){e.name=XSSHelpers.stripAllTags(e.name),null!=e&&e.options&&e.options.map((function(e){return XSSHelpers.stripAllTags(e)}))})),t}},mounted:function(){var e,t,o,n,i,r=this;switch(this.baseFormat){case"raw_data":break;case"date":$("#".concat(this.inputElID)).datepicker({autoHide:!0,showAnim:"slideDown",onSelect:function(){$("#"+r.indID+"_focusfix").focus()}}),null===(e=document.getElementById(this.inputElID))||void 0===e||e.setAttribute("aria-labelledby",this.labelSelector);break;case"dropdown":$("#".concat(this.inputElID)).chosen({disable_search_threshold:5,allow_single_deselect:!0,width:"50%"}),this.updateChosenAttributes(this.inputElID,this.labelSelector,"Select Question Option");break;case"multiselect":var a=document.getElementById(this.inputElID);if(null!==a&&!0===a.multiple&&"active"!==(null==a?void 0:a.getAttribute("data-choice"))){var l=this.indicator.options||[];l=l.map((function(e){return{value:e,label:e,selected:""!==r.strippedDefault&&r.strippedDefault===e}}));var s=new Choices(a,{placeholderValue:"Type here to search",allowHTML:!1,removeItemButton:!0,editItems:!0,choices:l.filter((function(e){return""!==e.value}))});a.choicesjs=s}var c=document.querySelector("#".concat(this.inputElID," ~ input.choices__input"));null!==c&&(c.setAttribute("aria-labelledby",this.labelSelector),c.setAttribute("role","searchbox"));break;case"orgchart_group":case"orgchart_position":case"orgchart_employee":this.initializeOrgSelector(this.selType,this.indID,"",(null===(t=this.indicator)||void 0===t?void 0:t.default)||"");break;case"checkbox":null===(o=document.getElementById(this.inputElID+"_check0"))||void 0===o||o.setAttribute("aria-labelledby",this.labelSelector);break;case"checkboxes":case"radio":null===(n=document.querySelector("#".concat(this.printResponseID," .format-preview")))||void 0===n||n.setAttribute("aria-labelledby",this.labelSelector);break;default:null===(i=document.getElementById(this.inputElID))||void 0===i||i.setAttribute("aria-labelledby",this.labelSelector)}},methods:{useAdvancedEditor:function(){$("#"+this.inputElID).trumbowyg({btns:["bold","italic","underline","|","unorderedList","orderedList","|","justifyLeft","justifyCenter","justifyRight","fullscreen"]}),$("#textarea_format_button_".concat(this.indID)).css("display","none")}},template:'
                            \n \n \n\n \n\n \n\n \n\n \n\n \n \n
                            File Attachment(s)\n

                            Select File to attach:

                            \n \n
                            \n\n \n\n \n \n \n \n \n\n \n
                            '}},inject:["libsPath","newQuestion","shortIndicatorNameStripped","focusedFormID","focusedIndicatorID","editQuestion","hasDevConsoleAccess","editAdvancedOptions","openIfThenDialog","listTracker","previewMode","makePreviewKey"],computed:{indicatorID:function(){var e;return+(null===(e=this.formNode)||void 0===e?void 0:e.indicatorID)},isHeader:function(){return 0===this.depth},hasCode:function(){var e,t;return""!==((null===(e=this.formNode)||void 0===e?void 0:e.html)||"").trim()||""!==((null===(t=this.formNode)||void 0===t?void 0:t.htmlPrint)||"").trim()},conditionalQuestion:function(){return!this.isHeader&&null!==this.formNode.conditions&&""!==this.formNode.conditions&"null"!==this.formNode.conditions},conditionsAllowed:function(){return!this.isHeader&&"raw_data"!==(this.formNode.format||"").toLowerCase()},indicatorName:function(){var e,t=0===this.depth?'
                            '.concat(this.formPage+1,"
                            "):"",o=this.required?'* Required':"",n=""===((null===(e=this.formNode)||void 0===e?void 0:e.description)||"")||this.previewMode?"":' ('.concat(this.formNode.description,")"),i=0===this.depth&&this.formNode.categoryID!==this.focusedFormID?'':"",r=""!==this.formNode.name.trim()?''+this.formNode.name.trim()+"":'[ blank ]';return"".concat(t).concat(i).concat(r).concat(n).concat(o)},hasSpecialAccessRestrictions:function(){return 1===parseInt(this.formNode.isMaskable)},required:function(){return 1===parseInt(this.formNode.required)},sensitive:function(){return 1===parseInt(this.formNode.is_sensitive)}},template:'
                            \n
                            \n \x3c!-- TOOLBAR --\x3e\n
                            \n\n
                            \n \n \n \n \n
                            \n \n \n \n 🔒\n ⛓️\n ⚙️\n
                            \n
                            \n
                            \n \x3c!-- NAME --\x3e\n
                            \n
                            \n
                            \n\n \x3c!-- FORMAT PREVIEW --\x3e\n \n
                            '},k={name:"form-index-listing",props:{categoryID:String,formPage:Number,depth:Number,indicatorID:Number,formNode:Object,index:Number,currentListLength:Number,parentID:Number},components:{FormQuestionDisplay:F},inject:["shortIndicatorNameStripped","clearListItem","addToListTracker","previewMode","setIndicatorFocus","clickToMoveListItem","focusedIndicatorID","startDrag","endDrag","handleOnDragCustomizations","onDragEnter","onDragLeave","onDrop","makePreviewKey","newQuestion"],mounted:function(){this.previewMode||this.addToListTracker(this.formNode,this.parentID,this.index)},beforeUnmount:function(){this.clearListItem(this.formNode.indicatorID)},computed:{suffix:function(){return"".concat(this.formNode.indicatorID,"_").concat(this.formNode.series)},printResponseID:function(){return"xhrIndicator_".concat(this.suffix)},required:function(){return 1===parseInt(this.formNode.required)},hasClickToMoveOptions:function(){return this.currentListLength>1}},template:'\n
                            \n\n \x3c!-- VISIBLE DRAG INDICATOR (event is on li itself) / CLICK UP DOWN options --\x3e\n
                            \n
                            \n \n
                            \n
                            \n \n \n
                            \n
                            \n\n \n \n \n \x3c!-- NOTE: ul for drop zones always needs to be here in edit mode even if there are no current children --\x3e\n
                              \n\n \n \n
                            \n
                            \n \n
                            \n
                            \n

                          2. '},T={name:"edit-properties-panel",data:function(){var e,t,o,n,i,r,a,l,s,c;return{categoryName:this.decodeAndStripHTML((null===(e=this.focusedFormRecord)||void 0===e?void 0:e.categoryName)||"Untitled"),categoryDescription:this.decodeAndStripHTML((null===(t=this.focusedFormRecord)||void 0===t?void 0:t.categoryDescription)||""),workflowID:parseInt(null===(o=this.focusedFormRecord)||void 0===o?void 0:o.workflowID)||0,needToKnow:parseInt(null===(n=this.focusedFormRecord)||void 0===n?void 0:n.needToKnow)||0,visible:parseInt(null===(i=this.focusedFormRecord)||void 0===i?void 0:i.visible)||0,type:(null===(r=this.focusedFormRecord)||void 0===r?void 0:r.type)||"",formID:(null===(a=this.focusedFormRecord)||void 0===a?void 0:a.categoryID)||"",formParentID:(null===(l=this.focusedFormRecord)||void 0===l?void 0:l.parentID)||"",destructionAgeYears:(null===(s=this.focusedFormRecord)||void 0===s?void 0:s.destructionAge)>0?(null===(c=this.focusedFormRecord)||void 0===c?void 0:c.destructionAge)/365:null,workflowsLoading:!0,workflowRecords:[]}},created:function(){this.getWorkflowRecords()},mounted:function(){this.focusedFormIsSensitive&&0==+this.needToKnow&&this.updateNeedToKnow(!0)},inject:["APIroot","CSRFToken","appIsLoadingForm","allStapledFormCatIDs","focusedFormRecord","focusedFormIsSensitive","updateCategoriesProperty","openEditCollaboratorsDialog","openFormHistoryDialog","showLastUpdate","truncateText","decodeAndStripHTML"],computed:{loading:function(){return this.appIsLoadingForm||this.workflowsLoading},workflowDescription:function(){var e=this,t="";if(0!==this.workflowID){var o=this.workflowRecords.find((function(t){return parseInt(t.workflowID)===e.workflowID}));t=(null==o?void 0:o.description)||""}return t},isSubForm:function(){return""!==this.focusedFormRecord.parentID},isStaple:function(){var e;return(null===(e=this.allStapledFormCatIDs)||void 0===e?void 0:e[this.formID])>0},isNeedToKnow:function(){return 1===parseInt(this.focusedFormRecord.needToKnow)},formNameCharsRemaining:function(){return 50-this.categoryName.length},formDescrCharsRemaining:function(){return 255-this.categoryDescription.length}},methods:{getWorkflowRecords:function(){var e=this;$.ajax({type:"GET",url:"".concat(this.APIroot,"workflow"),success:function(t){e.workflowRecords=t||[],e.workflowsLoading=!1},error:function(e){return console.log(e)}})},updateName:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formName"),data:{name:XSSHelpers.stripAllTags(this.categoryName),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryName",e.categoryName),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("name post err",e)}})},updateDescription:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formDescription"),data:{description:XSSHelpers.stripAllTags(this.categoryDescription),categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"categoryDescription",e.categoryDescription),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("form description post err",e)}})},updateWorkflow:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formWorkflow"),data:{workflowID:this.workflowID,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){0==+t?alert("The workflow could not be set because this form is stapled to another form"):(e.updateCategoriesProperty(e.formID,"workflowID",e.workflowID),e.updateCategoriesProperty(e.formID,"workflowDescription",e.workflowDescription),e.showLastUpdate("form_properties_last_update"))},error:function(e){return console.log("workflow post err",e)}})},updateAvailability:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formVisible"),data:{visible:this.visible,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"visible",e.visible),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("visibility post err",e)}})},updateNeedToKnow:function(){var e=this,t=!0===(arguments.length>0&&void 0!==arguments[0]&&arguments[0])?1:this.needToKnow;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formNeedToKnow"),data:{needToKnow:t,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"needToKnow",t),e.needToKnow=t,e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("ntk post err",e)}})},updateType:function(){var e=this;$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/formType"),data:{type:this.type,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(){e.updateCategoriesProperty(e.formID,"type",e.type),e.showLastUpdate("form_properties_last_update")},error:function(e){return console.log("type post err",e)}})},updateDestructionAge:function(){var e=this;(null===this.destructionAgeYears||this.destructionAgeYears>=1&&this.destructionAgeYears<=30)&&$.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/destructionAge"),data:{destructionAge:this.destructionAgeYears,categoryID:this.formID,CSRFToken:this.CSRFToken},success:function(t){var o;if(2==+(null==t||null===(o=t.status)||void 0===o?void 0:o.code)&&+t.data==365*+e.destructionAgeYears){var n=(null==t?void 0:t.data)>0?+t.data:null;e.updateCategoriesProperty(e.formID,"destructionAge",n),e.showLastUpdate("form_properties_last_update")}},error:function(e){return console.log("destruction age post err",e)}})}},template:'
                            \n {{formID}}\n (internal for {{formParentID}})\n \n
                            \n \n \n \n \n \n
                            \n
                            \n
                            \n \n
                            \n \n
                            This is an Internal Form
                            \n
                            \n
                            '};function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function O(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function C(e){for(var t=1;t0){var n,i,r,a=[];for(var l in this.categories)this.categories[l].parentID===this.currentCategoryQuery.categoryID&&a.push(C({},this.categories[l]));((null===(n=this.currentCategoryQuery)||void 0===n?void 0:n.stapledFormIDs)||[]).forEach((function(e){var n=[];for(var i in t.categories)t.categories[i].parentID===e&&n.push(C({},t.categories[i]));o.push(C(C({},t.categories[e]),{},{formContextType:"staple",internalForms:n}))}));var s=""!==this.currentCategoryQuery.parentID?"internal":(null===(i=this.allStapledFormCatIDs)||void 0===i?void 0:i[(null===(r=this.currentCategoryQuery)||void 0===r?void 0:r.categoryID)||""])>0?"staple":"main form";o.push(C(C({},this.currentCategoryQuery),{},{formContextType:s,internalForms:a}))}return o.sort((function(e,t){return e.sort-t.sort}))},formPreviewIDs:function(){var e=[];return this.currentFormCollection.forEach((function(t){e.push(t.categoryID)})),e.join()},usePreviewTree:function(){var e;return(null===(e=this.focusedFormRecord)||void 0===e||null===(e=e.stapledFormIDs)||void 0===e?void 0:e.length)>0&&this.previewMode&&this.focusedFormID===this.queryID},fullFormTree:function(){var e=this,t=this.usePreviewTree?this.previewTree:this.focusedFormTree;return t.forEach((function(t){null===t.child||Array.isArray(t.child)||(t.child=e.transformFormTreeChild(t.child))})),t},sortOrParentChanged:function(){return this.sortValuesToUpdate.length>0||this.parentIDsToUpdate.length>0},sortValuesToUpdate:function(){var e=[];for(var t in this.listTracker)this.listTracker[t].sort!==this.listTracker[t].listIndex-this.sortOffset&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e},parentIDsToUpdate:function(){var e=[];for(var t in this.listTracker)""!==this.listTracker[t].newParentID&&this.listTracker[t].parentID!==this.listTracker[t].newParentID&&e.push(C({indicatorID:parseInt(t)},this.listTracker[t]));return e}},methods:{decodeHTMLEntities:function(e){var t=document.createElement("textarea");return t.innerHTML=e,t.value},backwardCompatNames:function(e){for(var t in e)e[t].name=this.decodeHTMLEntities(e[t].name),null!=e[t].child&&(e[t].child=this.backwardCompatNames(e[t].child));return e},transformFormTreeChild:function(e){var t=[];for(var o in e)null!==e[o].child&&(e[o].child=this.transformFormTreeChild(e[o].child)),t.push(e[o]);return t.sort((function(e,t){return e.sort-t.sort})),t},onScroll:function(){var e=document.getElementById("form_entry_and_preview"),t=document.getElementById("form_index_display");if(null!==e&&null!==t){var o=t.getBoundingClientRect().top,n=e.getBoundingClientRect().top,i=(t.style.top||"0").replace("px","");if(this.appIsLoadingForm||window.innerWidth<=600||0==+i&&o>0)t.style.top=0;else{var r=Math.round(-n-8);t.style.top=r<0?0:r+"px"}}},getFormFromQueryParam:function(){var e=this.queryID;if(void 0===this.categories[e])this.focusedFormID="",this.focusedFormTree=[];else{var t=this.categories[e].parentID;""===t?this.getFormByCategoryID(e,!0):this.$router.push({name:"category",query:{formID:t,internalID:e}})}},getFormByCategoryID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.ariaStatusFormDisplay="",""===t?(this.focusedFormID="",this.focusedFormTree=[]):(this.appIsLoadingForm=o,this.setDefaultAjaxResponseMessage(),$.ajax({type:"GET",url:"".concat(this.APIroot,"form/_").concat(t,"?context=formEditor"),success:function(o){var n;o=e.backwardCompatNames(o);var i={formID:e.queryID},r=null;!0===e.appIsLoadingForm&&null!==e.internalID?r=e.internalID:""!==(null===(n=e.categories[t])||void 0===n?void 0:n.parentID)&&(r=t),null!==r&&(i=C(C({},i),{},{internalID:r})),e.$router.push({name:"category",query:i});var a=e.focusedFormID===t;a&&(e.updateKey+=1),e.focusedFormID=t||"",e.focusedFormTree=o||[],e.appIsLoadingForm=!1,setTimeout((function(){if(null!==e.internalID&&e.focusedFormID!==e.internalID){var t=document.getElementById("internal_form_"+e.internalID);null!==t&&t.dispatchEvent(new Event("click"))}if(a){var o=e.focusAfterFormUpdateSelector;if(null!==o){var n=document.querySelector(o),i="";switch(!0){case o.startsWith("#click_to_move"):var r,l=o.split("_"),s=null==l?void 0:l[3],c=null==l?void 0:l[4];if(s&&c&&(i="moved indicator ".concat(c," ").concat(s),!0===(null===(r=n)||void 0===r?void 0:r.disabled))){var d="up"===s?"down":"up";n=document.getElementById("click_to_move_".concat(d,"_").concat(c))}break;case o.startsWith("#edit_indicator"):i="edited indicator";break;case o.startsWith("#programmer"):i="edited programmer";break;case o.startsWith("ul#"):i="created new question"}e.ariaStatusFormDisplay=i,null===n||e.showFormDialog||(n.focus(),e.focusAfterFormUpdateSelector=null)}}else e.focusAfterFormUpdateSelector=null}))},error:function(e){return console.log(e)}}))},getPreviewTree:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(""!==t&&""!==this.formPreviewIDs){this.appIsLoadingForm=!0,this.setDefaultAjaxResponseMessage();try{fetch("".concat(this.APIroot,"form/specified?categoryIDs=").concat(this.formPreviewIDs)).then((function(o){o.json().then((function(o){e.previewTree=o||[],e.previewTree=e.backwardCompatNames(e.previewTree),e.focusedFormID=t,e.appIsLoadingForm=!1,setTimeout((function(){var t=document.getElementById("indicator_toolbar_toggle");null!==t&&(t.focus(),setTimeout((function(){e.ariaStatusFormDisplay="Previewing form"})))}))})).catch((function(e){return console.log(e)}))})).catch((function(e){return console.log(e)}))}catch(e){console.log(e)}}},getIndicatorByID:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(o,n){fetch("".concat(e.APIroot,"formEditor/indicator/").concat(t)).then((function(e){return e.json()})).then((function(e){return o(e[t])})).catch((function(e){return n(e)}))}))},getFileManagerTextFiles:function(){var e=this;try{fetch("".concat(this.APIroot,"system/files")).then((function(t){t.json().then((function(t){var o=t||[];e.fileManagerTextFiles=o.filter((function(e){return e.indexOf(".txt")>-1||e.indexOf(".csv")>-1}))})).catch((function(e){return console.log(e)}))}))}catch(e){console.log(e)}},editAdvancedOptions:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.openAdvancedOptionsDialog(e)})).catch((function(e){return console.log("error getting indicator information",e)}))},newQuestion:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=null===e?"ul#base_drop_area_".concat(this.focusedFormID):"ul#".concat(this.dragUL_Prefix).concat(e);this.focusAfterFormUpdateSelector="".concat(t,' > li:last-child button[id^="edit_indicator"]'),this.openIndicatorEditingDialog(null,e,{}),this.focusedIndicatorID=null},editQuestion:function(){var e,t=this,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.focusAfterFormUpdateSelector="#"+(null===(e=document)||void 0===e||null===(e=e.activeElement)||void 0===e?void 0:e.id)||0,this.getIndicatorByID(o).then((function(e){t.focusedIndicatorID=o;var n=(null==e?void 0:e.parentID)||null;t.openIndicatorEditingDialog(o,n,e)})).catch((function(e){return console.log("error getting indicator information",e)}))},checkSensitive:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(1===parseInt(e.is_sensitive))return!0;var t=!1;if(e.child)for(var o in e.child)if(!0===(t=this.checkSensitive(e.child[o])||!1))break;return t},setIndicatorFocus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.focusedIndicatorID!==e&&(this.focusedIndicatorID=e)},toggleToolbars:function(){this.ariaStatusFormDisplay="",this.focusedIndicatorID=null,this.previewMode=!this.previewMode,this.updateKey+=1,this.usePreviewTree?this.getPreviewTree(this.focusedFormID):(this.previewTree=[],this.ariaStatusFormDisplay=this.previewMode?"Previewing form":"Editing form")},clickToMoveListItem:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.previewMode&&o===this.focusedIndicatorID){var i,r;32===(null==t?void 0:t.keyCode)&&t.preventDefault(),this.ariaStatusFormDisplay="",this.focusAfterFormUpdateSelector="#"+(null==t||null===(i=t.target)||void 0===i?void 0:i.id)||0;var a=null==t||null===(r=t.currentTarget)||void 0===r?void 0:r.closest("ul"),l=document.getElementById("".concat(this.dragLI_Prefix).concat(o)),s=Array.from(document.querySelectorAll("#".concat(a.id," > li"))),c=s.filter((function(e){return e!==l})),d=this.listTracker[o],u=!0===n?-1:1;if(!0===n?d.listIndex>0:d.listIndex0){var o=[];this.sortValuesToUpdate.forEach((function(t){o.push({indicatorID:t.indicatorID,sort:t.listIndex-e.sortOffset})})),t.push($.ajax({type:"POST",url:"".concat(this.APIroot,"formEditor/sort/batch"),data:{sortData:o,CSRFToken:this.CSRFToken},success:function(){},error:function(e){return console.log("ind sort post err",e)}}))}var n=[];this.parentIDsToUpdate.forEach((function(t){n.push($.ajax({type:"POST",url:"".concat(e.APIroot,"formEditor/").concat(t.indicatorID,"/parentID"),data:{parentID:t.newParentID,CSRFToken:e.CSRFToken},success:function(){},error:function(e){return console.log("ind parentID post err",e)}}))}));var i=t.concat(n);Promise.all(i).then((function(t){t.length>0&&(e.getFormByCategoryID(e.focusedFormID),e.showLastUpdate("form_properties_last_update"))})).catch((function(e){return console.log("an error has occurred",e)}))},clearListItem:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.listTracker[e]&&delete this.listTracker[e]},addToListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=e.indicatorID,i={sort:e.sort,parentID:t,listIndex:o,newParentID:""};this.listTracker[n]=i},updateListTracker:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=C({},this.listTracker[e]);n.listIndex=o,n.newParentID=t,this.listTracker[e]=n},startDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((null==e?void 0:e.offsetX)>25||(null==e?void 0:e.offsetY)>78)e.preventDefault();else if(!this.previewMode&&null!=e&&e.dataTransfer){e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",e.target.id);var t=document.getElementById("form_entry_and_preview"),o=+t.getBoundingClientRect().height.toFixed(0);t.style.minHeight=o+"px",e.target.style.height="80px",e.target.classList.add("is_being_dragged");var n=document.getElementById("drag_drop_default_img_replacement");if(null!==n){var i;e.dataTransfer.setDragImage(n,0,0);var r=null===(i=document.querySelector("#".concat(e.target.id," .name")))||void 0===i?void 0:i.textContent;r=this.shortIndicatorNameStripped(r),null!==e.target.querySelector("ul > li")&&(r+=" (includes sub-questions)"),this.$refs.drag_drop_custom_display.textContent=r,this.draggedElID=e.target.id}}},endDrag:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.$refs.drag_drop_custom_display.style.left="-9999px",this.$refs.drag_drop_custom_display.style.top="0px",this.$refs.drag_drop_custom_display.textContent="",e.target.style.height="auto",e.target.classList.contains("is_being_dragged")&&e.target.classList.remove("is_being_dragged")},handleOnDragCustomizations:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=+(null==t?void 0:t.clientY);if(o<75||o>window.innerHeight-75){var n=window.scrollX,i=window.scrollY,r=o<75?-4:4;window.scrollTo(n,i+r)}var a=(null===(e=this.$refs.drag_drop_custom_display)||void 0===e?void 0:e.parentElement)||null;if(null!==a){var l=a.getBoundingClientRect();this.$refs.drag_drop_custom_display.style.left=+(null==t?void 0:t.clientX)-l.x+2+"px",this.$refs.drag_drop_custom_display.style.top=+(null==t?void 0:t.clientY)-l.y+2+"px"}},onDrop:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=t.currentTarget;if("UL"===o.nodeName&&null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed){t.preventDefault();var n=t.dataTransfer.getData("text"),i=document.getElementById(n),r=parseInt(n.replace(this.dragLI_Prefix,"")),a=(o.id||"").includes("base_drop_area")?null:parseInt(o.id.replace(this.dragUL_Prefix,"")),l=Array.from(document.querySelectorAll("#".concat(o.id," > li")));if(0===l.length)try{o.append(i),this.updateListTracker(r,a,0)}catch(e){console.log(e)}else{var s=o.getBoundingClientRect().top,c=l.find((function(e){return t.clientY-s<=e.offsetTop+e.offsetHeight/2}))||null;if(c!==i)try{o.insertBefore(i,c),Array.from(document.querySelectorAll("#".concat(o.id," > li"))).forEach((function(t,o){var n=parseInt(t.id.replace(e.dragLI_Prefix,""));e.updateListTracker(n,a,o)}))}catch(e){console.log(e)}}o.classList.contains("entered-drop-zone")&&t.target.classList.remove("entered-drop-zone")}},onDragLeave:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")&&t.target.classList.remove("entered-drop-zone")},onDragEnter:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Array.from(document.querySelectorAll("#base_drop_area_".concat(this.focusedFormID,' li[id^="').concat(this.dragLI_Prefix,'"],\n #base_drop_area_').concat(this.focusedFormID,' ul[id^="').concat(this.dragUL_Prefix,'"]'))).forEach((function(e){e.classList.remove("add_drop_style"),e.classList.remove("add_drop_style_last")})),null!=t&&t.dataTransfer&&"move"===t.dataTransfer.effectAllowed&&null!=t&&null!==(e=t.target)&&void 0!==e&&e.classList.contains("form-index-listing-ul")){var o,n=Array.from(t.target.querySelectorAll("#"+t.target.id+"> li")),i=t.target.getBoundingClientRect().top,r=document.getElementById(this.draggedElID),a=n.indexOf(r),l=n.find((function(e){return t.clientY-i<=e.offsetTop+e.offsetHeight/2}))||null,s=a>-1,c=this.draggedElID===(null==l?void 0:l.id),d=s&&(null===l&&n.length-1===a||null!==l&&(null==n||null===(o=n[n.indexOf(r)+1])||void 0===o?void 0:o.id)===(null==l?void 0:l.id));c||d||(t.target.classList.add("entered-drop-zone"),0===n.length?t.target.classList.add("add_drop_style"):null!==l?l.classList.add("add_drop_style"):(n[n.length-1].classList.add("add_drop_style_last"),t.target.classList.add("add_drop_style_last")))}},shortFormNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21,o=this.categories[e]||"",n=this.decodeAndStripHTML((null==o?void 0:o.categoryName)||"Untitled");return this.truncateText(n,t).trim()},shortIndicatorNameStripped:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:35,o=this.decodeAndStripHTML(e);return this.truncateText(o,t).trim()||"[ blank ]"},makePreviewKey:function(e){var t;return"".concat(e.format).concat((null==e||null===(t=e.options)||void 0===t?void 0:t.join())||"","_").concat((null==e?void 0:e.default)||"")}},watch:{appIsLoadingCategories:function(e,t){!0===t&&this.queryID&&this.getFormFromQueryParam()},queryID:function(){this.appIsLoadingCategories||this.getFormFromQueryParam()},sortOrParentChanged:function(e,t){!0!==e||this.previewMode||this.applySortAndParentID_Updates()},focusedFormID:function(e,t){window.scrollTo(0,0),e&&setTimeout((function(){var t=document.querySelector('button[id$="form_'.concat(e,'"]'));null!==t&&t.focus()}))}},template:'\n
                            \n
                            \n Loading... \n \n
                            \n
                            \n The form you are looking for ({{ queryID }}) was not found.\n \n Back to Form Browser\n \n
                            \n\n \n\n \x3c!-- DIALOGS --\x3e\n \n \n \n
                            '}}}]); \ No newline at end of file diff --git a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss index 150faf4ee..a2170307e 100644 --- a/docker/vue-app/src/form_editor/LEAF_FormEditor.scss +++ b/docker/vue-app/src/form_editor/LEAF_FormEditor.scss @@ -511,9 +511,11 @@ table[class$="SelectorTable"] th { box-shadow: 2px 2px 4px 1px rgba(0,0,25,0.3) inset; outline: 2px solid $LEAF_CSS_outline; margin-bottom: 0.5rem; + margin-right: 0.5rem; } ul.add_drop_style_last { margin-bottom: 0.5rem; + margin-right: 0; } li { position: relative; @@ -611,8 +613,11 @@ table[class$="SelectorTable"] th { display: none } } + ul[id^="drop_area_parent_"] li.is_being_dragged { + margin-right:0.5rem; + } &.add_drop_style { - margin-top: 80px; + margin-top: 80px !important; } &.add_drop_style_last { margin-bottom: 80px; @@ -678,6 +683,8 @@ table[class$="SelectorTable"] th { &:not(.form-header):not(.preview) { margin-left: 2px; border: 1px solid #c1c1c1; + border-right:0; + border-radius: 4px 0 0 4px; box-shadow: 1px 1px 2px 1px rgba(0,0,20,0.4); transition: box-shadow 0.5s; } @@ -773,6 +780,7 @@ table[class$="SelectorTable"] th { /* 2nd section of editing_area (format preview) */ .format_preview { padding: 0.5rem 0.25rem 0.75rem 0.5rem; + min-height: 50px; .text_input_preview { display: inline-block; width: 75%; diff --git a/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js b/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js index dbcbaa302..e3f47c927 100644 --- a/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js +++ b/docker/vue-app/src/form_editor/components/form_editor_view/FormQuestionDisplay.js @@ -112,6 +112,6 @@ export default { - + ` } \ No newline at end of file From 9ff2218960e6209f2080fa4a1599b8377412117c Mon Sep 17 00:00:00 2001 From: Carrie Hanscom Date: Thu, 21 Nov 2024 12:02:51 -0500 Subject: [PATCH 21/37] LEAF 4601 remove portal admin user submenu and assoc script, add Welcome and Sign Out link --- LEAF_Request_Portal/admin/index.php | 1 + LEAF_Request_Portal/admin/templates/main.tpl | 5 ++- LEAF_Request_Portal/admin/templates/menu.tpl | 33 -------------------- 3 files changed, 5 insertions(+), 34 deletions(-) diff --git a/LEAF_Request_Portal/admin/index.php b/LEAF_Request_Portal/admin/index.php index aa41629db..dcdee1831 100644 --- a/LEAF_Request_Portal/admin/index.php +++ b/LEAF_Request_Portal/admin/index.php @@ -606,6 +606,7 @@ function hasDevConsoleAccess($login, $oc_db) $t_form->assign('orgchartPath', $site_paths['orgchart_path']); $t_form->assign('CSRFToken', $_SESSION['CSRFToken']); $t_form->assign('siteType', XSSHelpers::xscrub($settings['siteType'])); + $main->assign('name', $login->getName()); $main->assign('javascripts', array(APP_JS_PATH . '/jquery/jquery.min.js', APP_JS_PATH . '/jquery/jquery-ui.custom.min.js', diff --git a/LEAF_Request_Portal/admin/templates/main.tpl b/LEAF_Request_Portal/admin/templates/main.tpl index e96c7951a..0e650637f 100644 --- a/LEAF_Request_Portal/admin/templates/main.tpl +++ b/LEAF_Request_Portal/admin/templates/main.tpl @@ -64,7 +64,7 @@ {/if} -