diff --git a/src/main/resources/import_backup.sql b/src/main/resources/import_backup.sql new file mode 100644 index 0000000..f7e5039 --- /dev/null +++ b/src/main/resources/import_backup.sql @@ -0,0 +1,1829 @@ +-- Step 1: Insert into oss_type +INSERT INTO oss_type (oss_type_idx, oss_type_name, oss_type_desc) VALUES (1, 'JENKINS', 'init'); + +-- Step 2: Insert into oss +INSERT INTO oss (oss_idx, oss_type_idx, oss_name, oss_desc, oss_url, oss_username, oss_password) VALUES (1, 1, 'SampleOss', 'Sample Description', 'http://sample.com', 'root', null); + +-- Step 3: Insert into workflow_stage_type (assuming this table exists and 1 is valid) +-- 1, 'SPIDER INFO CHECK' +-- 2, 'INFRASTRUCTURE NS CREATE' +-- 3, 'INFRASTRUCTURE VM CREATE' +-- 4, 'INFRASTRUCTURE VM DELETE' +-- 5, 'INFRASTRUCTURE MCI RUNNING STATUS' +-- 6, 'INFRASTRUCTURE K8S CREATE' +-- 7, 'INFRASTRUCTURE K8S DELETE' +-- 8, 'INFRASTRUCTURE PMK RUNNING STATUS' +-- 9, 'RUN JENKINS JOB' +-- 10, 'VM ACCESS INFO' +-- 11, 'ACCESS VM AND SH(MCI VM)' +-- 12, WAIT FOR VM TO BE READY +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (1, 'SPIDER INFO CHECK', 'SPIDER INFO CHECK'); +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (2, 'INFRASTRUCTURE NS CREATE', 'INFRASTRUCTURE NS CREATE'); +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (2, 'INFRASTRUCTURE NS CREATE', 'INFRASTRUCTURE NS RUNNING STATUS'); +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (3, 'INFRASTRUCTURE VM CREATE', 'INFRASTRUCTURE VM CREATE'); +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (4, 'INFRASTRUCTURE VM DELETE', 'INFRASTRUCTURE VM DELETE'); +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (5, 'INFRASTRUCTURE MCI RUNNING STATUS', 'INFRASTRUCTURE MCI RUNNING STATUS'); +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (6, 'INFRASTRUCTURE PMK CREATE', 'INFRASTRUCTURE PMK CREATE'); +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (7, 'INFRASTRUCTURE PMK DELETE', 'INFRASTRUCTURE PMK DELETE'); +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (8, 'INFRASTRUCTURE PMK RUNNING STATUS', 'INFRASTRUCTURE PMK RUNNING STATUS'); + +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (9, 'RUN JENKINS JOB', 'RUN JENKINS JOB'); + +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (10, 'VM ACCESS INFO', 'VM ACCESS INFO'); +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (11, 'ACCESS VM AND SH(MCI VM)', 'ACCESS VM AND SH(MCI VM)'); +INSERT INTO workflow_stage_type (workflow_stage_type_idx, workflow_stage_type_name, workflow_stage_type_desc) VALUES (12, 'WAIT FOR VM TO BE READY', 'WAIT FOR VM TO BE READY'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- + +-- Step 4: Insert into workflow_stage +-- 1. Spider Info Check +-- 2. Infrastructure NS Create +-- 3. Infrastructure NS Running Status +-- 4. Infrastructure VM Create +-- 5. Infrastructure VM Delete +-- 6. Infrastructure MCI Running Status +-- 7. Infrastructure PMK Create +-- 8. Infrastructure PMK Delete +-- 9. Infrastructure PMK Running Status +-- 10. Run Jenkins Job +-- 11. VM GET Access Info +-- 12. ACCESS VM AND SH(MCI VM) +-- 13. WAIT FOR VM TO BE READY +-- INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (1, 1, 1, 'Spider Info Check', 'Spider Info Check', ''); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (1, 1, 1, 'Spider Info Check', 'Spider Info Check', ' + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + echo TUMBLEBUG + echo MCI + + script { + // Calling a GET API using curl + def response = sh(script: ''curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user "${USER}:${USERPASS}"'', returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (2, 2, 1, 'Infrastructure NS Create', 'Infrastructure NS Create', ' + stage(''Infrastructure NS Create'') { + steps { + echo ''>>>>> STAGE: Infrastructure NS Create'' + script { + def get_namespace_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}""" + def exist_ns_response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${get_namespace_url}'' --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + if (exist_ns_response.indexOf(''Http_Status_code:200'') > 0 ) { + echo """Exist ''${NAMESPACE}'' namespace!""" + } else { + // create namespace + def create_ns_response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' -X ''POST'' ''${TUMBLEBUG}/tumblebug/ns'' -H ''accept: application/json'' -H ''Content-Type: application/json'' -d ''{ "description": "Workflow create namespace", "name": "${NAMESPACE}"}'' --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + echo """${create_ns_response}""" + if (create_ns_response.indexOf(''Http_Status_code:200'') > 0 ) { + echo """create Namespace ${NAMESPCE}""" + } else { + error """GET API call failed with status code: ''${response}''""" + } + } + } + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (3, 3, 1, 'Infrastructure NS Running Status', 'Infrastructure NS Running Status', ' + stage(''Infrastructure NS Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Running Status'' + script { + def tb_vm_status_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ${tb_vm_status_url} --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (4, 4, 1, 'Infrastructure VM Create', 'Infrastructure VM Create', ' + stage(''Infrastructure VM Create'') { + steps { + echo ''>>>>> STAGE: Infrastructure VM Create'' + script { + echo """shtest6-1""" + // def payload = """{ "name": "${MCI}", "vm": [ { "commonImage": "${COMMON_IMAGE}", "commonSpec": "${COMMON_SPEC}" } ]}""" + def payload = """{ "name": "${MCI}", "vm": [ { "name":"vm01", "commonImage": "${COMMON_IMAGE}", "commonSpec": "${COMMON_SPEC}" } ]}""" + + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mciDynamic""" + def call = """curl -X ''POST'' ''${tb_vm_url}'' -H ''accept: application/json'' -H ''Content-Type: application/json'' -d ''${payload}'' --user ''${USER}:${USERPASS}''""" + def response = sh(script: """ ${call} """, returnStdout: true).trim() + echo """shtest6-2""" + } + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (5, 5, 1, 'Infrastructure VM Delete', 'Infrastructure VM Delete', ' + stage(''Infrastructure MCI Terminate'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Terminate'' + script { + echo "MCI Terminate Start." + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=terminate""" + sh(script: """curl -X DELETE --user ${USER}:${USERPASS} "${tb_vm_url}" -H ''accept: application/json'' """, returnStdout: true) + echo "MCI Terminate successful." + } + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (6, 6, 1, 'Infrastructure MCI Running Status', 'Infrastructure Running Status', ' + stage(''Infrastructure MCI Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Running Status'' + script { + def tb_vm_status_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=status""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${tb_vm_status_url}'' --user ''${USER}:${USERPASS}'' -H ''accept: application/json''""", returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (7, 7, 1, 'Infrastructure PMK Create', 'Infrastructure PMK Create', ' + stage(''Infrastructure PMK Create'') { + steps { + echo ''>>>>> STAGE: Infrastructure PMK Create'' + script { + def payload = """{ "connectionName": "alibaba-ap-northeast-2", "cspResourceId": "required when option is register", "description": "My K8sCluster", "k8sNodeGroupList": [ { "desiredNodeSize": "1", "imageId": "image-01", "maxNodeSize": "3", "minNodeSize": "1", "name": "ng-01", "onAutoScaling": "true", "rootDiskSize": "40", "rootDiskType": "cloud_essd", "specId": "spec-01", "sshKeyId": "sshkey-01" } ], "name": "k8scluster-01", "securityGroupIds": [ "sg-01" ], "subnetIds": [ "subnet-01" ], "vNetId": "vpc-01", "version": "1.30.1-aliyun.1" }""" + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster?option=register""" + def call = """curl -X ''POST'' --user ''${USER}:${USERPASS}'' ''${tb_vm_url}'' -H ''accept: application/json'' -H ''Content-Type: application/json'' -d ''${payload}''""" + def response = sh(script: """ ${call} """, returnStdout: true).trim() + } + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (8, 8, 1, 'Infrastructure PMK Delete', 'Infrastructure PMK Delete', ' + stage(''Infrastructure PMK Delete'') { + steps { + echo ''>>>>> STAGE: Infrastructure PMK Delete'' + script { + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster/${CLUSTER}?option=force""" + def call = """curl -X DELETE --user ${USER}:${USERPASS} "${tb_vm_url}" -H accept: "application/json" """ + sh(script: """ ${call} """, returnStdout: true) + echo "VM deletion successful." + } + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (9, 9, 1, 'Infrastructure PMK Running Status', 'Infrastructure PMK Running Status', ' + stage(''Infrastructure PMK Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure PMK Running Status'' + script { + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster/${CLUSTER}?option=status""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${tb_vm_url}'' --user ''${USER}:${USERPASS}'' -H ''accept: application/json''""", returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (10, 10, 1, 'Run Jenkins Job', 'Run Jenkins Job', ' + stage (''run jenkins job'') { + steps { + + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (11, 11, 1, 'VM GET Access Info', 'VM GET Access Info', ' + stage(''VM GET Access Info'') { + steps { + echo ''>>>>>STAGE: VM GET Access Info'' + script { + def response = sh(script: """curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=accessinfo --user "default:default" """, returnStdout: true).trim() + if (response.contains(''Http_Status_code:200'')) { + echo "GET API call successful." + callData = response.replace(''- Http_Status_code:200'', '''') + echo(callData) + } else { + error "GET API call failed with status code: ${response}" + } + + def tb_sw_url = "${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=accessinfo&accessInfoOption=showSshKey" + def response2 = sh(script: """curl -X ''GET'' --user ''${USER}:${USERPASS}'' ''${tb_sw_url}'' -H ''accept: application/json'' """, returnStdout: true).trim() + def pemkey = getSSHKey(response2) + if (pemkey) { + writeFile(file: "${MCI}.pem", text: pemkey) + sh "chmod 600 ${MCI}.pem" + } else { + error "SSH Key retrieval failed." + } + } + } + }'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (12, 12, 1, 'ACCESS VM AND SH(MCI VM)', 'ACCESS VM AND SH(MCI VM)', ' + stage(''ACCESS VM AND SH(MCI VM)'') { + steps { + echo ''>>>>>STAGE: ACCESS VM AND SH(MCI VM)'' + + } + } +'); +INSERT INTO workflow_stage (workflow_stage_idx, workflow_stage_type_idx, workflow_stage_order, workflow_stage_name, workflow_stage_desc, workflow_stage_content) VALUES (13, 13, 1, 'WAIT FOR VM TO BE READY', 'WAIT FOR VM TO BE READY', ' + stage(''Wait for VM to be ready'') { + steps { + echo ''>>>>>STAGE: Wait for VM to be ready'' + script { + def publicIPs = getPublicInfoList(callData) + publicIPs.each { ip -> + ip.each { inip -> + def cleanIp = inip.toString().replaceAll(/[\[\]]/, '''') + retry(30) { // 최대 30번 재시도 + sleep 10 // 10초 대기 + timeout(time: 5, unit: ''MINUTES'') { // 5분 타임아웃 + sh """ + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${MCI}.pem cb-user@${cleanIp} ''echo "VM is ready"'' + """ + } + } + } + } + } + } + }'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Step 5: Insert into workflow +-- 1. vm-mariadb-nginx-all-in-one +-- 2. k8s-mariadb-nginx-all-in-one +-- 3. create-ns +-- 4. create-mci +-- 5. delete-mci +-- 6. create-pmk +-- 7. delete-pmk +-- 8. install-nginx +-- 9. install-mariadb +-- INSERT INTO workflow (workflow_idx, workflow_name, workflow_purpose, oss_idx, script) VALUES (1, 'create vm', 'test', 1, ''); +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +INSERT INTO workflow (workflow_idx, workflow_name, workflow_purpose, oss_idx, script) VALUES (1, 'vm-mariadb-nginx-all-in-one', 'test', 1, ' +pipeline { + agent any + stages { + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''create-ns'') { + steps { + build job: ''create-ns'', + parameters: [ + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS), + ] + } + } + + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''create-mci'') { + steps { + build job: ''create-mci'', + parameters: [ + string(name: ''MCI'', value: MCI), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS), + string(name: ''COMMON_IMAGE'', value: COMMON_IMAGE), + string(name: ''COMMON_SPEC'', value: COMMON_SPEC), + ] + } + } + + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''install-nginx'') { + steps { + build job: ''install-nginx'', + parameters: [ + string(name: ''MCI'', value: MCI), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS) + ] + } + } + + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''install-mariadb'') { + steps { + build job: ''install-mariadb'', + parameters: [ + string(name: ''MCI'', value: MCI), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS) + ] + } + } + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- + +INSERT INTO workflow (workflow_idx, workflow_name, workflow_purpose, oss_idx, script) VALUES (2, 'k8s-mariadb-nginx-all-in-one', 'test', 1, ' +pipeline { + agent any + stages { + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''create-ns'') { + steps { + build job: ''create-ns'', + parameters: [ + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS), + ] + } + }' || + ' + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''create-pmk'') { + steps { + build job: ''create-pmk'', + parameters: [ + string(name: ''CLUSTER'', value: CLUSTER), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS) + ] + } + } + + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''install-nginx'') { + steps { + build job: ''install-nginx'', + parameters: [ + string(name: ''MCI'', value: MCI), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS) + ] + } + } + + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''install-mariadb'') { + steps { + build job: ''install-mariadb'', + parameters: [ + string(name: ''MCI'', value: MCI), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS) + ] + } + } + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- + +INSERT INTO workflow (workflow_idx, workflow_name, workflow_purpose, oss_idx, script) VALUES (3, 'create-ns', 'test', 1, ' +import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import groovy.json.JsonSlurperClassic + +pipeline { + agent any + stages { + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + echo TUMBLEBUG + + script { + def response = sh(script: """curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + } + stage(''Infrastructure NS Create'') { + steps { + echo ''>>>>> STAGE: Infrastructure NS Create'' + script { + def get_namespace_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}""" + def exist_ns_response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${get_namespace_url}'' --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + if (exist_ns_response.indexOf(''Http_Status_code:200'') > 0 ) { + echo """Exist ''${NAMESPACE}'' namespace!""" + } else { + // create namespace + def create_ns_response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' -X ''POST'' ''${TUMBLEBUG}/tumblebug/ns'' -H ''accept: application/json'' -H ''Content-Type: application/json'' -d ''{ "description": "Workflow create namespace", "name": "${NAMESPACE}"}'' --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + echo """${create_ns_response}""" + if (create_ns_response.indexOf(''Http_Status_code:200'') > 0 ) { + echo """create Namespace ${NAMESPCE}""" + } else { + error """GET API call failed with status code: ''${response}''""" + } + } + } + } + } + stage(''Infrastructure MCI Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Running Status'' + script { + def tb_vm_status_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ${tb_vm_status_url} --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + } + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- + +INSERT INTO workflow (workflow_idx, workflow_name, workflow_purpose, oss_idx, script) VALUES (4, 'create-mci', 'test', 1, ' +import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import groovy.json.JsonSlurperClassic + +pipeline { + agent any + stages { + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + echo TUMBLEBUG + echo MCI + + script { + // Calling a GET API using curl + def response = sh(script: ''curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user "${USER}:${USERPASS}"'', returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + } + stage(''Infrastructure VM Create'') { + steps { + echo ''>>>>> STAGE: Infrastructure VM Create'' + script { + echo """shtest6-1""" + // def payload = """{ "name": "${MCI}", "vm": [ { "commonImage": "${COMMON_IMAGE}", "commonSpec": "${COMMON_SPEC}" } ]}""" + def payload = """{ "name": "${MCI}", "vm": [ { "name":"vm01", "commonImage": "${COMMON_IMAGE}", "commonSpec": "${COMMON_SPEC}" } ]}""" + + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mciDynamic""" + def call = """curl -X ''POST'' ''${tb_vm_url}'' -H ''accept: application/json'' -H ''Content-Type: application/json'' -d ''${payload}'' --user ''${USER}:${USERPASS}''""" + def response = sh(script: """ ${call} """, returnStdout: true).trim() + echo """shtest6-2""" + } + } + } + stage(''Infrastructure MCI Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Running Status'' + script { + def tb_vm_status_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=status""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${tb_vm_status_url}'' --user ''${USER}:${USERPASS}'' -H ''accept: application/json''""", returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + } + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- + +INSERT INTO workflow (workflow_idx, workflow_name, workflow_purpose, oss_idx, script) VALUES (5, 'delete-mci', 'test', 1, ' +import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import groovy.json.JsonSlurperClassic +import groovy.json.JsonSlurper + +pipeline { + agent any + + stages { + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + script { + def response = sh(script: ''curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user "${USER}:${USERPASS}"'', returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + } + stage(''Infrastructure MCI Terminate'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Terminate'' + script { + echo "MCI Terminate Start." + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=terminate""" + sh(script: """curl -X DELETE --user ${USER}:${USERPASS} "${tb_vm_url}" -H ''accept: application/json'' """, returnStdout: true) + echo "MCI Terminate successful." + } + } + } + stage(''Infrastructure MCI Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Running Status'' + script { + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=status""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${tb_vm_url}'' --user ''${USER}:${USERPASS}'' -H ''accept: application/json''""", returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + // error "GET API call failed with status code: ${response}" + echo "Is Not Exist MCI!" + } + } + } + } + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- + +INSERT INTO workflow (workflow_idx, workflow_name, workflow_purpose, oss_idx, script) VALUES (6, 'create-pmk', 'test', 1, ' +import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import groovy.json.JsonSlurperClassic +import groovy.json.JsonSlurper + +pipeline { + agent any + stages { + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + script { + def response = sh(script: ''curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user "${USER}:${USERPASS}"'', returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + } + stage(''Infrastructure K8S Create'') { + steps { + echo ''>>>>> STAGE: Infrastructure K8S Create'' + script { + def payload = """{ "connectionName": "alibaba-ap-northeast-2", "cspResourceId": "required when option is register", "description": "My K8sCluster", "k8sNodeGroupList": [ { "desiredNodeSize": "1", "imageId": "image-01", "maxNodeSize": "3", "minNodeSize": "1", "name": "ng-01", "onAutoScaling": "true", "rootDiskSize": "40", "rootDiskType": "cloud_essd", "specId": "spec-01", "sshKeyId": "sshkey-01" } ], "name": "k8scluster-01", "securityGroupIds": [ "sg-01" ], "subnetIds": [ "subnet-01" ], "vNetId": "vpc-01", "version": "1.30.1-aliyun.1" }""" + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster?option=register""" + def call = """curl -X ''POST'' --user ''${USER}:${USERPASS}'' ''${tb_vm_url}'' -H ''accept: application/json'' -H ''Content-Type: application/json'' -d ''${payload}''""" + def response = sh(script: """ ${call} """, returnStdout: true).trim() + } + } + } + stage(''Infrastructure PMK Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure PMK Running Status'' + script { + def tb_vm_status_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster/${CLUSTER}?option=status""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${tb_vm_status_url}'' --user ''${USER}:${USERPASS}'' -H ''accept: application/json''""", returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + } + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- + +INSERT INTO workflow (workflow_idx, workflow_name, workflow_purpose, oss_idx, script) VALUES (7, 'delete-pmk', 'test', 1, ' +import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import groovy.json.JsonSlurperClassic +import groovy.json.JsonSlurper + +pipeline { + agent any + + stages { + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + script { + def response = sh(script: ''curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user "${USER}:${USERPASS}"'', returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + } + + stage(''Infrastructure K8S Delete'') { + steps { + echo ''>>>>> STAGE: Infrastructure VM Delete'' + script { + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster/${CLUSTER}?option=force""" + def call = """curl -X DELETE --user ${USER}:${USERPASS} "${tb_vm_url}" -H accept: "application/json" """ + sh(script: """ ${call} """, returnStdout: true) + echo "VM deletion successful." + } + } + } + + stage(''Infrastructure PMK Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure PMK Running Status'' + script { + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster/${CLUSTER}?option=status""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${tb_vm_url}'' --user ''${USER}:${USERPASS}'' -H ''accept: application/json''""", returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + } + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- + +INSERT INTO workflow (workflow_idx, workflow_name, workflow_purpose, oss_idx, script) VALUES (8, 'install-nginx', 'test', 1, 'import groovy.json.JsonSlurper + +def getSSHKey(jsonInput) { + def json = new JsonSlurper().parseText(jsonInput) + return json.findResult { it.key == ''MciSubGroupAccessInfo'' ? + it.value.findResult { it.MciVmAccessInfo?.findResult { it.privateKey } } : null + } ?: '''' +} + +def getPublicInfoList(jsonInput) { + def json = new JsonSlurper().parseText(jsonInput) + return json.findAll { it.key == ''MciSubGroupAccessInfo'' } + .collectMany { it.value.MciVmAccessInfo*.publicIP } +} + +//Global variable +def callData = '''' +def infoObj = '''' +def unsupportedOsCount = 0 // Counter for unsupported OS (global for the entire pipeline) + +pipeline { + agent any + + stages { + + //============================================================================================= + // stage template - VM ACCESS INFO + //============================================================================================= + stage(''VM GET Access Info'') { + steps { + echo ''>>>>>STAGE: VM GET Access Info'' + script { + def response = sh(script: """curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/ns/ns01/mci/${MCI}?option=accessinfo --user "default:default" """, returnStdout: true).trim() + if (response.contains(''Http_Status_code:200'')) { + echo "GET API call successful." + callData = response.replace(''- Http_Status_code:200'', '''') + echo(callData) + } else { + error "GET API call failed with status code: ${response}" + } + + def tb_sw_url = "${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=accessinfo&accessInfoOption=showSshKey" + def response2 = sh(script: """curl -X ''GET'' --user ''${USER}:${USERPASS}'' ''${tb_sw_url}'' -H ''accept: application/json'' """, returnStdout: true).trim() + def pemkey = getSSHKey(response2) + if (pemkey) { + writeFile(file: "${MCI}.pem", text: pemkey) + sh "chmod 600 ${MCI}.pem" + } else { + error "SSH Key retrieval failed." + } + } + } + } + + stage(''Wait for VM to be ready'') { + steps { + echo ''>>>>>STAGE: Wait for VM to be ready'' + script { + def publicIPs = getPublicInfoList(callData) + publicIPs.each { ip -> + ip.each { inip -> + def cleanIp = inip.toString().replaceAll(/[\[\]]/, '''') + retry(30) { // 최대 30번 재시도 + sleep 10 // 10초 대기 + timeout(time: 5, unit: ''MINUTES'') { // 5분 타임아웃 + sh """ + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${MCI}.pem cb-user@${cleanIp} ''echo "VM is ready"'' + """ + } + } + } + } + } + } + } + + //============================================================================================= + // stage template - ACCESS VM AND SH(MCI VM) + //============================================================================================= + stage(''Set nginx'') { + steps { + echo ''>>>>>STAGE: Set nginx'' + script { + def publicIPs = getPublicInfoList(callData) + publicIPs.each { ip -> + ip.each { inip -> + def cleanIp = inip.toString().replaceAll(/[\[\]]/, '''') + println ">>Installing Nginx on VM : ${cleanIp}" + sh """ + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${MCI}.pem cb-user@${cleanIp} '' + #!/bin/bash + + echo ========================================================================== + + # Determine OS name + os=\$(uname) + + # Check release + if [ "\$os" = "Linux" ]; then + echo "This is a Linux machine" + + if [[ -f /etc/redhat-release ]]; then + pkg_manager=yum + elif [[ -f /etc/debian_version ]]; then + pkg_manager=apt + fi + + if [ \$pkg_manager = "yum" ]; then + echo "Using yum" + sudo yum update -y + sudo yum install nginx -y + elif [ \$pkg_manager = "apt" ]; then + echo "Using apt" + sudo apt-get update && sudo apt-get upgrade -y + sudo apt install nginx -y + fi + + elif [ "\$os" = "Darwin" ]; then + echo "This is a Mac Machine. Not supported" + exit 1 + else + echo "Unsupported OS" + exit 1 + fi + + echo "Nginx installed!" + '' + """ + } + } + } + } + } + } +} +'); +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +INSERT INTO workflow (workflow_idx, workflow_name, workflow_purpose, oss_idx, script) VALUES (9, 'install-mariadb', 'test', 1, ' +import groovy.json.JsonSlurper + +def getSSHKey(jsonInput) { + def json = new JsonSlurper().parseText(jsonInput) + return json.findResult { it.key == ''MciSubGroupAccessInfo'' ? + it.value.findResult { it.MciVmAccessInfo?.findResult { it.privateKey } } : null + } ?: '''' +} + +def getPublicInfoList(jsonInput) { + def json = new JsonSlurper().parseText(jsonInput) + return json.findAll { it.key == ''MciSubGroupAccessInfo'' } + .collectMany { it.value.MciVmAccessInfo*.publicIP } +} + +//Global variable +def callData = '''' +def infoObj = '''' + +pipeline { + agent any + + stages { + stage(''VM GET Access Info'') { + steps { + echo ''>>>>>STAGE: VM GET Access Info'' + script { + def response = sh(script: """curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=accessinfo --user "default:default" """, returnStdout: true).trim() + if (response.contains(''Http_Status_code:200'')) { + echo "GET API call successful." + callData = response.replace(''- Http_Status_code:200'', '''') + echo(callData) + } else { + error "GET API call failed with status code: ${response}" + } + + def tb_sw_url = "${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=accessinfo&accessInfoOption=showSshKey" + def response2 = sh(script: """curl -X ''GET'' --user ''${USER}:${USERPASS}'' ''${tb_sw_url}'' -H ''accept: application/json'' """, returnStdout: true).trim() + def pemkey = getSSHKey(response2) + if (pemkey) { + writeFile(file: "${MCI}.pem", text: pemkey) + sh "chmod 600 ${MCI}.pem" + } else { + error "SSH Key retrieval failed." + } + } + } + } + + stage(''Wait for VM to be ready'') { + steps { + echo ''>>>>>STAGE: Wait for VM to be ready'' + script { + def publicIPs = getPublicInfoList(callData) + publicIPs.each { ip -> + def cleanIp = ip.toString().replaceAll(/[\[\]]/, '''') + retry(30) { // 최대 30번 재시도 + sleep 10 // 10초 대기 + timeout(time: 5, unit: ''MINUTES'') { // 5분 타임아웃 + sh """ + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${MCI}.pem cb-user@${cleanIp} ''echo "VM is ready"'' + """ + } + } + } + } + } + } + + stage(''Set MariaDB'') { + steps { + echo ''>>>>>STAGE: Set MariaDB'' + script { + def publicIPs = getPublicInfoList(callData) + publicIPs.each { ip -> + def cleanIp = ip.toString().replaceAll(/[\[\]]/, '''') + println ">>Installing MariaDB on VM : ${cleanIp}" + sh """ + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${MCI}.pem cb-user@${cleanIp} '' + #!/bin/bash + + # Determine OS name + os=\$(uname) + + # chk release + if [ "\$os" = "Linux" ]; then + echo "This is a Linux machine" + + if [[ -f /etc/redhat-release ]]; then + pkg_manager=yum + sudo yum update -y + sudo yum install mariadb-server mariadb-client -y + elif [[ -f /etc/debian_version ]]; then + pkg_manager=apt + sudo apt-get update && sudo apt-get upgrade -y + sudo apt-get install mariadb-server mariadb-client -y + else + echo "Unsupported Linux distribution" + exit 1 + fi + + elif [ "\$os" = "Darwin" ]; then + echo "This is a Mac Machine. not supported" + exit 1 + else + echo "Unsupported OS" + exit 1 + fi + + echo "MariaDB installed!" + '' + """ + } + } + } + } + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- + + +-- Step 6: Insert into workflow_param +-- 1. vm-mariadb-nginx-all-in-one +-- 2. k8s-mariadb-nginx-all-in-one +-- 3. create-ns +-- 4. create-mci +-- 5. delete-mci +-- 6. create-pmk +-- 7. delete-pmk +-- 8. install-nginx +-- 9. install-mariadb +-- INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (1, 1, 'MCI', '', 'N'); +-- Workflow : vm-mariadb-nginx-all-in-one +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (1, 1, 'MCI', 'mci01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (2, 1, 'NAMESPACE', 'ns01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (3, 1, 'TUMBLEBUG', 'http://tb-url:1323', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (4, 1, 'USER', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (5, 1, 'USERPASS', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (6, 1, 'COMMON_IMAGE', 'aws+ap-northeast-2+ubuntu22.04', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (7, 1, 'COMMON_SPEC', 'aws+ap-northeast-2+t2.small', 'N'); + +-- Workflow : k8s-mariadb-nginx-all-in-one +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (8, 2, 'CLUSTER', 'pmk01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (9, 2, 'NAMESPACE', 'ns01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (10, 2, 'TUMBLEBUG', 'http://tb-url:1323', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (11, 2, 'USER', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (12, 2, 'USERPASS', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (13, 2, 'COMMON_IMAGE', 'aws+ap-northeast-2+ubuntu22.04', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (14, 2, 'COMMON_SPEC', 'aws+ap-northeast-2+t2.small', 'N'); + +-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : create-ns +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (15, 3, 'NAMESPACE', 'ns01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (16, 3, 'TUMBLEBUG', 'http://tb-url:1323', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (17, 3, 'USER', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (18, 3, 'USERPASS', 'default', 'N'); + +-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : create-mci +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (19, 4, 'MCI', 'mci01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (20, 4, 'NAMESPACE', 'ns01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (21, 4, 'TUMBLEBUG', 'http://tb-url:1323', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (22, 4, 'USER', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (23, 4, 'USERPASS', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (24, 4, 'COMMON_IMAGE', 'aws+ap-northeast-2+ubuntu22.04', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (25, 4, 'COMMON_SPEC', 'aws+ap-northeast-2+t2.small', 'N'); + +-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : delete-mci +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (26, 5, 'MCI', 'mci01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (27, 5, 'NAMESPACE', 'ns01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (28, 5, 'TUMBLEBUG', 'http://tb-url:1323', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (29, 5, 'USER', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (30, 5, 'USERPASS', 'default', 'N'); + +-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : create-pmk +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (31, 6, 'CLUSTER', 'pmk01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (32, 6, 'NAMESPACE', 'ns01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (33, 6, 'TUMBLEBUG', 'http://tb-url:1323', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (34, 6, 'USER', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (35, 6, 'USERPASS', 'default', 'N'); + +-- ----------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : delete-pmk +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (36, 7, 'CLUSTER', 'pmk01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (37, 7, 'NAMESPACE', 'ns01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (38, 7, 'TUMBLEBUG', 'http://tb-url:1323', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (39, 7, 'USER', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (40, 7, 'USERPASS', 'default', 'N'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : install-nginx +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (41, 8, 'MCI', 'mci01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (42, 8, 'NAMESPACE', 'ns01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (43, 8, 'TUMBLEBUG', 'http://tb-url:1323', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (44, 8, 'USER', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (45, 8, 'USERPASS', 'default', 'N'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : install-mariadb +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (46, 9, 'MCI', 'mci01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (47, 9, 'NAMESPACE', 'ns01', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (48, 9, 'TUMBLEBUG', 'http://tb-url:1323', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (49, 9, 'USER', 'default', 'N'); +INSERT INTO workflow_param (param_idx, workflow_idx, param_key, param_value, event_listener_yn) VALUES (50, 9, 'USERPASS', 'default', 'N'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Step 7: Insert into workflow_stage_mapping +-- 1. vm-mariadb-nginx-all-in-one +-- 2. k8s-mariadb-nginx-all-in-one +-- 3. create-ns +-- 4. create-mci +-- 5. delete-mci +-- 6. create-pmk +-- 7. delete-pmk +-- 8. install-nginx +-- 9. install-mariadb +-- INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (1, 1, 1, null, ''); +-- Workflow : vm-mariadb-nginx-all-in-one +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (1, 1, 1, null, ' +pipeline { + agent any + stages {'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (2, 1, 2, 10, ' + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''create-ns'') { + steps { + build job: ''create-ns'', + parameters: [ + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS), + ] + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (3, 1, 3, 10, ' + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''create-mci'') { + steps { + build job: ''create-mci'', + parameters: [ + string(name: ''MCI'', value: MCI), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS), + string(name: ''COMMON_IMAGE'', value: COMMON_IMAGE), + string(name: ''COMMON_SPEC'', value: COMMON_SPEC), + ] + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (4, 1, 4, 10, ' + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''install-nginx'') { + steps { + build job: ''install-nginx'', + parameters: [ + string(name: ''MCI'', value: MCI), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS) + ] + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (5, 1, 5, 10, ' + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''install-mariadb'') { + steps { + build job: ''install-mariadb'', + parameters: [ + string(name: ''MCI'', value: MCI), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS) + ] + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (6, 1, 6, null, ' + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- + +-- Workflow : k8s-mariadb-nginx-all-in-one +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (7, 2, 1, null, ' +pipeline { + agent any + stages {'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (8, 2, 2, 10, ' + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''create-ns'') { + steps { + build job: ''create-ns'', + parameters: [ + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS), + ] + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (9, 2, 3, 10, ' + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''create-pmk'') { + steps { + build job: ''create-pmk'', + parameters: [ + string(name: ''CLUSTER'', value: CLUSTER), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS), + string(name: ''COMMON_IMAGE'', value: COMMON_IMAGE), + string(name: ''COMMON_SPEC'', value: COMMON_SPEC), + ] + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (10, 2, 4, 10, ' + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''install-nginx'') { + steps { + build job: ''install-nginx'', + parameters: [ + string(name: ''MCI'', value: MCI), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS) + ] + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (11, 2, 5, 10, ' + //============================================================================================= + // stage template - Run Jenkins Job + //============================================================================================= + stage (''install-mariadb'') { + steps { + build job: ''install-mariadb'', + parameters: [ + string(name: ''MCI'', value: MCI), + string(name: ''NAMESPACE'', value: NAMESPACE), + string(name: ''TUMBLEBUG'', value: TUMBLEBUG), + string(name: ''USER'', value: USER), + string(name: ''USERPASS'', value: USERPASS) + ] + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (12, 2, 6, null, ' + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : create-ns +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (13, 3, 1, null, ' +import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import groovy.json.JsonSlurperClassic + +pipeline { + agent any + stages {'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (14, 3, 2, 1, ' + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + script { + def response = sh(script: """curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (15, 3, 3, 2, ' + stage(''Infrastructure NS Create'') { + steps { + echo ''>>>>> STAGE: Infrastructure NS Create'' + script { + def get_namespace_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}""" + def exist_ns_response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${get_namespace_url}'' --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + if (exist_ns_response.indexOf(''Http_Status_code:200'') > 0 ) { + echo """Exist ''${NAMESPACE}'' namespace!""" + } else { + // create namespace + def create_ns_response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' -X ''POST'' ''${TUMBLEBUG}/tumblebug/ns'' -H ''accept: application/json'' -H ''Content-Type: application/json'' -d ''{ "description": "Workflow create namespace", "name": "${NAMESPACE}"}'' --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + echo """${create_ns_response}""" + if (create_ns_response.indexOf(''Http_Status_code:200'') > 0 ) { + echo """create Namespace ${NAMESPCE}""" + } else { + error """GET API call failed with status code: ''${response}''""" + } + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (16, 3, 4, 3, ' + stage(''Infrastructure NS Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Running Status'' + script { + def tb_vm_status_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ${tb_vm_status_url} --user ''${USER}:${USERPASS}''""", returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (17, 3, 5, null, ' + } +}'); + + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : create-mci +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (18, 4, 1, null, ' +import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import groovy.json.JsonSlurperClassic + +pipeline { + agent any + stages {'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (19, 4, 2, 1, ' + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + script { + // Calling a GET API using curl + def response = sh(script: ''curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user "${USER}:${USERPASS}"'', returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (20, 4, 3, 4, ' + stage(''Infrastructure VM Create'') { + steps { + echo ''>>>>> STAGE: Infrastructure VM Create'' + script { + echo """shtest6-1""" + // def payload = """{ "name": "${MCI}", "vm": [ { "commonImage": "${COMMON_IMAGE}", "commonSpec": "${COMMON_SPEC}" } ]}""" + def payload = """{ "name": "${MCI}", "vm": [ { "name":"vm01", "commonImage": "${COMMON_IMAGE}", "commonSpec": "${COMMON_SPEC}" } ]}""" + + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mciDynamic""" + def call = """curl -X ''POST'' ''${tb_vm_url}'' -H ''accept: application/json'' -H ''Content-Type: application/json'' -d ''${payload}'' --user ''${USER}:${USERPASS}''""" + def response = sh(script: """ ${call} """, returnStdout: true).trim() + echo """shtest6-2""" + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (21, 4, 4, 6, ' + stage(''Infrastructure MCI Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Running Status'' + script { + def tb_vm_status_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=status""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${tb_vm_status_url}'' --user ''${USER}:${USERPASS}'' -H ''accept: application/json''""", returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (22, 4, 5, null, ' + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : delete-mci +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (23, 5, 1, null, ' +import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import groovy.json.JsonSlurperClassic +import groovy.json.JsonSlurper + +pipeline { + agent any + stages {'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (24, 5, 2, 1, ' + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + script { + def response = sh(script: ''curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user "${USER}:${USERPASS}"'', returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (25, 5, 3, 5, ' + stage(''Infrastructure MCI Terminate'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Terminate'' + script { + echo "MCI Terminate Start." + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=terminate""" + sh(script: """curl -X DELETE --user ${USER}:${USERPASS} "${tb_vm_url}" -H ''accept: application/json'' """, returnStdout: true) + echo "MCI Terminate successful." + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (26, 5, 4, 6, ' + stage(''Infrastructure MCI Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure MCI Running Status'' + script { + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=status""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${tb_vm_url}'' --user ''${USER}:${USERPASS}'' -H ''accept: application/json''""", returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + // error "GET API call failed with status code: ${response}" + echo "Is Not Exist MCI!" + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (27, 5, 5, null, ' + } +}'); +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : create-pmk +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (28, 6, 1, null, ' +import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import groovy.json.JsonSlurperClassic +import groovy.json.JsonSlurper + +pipeline { + agent any + stages {'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (29, 6, 2, 1, ' + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + script { + def response = sh(script: ''curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user "${USER}:${USERPASS}"'', returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (30, 6, 3, 7, ' + stage(''Infrastructure K8S Create'') { + steps { + echo ''>>>>> STAGE: Infrastructure K8S Create'' + script { + def payload = """{ "connectionName": "alibaba-ap-northeast-2", "cspResourceId": "required when option is register", "description": "My K8sCluster", "k8sNodeGroupList": [ { "desiredNodeSize": "1", "imageId": "image-01", "maxNodeSize": "3", "minNodeSize": "1", "name": "ng-01", "onAutoScaling": "true", "rootDiskSize": "40", "rootDiskType": "cloud_essd", "specId": "spec-01", "sshKeyId": "sshkey-01" } ], "name": "k8scluster-01", "securityGroupIds": [ "sg-01" ], "subnetIds": [ "subnet-01" ], "vNetId": "vpc-01", "version": "1.30.1-aliyun.1" }""" + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster?option=register""" + def call = """curl -X ''POST'' --user ''${USER}:${USERPASS}'' ''${tb_vm_url}'' -H ''accept: application/json'' -H ''Content-Type: application/json'' -d ''${payload}''""" + def response = sh(script: """ ${call} """, returnStdout: true).trim() + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (31, 6, 4, 9, ' + stage(''Infrastructure PMK Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure PMK Running Status'' + script { + def tb_vm_status_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster/${CLUSTER}?option=status""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${tb_vm_status_url}'' --user ''${USER}:${USERPASS}'' -H ''accept: application/json''""", returnStdout: true).trim() + + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (32, 6, 5, null, ' + } +}'); +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : delete-pmk +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (33, 7, 1, null, ' +import groovy.json.JsonOutput +import groovy.json.JsonSlurper +import groovy.json.JsonSlurperClassic +import groovy.json.JsonSlurper + +pipeline { + agent any + stages {'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (34, 7, 2, 1, ' + stage(''Spider Info Check'') { + steps { + echo ''>>>>> STAGE: Spider Info Check'' + script { + def response = sh(script: ''curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/config --user "${USER}:${USERPASS}"'', returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (35, 7, 3, 8, ' + stage(''Infrastructure PMK Delete'') { + steps { + echo ''>>>>> STAGE: Infrastructure PMK Delete'' + script { + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster/${CLUSTER}?option=force""" + def call = """curl -X DELETE --user ${USER}:${USERPASS} "${tb_vm_url}" -H accept: "application/json" """ + sh(script: """ ${call} """, returnStdout: true) + echo "VM deletion successful." + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (36, 7, 4, 9, ' + stage(''Infrastructure PMK Running Status'') { + steps { + echo ''>>>>> STAGE: Infrastructure PMK Running Status'' + script { + def tb_vm_url = """${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/k8scluster/${CLUSTER}?option=status""" + def response = sh(script: """curl -w ''- Http_Status_code:%{http_code}'' ''${tb_vm_url}'' --user ''${USER}:${USERPASS}'' -H ''accept: application/json''""", returnStdout: true).trim() + if (response.indexOf(''Http_Status_code:200'') > 0 ) { + echo "GET API call successful." + response = response.replace(''- Http_Status_code:200'', '''') + echo JsonOutput.prettyPrint(response) + } else { + error "GET API call failed with status code: ${response}" + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (37, 7, 5, null, ' + } +}'); + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : install-nginx +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (38, 8, 1, null, ' +import groovy.json.JsonSlurper + +def getSSHKey(jsonInput) { + def json = new JsonSlurper().parseText(jsonInput) + return json.findResult { it.key == ''MciSubGroupAccessInfo'' ? + it.value.findResult { it.MciVmAccessInfo?.findResult { it.privateKey } } : null + } ?: '''' +} + +def getPublicInfoList(jsonInput) { + def json = new JsonSlurper().parseText(jsonInput) + return json.findAll { it.key == ''MciSubGroupAccessInfo'' } + .collectMany { it.value.MciVmAccessInfo*.publicIP } +} + +//Global variable +def callData = '''' +def infoObj = '''' +def unsupportedOsCount = 0 // Counter for unsupported OS (global for the entire pipeline) + +pipeline { + agent any + stages {'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (39, 8, 2, 11, ' + //============================================================================================= + // stage template - VM ACCESS INFO + //============================================================================================= + stage(''VM GET Access Info'') { + steps { + echo ''>>>>>STAGE: VM GET Access Info'' + script { + def response = sh(script: """curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/ns/ns01/mci/${MCI}?option=accessinfo --user "default:default" """, returnStdout: true).trim() + if (response.contains(''Http_Status_code:200'')) { + echo "GET API call successful." + callData = response.replace(''- Http_Status_code:200'', '''') + echo(callData) + } else { + error "GET API call failed with status code: ${response}" + } + + def tb_sw_url = "${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=accessinfo&accessInfoOption=showSshKey" + def response2 = sh(script: """curl -X ''GET'' --user ''${USER}:${USERPASS}'' ''${tb_sw_url}'' -H ''accept: application/json'' """, returnStdout: true).trim() + def pemkey = getSSHKey(response2) + if (pemkey) { + writeFile(file: "${MCI}.pem", text: pemkey) + sh "chmod 600 ${MCI}.pem" + } else { + error "SSH Key retrieval failed." + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (40, 8, 3, 13, ' + stage(''Wait for VM to be ready'') { + steps { + echo ''>>>>>STAGE: Wait for VM to be ready'' + script { + def publicIPs = getPublicInfoList(callData) + publicIPs.each { ip -> + ip.each { inip -> + def cleanIp = inip.toString().replaceAll(/[\[\]]/, '''') + retry(30) { // 최대 30번 재시도 + sleep 10 // 10초 대기 + timeout(time: 5, unit: ''MINUTES'') { // 5분 타임아웃 + sh """ + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${MCI}.pem cb-user@${cleanIp} ''echo "VM is ready"'' + """ + } + } + } + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (41, 8, 4, 12, ' + //============================================================================================= + // stage template - ACCESS VM AND SH(MCI VM) + //============================================================================================= + stage(''Set nginx'') { + steps { + echo ''>>>>>STAGE: Set nginx'' + script { + def publicIPs = getPublicInfoList(callData) + publicIPs.each { ip -> + ip.each { inip -> + def cleanIp = inip.toString().replaceAll(/[\[\]]/, '''') + println ">>Installing Nginx on VM : ${cleanIp}" + sh """ + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${MCI}.pem cb-user@${cleanIp} '' + #!/bin/bash + + echo ========================================================================== + + # Determine OS name + os=\$(uname) + + # Check release + if [ "\$os" = "Linux" ]; then + echo "This is a Linux machine" + + if [[ -f /etc/redhat-release ]]; then + pkg_manager=yum + elif [[ -f /etc/debian_version ]]; then + pkg_manager=apt + fi + + if [ \$pkg_manager = "yum" ]; then + echo "Using yum" + sudo yum update -y + sudo yum install nginx -y + elif [ \$pkg_manager = "apt" ]; then + echo "Using apt" + sudo apt-get update && sudo apt-get upgrade -y + sudo apt install nginx -y + fi + + elif [ "\$os" = "Darwin" ]; then + echo "This is a Mac Machine. Not supported" + exit 1 + else + echo "Unsupported OS" + exit 1 + fi + + echo "Nginx installed!" + '' + """ + } + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (42, 8, 5, null, ' + } +}'); + + +-- --------------------------------------------------------------------------------------------------------------------------------------------------------------- +-- Workflow : install-mariadb +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (43, 9, 1, null, ' +import groovy.json.JsonSlurper + +def getSSHKey(jsonInput) { + def json = new JsonSlurper().parseText(jsonInput) + return json.findResult { it.key == ''MciSubGroupAccessInfo'' ? + it.value.findResult { it.MciVmAccessInfo?.findResult { it.privateKey } } : null + } ?: '''' +} + +def getPublicInfoList(jsonInput) { + def json = new JsonSlurper().parseText(jsonInput) + return json.findAll { it.key == ''MciSubGroupAccessInfo'' } + .collectMany { it.value.MciVmAccessInfo*.publicIP } +}' || + ' +//Global variable +def callData = '''' +def infoObj = '''' +pipeline { + agent any + stages {'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (44, 9, 2, 11, ' + //============================================================================================= + // stage template - VM ACCESS INFO + // need two functions : getSSHKey(jsonInput), getPublicInfoList(jsonInput) + //============================================================================================= + stage(''VM GET Access Info'') { + steps { + echo ''>>>>>STAGE: VM GET Access Info'' + script { + def response = sh(script: """curl -w "- Http_Status_code:%{http_code}" ${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=accessinfo --user "default:default" """, returnStdout: true).trim() + if (response.contains(''Http_Status_code:200'')) { + echo "GET API call successful." + callData = response.replace(''- Http_Status_code:200'', '''') + echo(callData) + } else { + error "GET API call failed with status code: ${response}" + } + + def tb_sw_url = "${TUMBLEBUG}/tumblebug/ns/${NAMESPACE}/mci/${MCI}?option=accessinfo&accessInfoOption=showSshKey" + def response2 = sh(script: """curl -X ''GET'' --user ''${USER}:${USERPASS}'' ''${tb_sw_url}'' -H ''accept: application/json'' """, returnStdout: true).trim() + def pemkey = getSSHKey(response2) + if (pemkey) { + writeFile(file: "${MCI}.pem", text: pemkey) + sh "chmod 600 ${MCI}.pem" + } else { + error "SSH Key retrieval failed." + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (45, 9, 3, 13, ' + stage(''Wait for VM to be ready'') { + steps { + echo ''>>>>>STAGE: Wait for VM to be ready'' + script { + def publicIPs = getPublicInfoList(callData) + publicIPs.each { ip -> + def cleanIp = ip.toString().replaceAll(/[\[\]]/, '''') + retry(30) { // 최대 30번 재시도 + sleep 10 // 10초 대기 + timeout(time: 5, unit: ''MINUTES'') { // 5분 타임아웃 + sh """ + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${MCI}.pem cb-user@${cleanIp} ''echo "VM is ready"'' + """ + } + } + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (46, 9, 4, 12, ' + //============================================================================================= + // stage template - ACCESS VM AND SH(MCI VM) + //============================================================================================= + stage(''Set MariaDB'') { + steps { + echo ''>>>>>STAGE: Set MariaDB'' + script { + def publicIPs = getPublicInfoList(callData) + publicIPs.each { ip -> + def cleanIp = ip.toString().replaceAll(/[\[\]]/, '''') + println ">>Installing MariaDB on VM : ${cleanIp}" + sh """ + ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i ${MCI}.pem cb-user@${cleanIp} '' + #!/bin/bash + + # Determine OS name + os=\$(uname) + + # chk release + if [ "\$os" = "Linux" ]; then + echo "This is a Linux machine" + + if [[ -f /etc/redhat-release ]]; then + pkg_manager=yum + sudo yum update -y + sudo yum install mariadb-server mariadb-client -y + elif [[ -f /etc/debian_version ]]; then + pkg_manager=apt + sudo apt-get update && sudo apt-get upgrade -y + sudo apt-get install mariadb-server mariadb-client -y + else + echo "Unsupported Linux distribution" + exit 1 + fi + + elif [ "\$os" = "Darwin" ]; then + echo "This is a Mac Machine. not supported" + exit 1 + else + echo "Unsupported OS" + exit 1 + fi + + echo "MariaDB installed!" + '' + """ + } + } + } + }'); +INSERT INTO workflow_stage_mapping (mapping_idx, workflow_idx, stage_order, workflow_stage_idx, stage) VALUES (47, 9, 5, null, ' + } +} +'); \ No newline at end of file diff --git a/src/main/resources/static/assets/EventListenerList-DoBwtMSB.js b/src/main/resources/static/assets/EventListenerList-DoBwtMSB.js new file mode 100644 index 0000000..228cab3 --- /dev/null +++ b/src/main/resources/static/assets/EventListenerList-DoBwtMSB.js @@ -0,0 +1,17 @@ +import{_ as B}from"./TableHeader.vue_vue_type_script_setup_true_lang-CtosSeSW.js";import{s as p,_ as V}from"./request-CmxyMwC5.js";import{d as I,u as h,c as W,w as S,o as D,r as v,a as m,b,e,t as x,f as C,h as $,v as M,F as q,g as A,k as R,j as Y,i as _}from"./index-BPhSkGh_.js";import{g as G,P as T}from"./ParamForm-CikIVyrv.js";const j=()=>p.get("/eventlistener/list");function z(a){return p.get("/eventlistener/"+a)}function H(a){return p.get(`/eventlistener/duplicate?eventlistenerName=${a}`)}function J(a){return p.post("/eventlistener",a)}function K(a){return p.patch(`/eventlistener/${a.eventListenerIdx}`,a)}function O(a){return p.delete(`/eventlistener/${a}`)}const Q={class:"modal",id:"eventListenerForm",tabindex:"-1"},X={class:"modal-dialog modal-lg",role:"document"},Z={class:"modal-content"},ee={class:"modal-body text-left py-4"},te={class:"mb-5"},ne={class:"row mb-3"},se={class:"grid gap-0 column-gap-3"},ae={key:1,class:"btn btn-success",style:{margin:"3px"}},oe={class:"mb-3"},le={class:"mb-3"},ie=["value"],re={class:"modal-footer"},de=I({__name:"eventListenerForm",props:{mode:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(a,{emit:g}){const l=h(),i=a,u=g,k=W(()=>i.eventListenerIdx);S(k,async()=>{await f(),await L()}),D(async()=>{await f(),await L()});const t=v({}),s=v(!1),f=async()=>{if(i.mode==="new")t.value.eventListenerName="",t.value.eventListenerDesc="",t.value.workflowIdx=0,t.value.workflowParams=[],w.value=!1,s.value=!0;else{const{data:o}=await z(i.eventListenerIdx);t.value=o,w.value=!0,s.value=!0}},y=v([]),L=async()=>{const{data:o}=await G("N");y.value=o},w=v(!1),d=async()=>{const{data:o}=await H(t.value.eventListenerName);o?l.error("이미 사용중인 이름입니다."):(l.success("사용 가능한 이름입니다."),w.value=!0)},c=async()=>{i.mode==="new"?(t.value.workflowParams.forEach(o=>{o.paramIdx=0,o.eventListenerYn="Y"}),await E().then(()=>{u("get-event-listener-list")})):await N().then(()=>{u("get-event-listener-list")}),f()},E=async()=>{const{data:o}=await J(t.value);o?l.success("등록되었습니다."):l.error("등록 할 수 없습니다.")},N=async()=>{const{data:o}=await K(t.value);o?l.success("등록되었습니다."):l.error("등록 할 수 없습니다.")},F=()=>{w.value=!1},U=o=>{y.value.forEach(n=>{n.workflowInfo.workflowIdx===o&&(t.value.workflowParams=n.workflowParams)})};return(o,n)=>(m(),b("div",Q,[e("div",X,[e("div",Z,[n[10]||(n[10]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),e("div",ee,[e("h3",te," Event Listener "+x(i.mode==="new"?"생성":"수정"),1),e("div",null,[e("div",ne,[n[6]||(n[6]=e("label",{class:"form-label required"},"Event Listener 명",-1)),e("div",se,[C(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Event Listener 명을 입력하세요","onUpdate:modelValue":n[0]||(n[0]=r=>t.value.eventListenerName=r),onFocus:F},null,544),[[$,t.value.eventListenerName]]),w.value?(m(),b("button",ae,"중복 체크")):(m(),b("button",{key:0,class:"btn btn-primary chk",onClick:d,style:{margin:"3px"}},"중복 체크"))])]),e("div",oe,[n[7]||(n[7]=e("label",{class:"form-label required"},"Event Listener 설명",-1)),C(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Event Listener 설명을 입력하세요","onUpdate:modelValue":n[1]||(n[1]=r=>t.value.eventListenerDesc=r)},null,512),[[$,t.value.eventListenerDesc]])]),e("div",le,[n[9]||(n[9]=e("label",{class:"form-label required"},"Workflow",-1)),C(e("select",{class:"form-select p-2 g-col-12","onUpdate:modelValue":n[2]||(n[2]=r=>t.value.workflowIdx=r),onChange:n[3]||(n[3]=r=>U(t.value.workflowIdx))},[n[8]||(n[8]=e("option",{value:0},"Select Workflow",-1)),(m(!0),b(q,null,A(y.value,(r,P)=>(m(),b("option",{value:r.workflowInfo.workflowIdx,key:P},x(r.workflowInfo.workflowName),9,ie))),128))],544),[[M,t.value.workflowIdx]])]),s.value?(m(),R(T,{key:0,popup:!1,"workflow-param-data":t.value.workflowParams,"event-listener-yn":"Y",style:{margin:"0 !important"}},null,8,["workflow-param-data"])):Y("",!0)])]),e("div",re,[e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:n[4]||(n[4]=r=>f())}," Cancel "),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:n[5]||(n[5]=r=>c())},x(i.mode==="new"?"생성":"수정"),1)])])])]))}}),ce={class:"modal",id:"deleteEventListener",tabindex:"-1"},ve={class:"modal-dialog modal-lg",role:"document"},ue={class:"modal-content"},me={class:"modal-body text-left py-4"},fe={class:"modal-footer"},we=I({__name:"deleteEventListener",props:{eventListenerName:{},eventListenerIdx:{}},emits:["get-event-listener-list"],setup(a,{emit:g}){const l=h(),i=a,u=g,k=async()=>{const{data:t}=await O(i.eventListenerIdx);t?l.success("삭제되었습니다."):l.error("삭제하지 못했습니다."),u("get-event-listener-list")};return(t,s)=>(m(),b("div",ce,[e("div",ve,[e("div",ue,[s[3]||(s[3]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),s[4]||(s[4]=e("div",{class:"modal-status bg-danger"},null,-1)),e("div",me,[s[1]||(s[1]=e("h3",{class:"mb-5"}," Event Listener 삭제 ",-1)),e("h4",null,x(i.eventListenerName)+"을(를) 정말 삭제하시겠습니까?",1)]),e("div",fe,[s[2]||(s[2]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:s[0]||(s[0]=f=>k())}," 삭제 ")])])])]))}}),be={class:"card card-flush w-100"},ye=I({__name:"EventListenerList",setup(a){const g=h(),l=v([]),i=v([]);D(async()=>{f(),await u()});const u=async()=>{try{const{data:d}=await j();l.value=d,l.value.forEach(c=>{c.eventListenerUrl=k(c.eventListenerCallUrl)})}catch(d){console.log(d),g.error("데이터를 가져올 수 없습니다.")}},k=d=>window.location.origin+d,t=v(0),s=v(""),f=()=>{i.value=[{title:"Event Listener Name",field:"eventListenerName",width:"20%"},{title:"Connect Workflow Name",field:"workflowName",width:"20%"},{title:"Event Listener Desc",field:"eventListenerDesc",width:"20%"},{title:"Action URL",field:"eventListenerUrl",width:"20%"},{title:"Action",width:"20%",formatter:y,cellClick:function(d,c){const E=d.target,N=E==null?void 0:E.getAttribute("id");t.value=c.getRow().getData().eventListenerIdx,N==="edit-btn"?L.value="edit":s.value=c.getRow().getData().eventListenerName}}]},y=()=>` +
+ + +
`,L=v("new"),w=()=>{t.value=0,L.value="new"};return(d,c)=>(m(),b("div",be,[_(B,{"header-title":"Event Listener","new-btn-title":"New Event Listener","popup-flag":!0,"popup-target":"#eventListenerForm",onClickNewBtn:w}),_(V,{columns:i.value,"table-data":l.value},null,8,["columns","table-data"]),_(de,{mode:L.value,"event-listener-idx":t.value,onGetEventListenerList:u},null,8,["mode","event-listener-idx"]),_(we,{"event-listener-name":s.value,"event-listener-idx":t.value,onGetEventListenerList:u},null,8,["event-listener-name","event-listener-idx"])]))}});export{ye as default}; diff --git a/src/main/resources/static/assets/OssList-BiiASFl1.js b/src/main/resources/static/assets/OssList-BiiASFl1.js new file mode 100644 index 0000000..7ea0198 --- /dev/null +++ b/src/main/resources/static/assets/OssList-BiiASFl1.js @@ -0,0 +1,17 @@ +import{_ as V}from"./TableHeader.vue_vue_type_script_setup_true_lang-CtosSeSW.js";import{_ as B}from"./request-CmxyMwC5.js";import{g as q,a as A,b as M,d as G,o as W,r as j,u as z,c as H,e as J}from"./oss-Bq2sfj0Q.js";import{d as U,u as D,c as K,w as N,o as L,r as m,a as c,b as u,e,t as _,f,v as Q,F as X,g as Y,h as S,i as C}from"./index-BPhSkGh_.js";const Z={class:"modal",id:"ossForm",tabindex:"-1"},ss={class:"modal-dialog modal-xl",role:"document"},es={class:"modal-content"},ts={class:"modal-body text-left py-4"},os={class:"mb-5"},as={class:"mb-3"},ls={class:"grid gap-0 column-gap-3"},ns=["value"],is={class:"row mb-3"},ds={class:"grid gap-0 column-gap-3"},rs={class:"mb-3"},cs={class:"mb-3"},us={class:"row"},ms={class:"col"},ps={class:"col"},vs={class:"col mt-4 row"},bs={key:1,class:"btn btn-success col",style:{"margin-right":"3px"}},gs={key:3,class:"btn btn-success col"},fs={class:"modal-footer"},ws=U({__name:"ossForm",props:{mode:{},ossIdx:{}},emits:["get-oss-list"],setup(O,{emit:w}){const n=D(),i=O,p=w,v=K(()=>i.ossIdx);N(v,async()=>{await o()}),N(()=>i.mode,async()=>{await g(i.mode)}),L(async()=>{await g("init"),await o()});const t=m({}),o=async()=>{if(i.mode==="new")t.value.ossTypeIdx=0,t.value.ossName="",t.value.ossDesc="",t.value.ossUrl="",t.value.ossUsername="",t.value.ossPassword="",d.value=!1,r.value=!1;else{const{data:a}=await q(i.ossIdx);t.value=a,t.value.ossPassword=$(t.value.ossPassword),d.value=!0,r.value=!0}},b=m([]),g=async a=>{try{if(a==="new"||a==="init"){const{data:s}=await A();b.value=s}else{const{data:s}=await M();b.value=s}}catch(s){console.log(s)}},k=()=>{t.value.ossPassword="",r.value=!1},d=m(!1),y=async()=>{const a={ossName:t.value.ossName,ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername},{data:s}=await G(a);s?n.error("이미 사용중인 이름입니다."):(n.success("사용 가능한 이름입니다."),d.value=!0)},r=m(!1),x=async()=>{const a={ossUrl:t.value.ossUrl,ossUsername:t.value.ossUsername,ossPassword:I(t.value.ossPassword),ossTypeIdx:t.value.ossTypeIdx},{data:s}=await W(a);s?(n.success("사용 가능한 OSS입니다."),r.value=!0):n.error("사용 불가능한 OSS입니다.")},T=()=>{d.value=!1},h=()=>{r.value=!1},F=async()=>{t.value.ossPassword=I(t.value.ossPassword),i.mode==="new"?await P().then(()=>{p("get-oss-list")}):await E().then(()=>{p("get-oss-list")}),o()},P=async()=>{await j(t.value).then(({data:a})=>{a?n.success("Regist SUCCESS."):n.error("Regist FAIL.")})},E=async()=>{await z(t.value).then(({data:a})=>{a?n.success("Update SUCCESS."):n.error("Update FAIL.")})},I=a=>btoa(a),$=a=>atob(a);return(a,s)=>(c(),u("div",Z,[e("div",ss,[e("div",es,[s[15]||(s[15]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),e("div",ts,[e("h3",os,_(i.mode==="new"?"New":"Edit")+" OSS ",1),e("div",null,[e("div",as,[s[9]||(s[9]=e("label",{class:"form-label required"},"OSS Type",-1)),e("div",ls,[f(e("select",{"onUpdate:modelValue":s[0]||(s[0]=l=>t.value.ossTypeIdx=l),class:"form-select p-2 g-col-12"},[s[8]||(s[8]=e("option",{value:0},"Select OSS Type",-1)),(c(!0),u(X,null,Y(b.value,(l,R)=>(c(),u("option",{value:l.ossTypeIdx,key:R},_(l.ossTypeName),9,ns))),128))],512),[[Q,t.value.ossTypeIdx]])])]),e("div",is,[s[10]||(s[10]=e("label",{class:"form-label required"},"OSS Name",-1)),e("div",ds,[f(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Name","onUpdate:modelValue":s[1]||(s[1]=l=>t.value.ossName=l),onChange:T},null,544),[[S,t.value.ossName]])])]),e("div",rs,[s[11]||(s[11]=e("label",{class:"form-label required"},"OSS Description",-1)),f(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Description","onUpdate:modelValue":s[2]||(s[2]=l=>t.value.ossDesc=l)},null,512),[[S,t.value.ossDesc]])]),e("div",cs,[s[12]||(s[12]=e("label",{class:"form-label required"},"URL",-1)),f(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the Server URL","onUpdate:modelValue":s[3]||(s[3]=l=>t.value.ossUrl=l),onFocus:h},null,544),[[S,t.value.ossUrl]])]),e("div",us,[e("div",ms,[s[13]||(s[13]=e("label",{class:"form-label required"},"OSS ID",-1)),f(e("input",{type:"text",class:"form-control p-2 g-col-7",placeholder:"Enter the OSS ID","onUpdate:modelValue":s[4]||(s[4]=l=>t.value.ossUsername=l),onFocus:h},null,544),[[S,t.value.ossUsername]])]),e("div",ps,[s[14]||(s[14]=e("label",{class:"form-label required"},"OSS PW",-1)),f(e("input",{type:"password",class:"form-control p-2 g-col-11",placeholder:"Enter the OSS Password","onUpdate:modelValue":s[5]||(s[5]=l=>t.value.ossPassword=l),onClick:k,onFocus:h},null,544),[[S,t.value.ossPassword]])]),e("div",vs,[d.value?(c(),u("button",bs,"Duplicate Check")):(c(),u("button",{key:0,class:"btn btn-primary col",onClick:y,style:{"margin-right":"3px"}},"Duplicate Check")),r.value?(c(),u("button",gs,"Connection Check")):(c(),u("button",{key:2,class:"btn btn-primary col",onClick:x},"Connection Check"))])])])]),e("div",fs,[e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:s[6]||(s[6]=l=>o())}," Cancel "),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:s[7]||(s[7]=l=>F())},_(i.mode==="new"?"Regist":"Edit"),1)])])])]))}}),ys={class:"modal",id:"deleteOss",tabindex:"-1"},Ss={class:"modal-dialog modal-lg",role:"document"},Os={class:"modal-content"},Cs={class:"modal-body text-left py-4"},_s={class:"modal-footer"},ks=U({__name:"deleteOss",props:{ossName:{},ossIdx:{}},emits:["get-oss-list"],setup(O,{emit:w}){const n=D(),i=O,p=w,v=async()=>{const{data:t}=await H(i.ossIdx);t?n.success("삭제되었습니다."):n.error("삭제하지 못했습니다."),p("get-oss-list")};return(t,o)=>(c(),u("div",ys,[e("div",Ss,[e("div",Os,[o[3]||(o[3]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),o[4]||(o[4]=e("div",{class:"modal-status bg-danger"},null,-1)),e("div",Cs,[o[1]||(o[1]=e("h3",{class:"mb-5"}," Delete OSS ",-1)),e("h4",null,"Are you sure you want to delete "+_(i.ossName)+"?",1)]),e("div",_s,[o[2]||(o[2]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:o[0]||(o[0]=b=>v())}," Delete ")])])])]))}}),xs={class:"card card-flush w-100"},Ns=U({__name:"OssList",setup(O){const w=D(),n=m([]),i=m([]);L(async()=>{o(),await p()});const p=async()=>{try{const{data:d}=await J();n.value=d}catch(d){console.log(d),w.error("데이터를 가져올 수 없습니다.")}},v=m(0),t=m(""),o=()=>{i.value=[{title:"OSS Name",field:"ossName",width:"20%"},{title:"OSS Desc",field:"ossDesc",width:"20%"},{title:"URL",field:"ossUrl",width:"40%"},{title:"Action",width:"20%",formatter:b,cellClick:function(d,y){const r=d.target,x=r==null?void 0:r.getAttribute("id");v.value=y.getRow().getData().ossIdx,x==="edit-btn"?g.value="edit":t.value=y.getRow().getData().ossName}}]},b=()=>` +
+ + +
`,g=m("new"),k=()=>{v.value=0,g.value="new"};return(d,y)=>(c(),u("div",xs,[C(V,{"header-title":"OSS","new-btn-title":"New OSS","popup-flag":!0,"popup-target":"#ossForm",onClickNewBtn:k}),C(B,{columns:i.value,"table-data":n.value},null,8,["columns","table-data"]),C(ws,{mode:g.value,"oss-idx":v.value,onGetOssList:p},null,8,["mode","oss-idx"]),C(ks,{"oss-name":t.value,"oss-idx":v.value,onGetOssList:p},null,8,["oss-name","oss-idx"])]))}});export{Ns as default}; diff --git a/src/main/resources/static/assets/ParamForm-CikIVyrv.js b/src/main/resources/static/assets/ParamForm-CikIVyrv.js new file mode 100644 index 0000000..d108816 --- /dev/null +++ b/src/main/resources/static/assets/ParamForm-CikIVyrv.js @@ -0,0 +1 @@ +import{s as o}from"./request-CmxyMwC5.js";import{d as _,u as I,J as C,c as K,w as L,o as U,a as s,b as i,e as l,F as V,g as $,j as w,f as m,h as k,C as g}from"./index-BPhSkGh_.js";const H=e=>o.get(`/eventlistener/workflowList/${e}`);function T(e){return o.get(`/workflow/name/duplicate?workflowName=${e}`)}function R(e){return o.get(`/workflow/template/${e}`)}function Y(){return o.get("/workflow/workflowStageList")}function F(e,c){return o.get(`/eventlistener/workflowDetail/${e}/${c}`)}function z(e){return o.post("/workflow",e)}function J(e){return o.patch(`/workflow/${e.workflowInfo.workflowIdx}`,e)}function O(e){return o.delete(`/workflow/${e}`)}function q(e){return o.post("/workflow/run",e)}function G(e){return o.get(`/workflow/log/${e}`)}function Q(e){return o.get(`/workflow/runHistory/${e}`)}function X(e){return o.get(`/workflow/stageHistory/${e.workflowIdx}?buildIdx=${e.buildName}&nodeIdx=${e.stageIdx}`)}const M={key:0,class:"mt-5 mb-5"},P={class:"grid gap-0 column-gap-3 mb-2"},x=["onUpdate:modelValue","disabled","onBlur"],E=["onUpdate:modelValue","disabled"],W={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-plus",style:{margin:"0 !important"}},S=["onClick"],B={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-minus",style:{margin:"0 !important"}},D=_({__name:"ParamForm",props:{popup:{type:Boolean},workflowParamData:{},eventListenerYn:{}},setup(e){const c=I(),p=C(),r=e,t=K(()=>r.workflowParamData),v=n=>{t.value[n].paramKey.toUpperCase()==="NAMESPACE"?t.value[n].paramValue=p.projectInfo.ns_id:t.value[n].paramKey.toUpperCase()==="MCI"?t.value[n].paramValue=p.projectInfo.mci_id:t.value[n].paramKey.toUpperCase()==="CLUSTER"&&(t.value[n].paramValue=p.projectInfo.cluster_id)};L(()=>t.value,()=>{}),U(()=>{h()});const h=()=>{t.value.length===0&&t.value.push({paramIdx:0,paramKey:"",paramValue:"",eventListenerYn:r.eventListenerYn})},y=()=>{t.value.push({paramIdx:0,paramKey:"",paramValue:"",eventListenerYn:r.eventListenerYn})},b=n=>{t.value.length!==1?t.value.splice(n,1):c.error("비워두셔도 됩니다.")};return(n,u)=>t.value?(s(),i("div",M,[u[2]||(u[2]=l("label",{class:"form-label"}," Parameter ",-1)),(s(!0),i(V,null,$(t.value,(a,f)=>(s(),i("div",{key:f},[l("div",P,[m(l("input",{class:g(["form-control p-2",r.popup?"g-col-6":"g-col-5"]),type:"text",placeholder:"Key","onUpdate:modelValue":d=>a.paramKey=d,disabled:r.popup||a.paramKey.toUpperCase()==="MCI"||a.paramKey.toUpperCase()==="CLUSTER"||a.paramKey.toUpperCase()==="NAMESPACE",onBlur:d=>v(f)},null,42,x),[[k,a.paramKey]]),m(l("input",{class:g(["form-control p-2",r.popup?"g-col-6":"g-col-5"]),type:"text",placeholder:"Value","onUpdate:modelValue":d=>a.paramValue=d,disabled:a.paramKey==="MCI"||a.paramKey==="CLUSTER"||a.paramKey==="NAMESPACE"},null,10,E),[[k,a.paramValue]]),r.popup?w("",!0):(s(),i("button",{key:0,class:"btn btn-primary",onClick:y,style:{"text-align":"center !important"}},[(s(),i("svg",W,u[0]||(u[0]=[l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),l("path",{d:"M12 5l0 14"},null,-1),l("path",{d:"M5 12l14 0"},null,-1)])))])),r.popup?w("",!0):(s(),i("button",{key:1,class:"btn btn-primary",onClick:d=>b(f)},[(s(),i("svg",B,u[1]||(u[1]=[l("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),l("path",{d:"M5 12l14 0"},null,-1)])))],8,S))])]))),128))])):w("",!0)}}),j=(e,c)=>{const p=e.__vccOpts||e;for(const[r,t]of c)p[r]=t;return p},Z=j(D,[["__scopeId","data-v-58eb0727"]]);export{Z as P,j as _,F as a,G as b,Y as c,O as d,X as e,Q as f,H as g,T as h,z as i,R as j,q as r,J as u}; diff --git a/src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-CtosSeSW.js b/src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-CtosSeSW.js new file mode 100644 index 0000000..258c572 --- /dev/null +++ b/src/main/resources/static/assets/TableHeader.vue_vue_type_script_setup_true_lang-CtosSeSW.js @@ -0,0 +1 @@ +import{d as h,a as n,b as s,e as t,t as i,p as a,l as r}from"./index-BPhSkGh_.js";const w={class:"page-header"},k={class:"row align-items-center"},g={class:"col"},b={class:"page-title"},m={class:"col-auto ms-auto"},u={class:"btn-list"},_=["data-bs-target"],T=h({__name:"TableHeader",props:{headerTitle:{},newBtnTitle:{},popupFlag:{type:Boolean},popupTarget:{}},emits:["click-new-btn"],setup(c,{emit:p}){const e=c,d=p,l=()=>{d("click-new-btn")};return(v,o)=>(n(),s("div",w,[t("div",k,[t("div",g,[t("h2",b,i(e.headerTitle),1)]),t("div",m,[t("div",u,[e.popupFlag?(n(),s("a",{key:1,class:"btn btn-primary d-none d-sm-inline-block","data-bs-toggle":"modal","data-bs-target":e.popupTarget,onClick:a(l,["prevent","stop"])},[o[1]||(o[1]=t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t("path",{d:"M12 5l0 14"}),t("path",{d:"M5 12l14 0"})],-1)),r(" "+i(e.newBtnTitle),1)],8,_)):(n(),s("a",{key:0,class:"btn btn-primary d-none d-sm-inline-block",onClick:a(l,["prevent","stop"])},[o[0]||(o[0]=t("svg",{xmlns:"http://www.w3.org/2000/svg",class:"icon icon-tabler icon-tabler-plus",width:"24",height:"24",viewBox:"0 0 24 24","stroke-width":"2",stroke:"currentColor",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),t("path",{d:"M12 5l0 14"}),t("path",{d:"M5 12l14 0"})],-1)),r(" "+i(e.newBtnTitle),1)]))])])])]))}});export{T as _}; diff --git a/src/main/resources/static/assets/WorkflowForm-NvV96v6Y.js b/src/main/resources/static/assets/WorkflowForm-NvV96v6Y.js new file mode 100644 index 0000000..69242f9 --- /dev/null +++ b/src/main/resources/static/assets/WorkflowForm-NvV96v6Y.js @@ -0,0 +1,1163 @@ +import{d as zn,q as Is,n as Hs,s as Dc,x as Wm,y as Nm,z as Bm,A as Fc,r as $t,w as Zr,o as oo,a as We,b as Ne,e as ve,F as An,g as Hn,B as rt,t as Qt,j as ji,i as rn,C as Wc,D as Pi,E as Nc,u as zs,G as Pm,H as Hm,I as zm,f as $c,h as Um,v as Gm}from"./index-BPhSkGh_.js";import{f as Vm}from"./oss-Bq2sfj0Q.js";import{_ as so,c as Km,e as Ym,f as Xm,a as jm,P as Zm,h as Qm,i as Jm,u as qm,j as ew}from"./ParamForm-CikIVyrv.js";import{_ as tw}from"./request-CmxyMwC5.js";/*! + * vue-draggable-next v2.2.0 + * (c) 2023 Anish George + * @license MIT + *//**! + * Sortable 1.14.0 + * @author RubaXa + * @author owenm + * @license MIT + */function Sc(I,C){var u=Object.keys(I);if(Object.getOwnPropertySymbols){var g=Object.getOwnPropertySymbols(I);C&&(g=g.filter(function(N){return Object.getOwnPropertyDescriptor(I,N).enumerable})),u.push.apply(u,g)}return u}function hn(I){for(var C=1;C=0)&&(u[N]=I[N]);return u}function rw(I,C){if(I==null)return{};var u=iw(I,C),g,N;if(Object.getOwnPropertySymbols){var k=Object.getOwnPropertySymbols(I);for(N=0;N=0)&&Object.prototype.propertyIsEnumerable.call(I,g)&&(u[g]=I[g])}return u}var ow="1.14.0";function Cn(I){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(I)}var En=Cn(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Zi=Cn(/Edge/i),_c=Cn(/firefox/i),Gi=Cn(/safari/i)&&!Cn(/chrome/i)&&!Cn(/android/i),Bc=Cn(/iP(ad|od|hone)/i),sw=Cn(/chrome/i)&&Cn(/android/i),Pc={capture:!1,passive:!1};function Pe(I,C,u){I.addEventListener(C,u,!En&&Pc)}function Fe(I,C,u){I.removeEventListener(C,u,!En&&Pc)}function Qr(I,C){if(C){if(C[0]===">"&&(C=C.substring(1)),I)try{if(I.matches)return I.matches(C);if(I.msMatchesSelector)return I.msMatchesSelector(C);if(I.webkitMatchesSelector)return I.webkitMatchesSelector(C)}catch{return!1}return!1}}function aw(I){return I.host&&I!==document&&I.host.nodeType?I.host:I.parentNode}function cn(I,C,u,g){if(I){u=u||document;do{if(C!=null&&(C[0]===">"?I.parentNode===u&&Qr(I,C):Qr(I,C))||g&&I===u)return I;if(I===u)break}while(I=aw(I))}return null}var Cc=/\s+/g;function Bt(I,C,u){if(I&&C)if(I.classList)I.classList[u?"add":"remove"](C);else{var g=(" "+I.className+" ").replace(Cc," ").replace(" "+C+" "," ");I.className=(g+(u?" "+C:"")).replace(Cc," ")}}function $e(I,C,u){var g=I&&I.style;if(g){if(u===void 0)return document.defaultView&&document.defaultView.getComputedStyle?u=document.defaultView.getComputedStyle(I,""):I.currentStyle&&(u=I.currentStyle),C===void 0?u:u[C];!(C in g)&&C.indexOf("webkit")===-1&&(C="-webkit-"+C),g[C]=u+(typeof u=="string"?"":"px")}}function bi(I,C){var u="";if(typeof I=="string")u=I;else do{var g=$e(I,"transform");g&&g!=="none"&&(u=g+" "+u)}while(!C&&(I=I.parentNode));var N=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return N&&new N(u)}function Hc(I,C,u){if(I){var g=I.getElementsByTagName(C),N=0,k=g.length;if(u)for(;N=k,!b)return g;if(g===un())break;g=Pn(g,!1)}return!1}function $i(I,C,u,g){for(var N=0,k=0,b=I.children;k2&&arguments[2]!==void 0?arguments[2]:{},N=g.evt,k=rw(g,gw);Qi.pluginEvent.bind(Se)(C,u,hn({dragEl:ce,parentEl:nt,ghostEl:Ae,rootEl:qe,nextEl:ti,lastDownEl:Kr,cloneEl:it,cloneHidden:Bn,dragStarted:Hi,putSortable:mt,activeSortable:Se.active,originalEvent:N,oldIndex:yi,oldDraggableIndex:Ki,newIndex:Pt,newDraggableIndex:Nn,hideGhostForTarget:Xc,unhideGhostForTarget:jc,cloneNowHidden:function(){Bn=!0},cloneNowShown:function(){Bn=!1},dispatchSortableEvent:function(S){xt({sortable:u,name:S,originalEvent:N})}},k))};function xt(I){pw(hn({putSortable:mt,cloneEl:it,targetEl:ce,rootEl:qe,oldIndex:yi,oldDraggableIndex:Ki,newIndex:Pt,newDraggableIndex:Nn},I))}var ce,nt,Ae,qe,ti,Kr,it,Bn,yi,Pt,Ki,Nn,Hr,mt,wi=!1,Jr=!1,qr=[],qn,nn,Cs,As,Ec,Lc,Hi,mi,Yi,Xi=!1,zr=!1,Yr,bt,xs=[],Os=!1,eo=[],ao=typeof document<"u",Ur=Bc,Tc=Zi||En?"cssFloat":"float",vw=ao&&!sw&&!Bc&&"draggable"in document.createElement("div"),Vc=function(){if(ao){if(En)return!1;var I=document.createElement("x");return I.style.cssText="pointer-events:auto",I.style.pointerEvents==="auto"}}(),Kc=function(C,u){var g=$e(C),N=parseInt(g.width)-parseInt(g.paddingLeft)-parseInt(g.paddingRight)-parseInt(g.borderLeftWidth)-parseInt(g.borderRightWidth),k=$i(C,0,u),b=$i(C,1,u),S=k&&$e(k),l=b&&$e(b),h=S&&parseInt(S.marginLeft)+parseInt(S.marginRight)+ut(k).width,s=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+ut(b).width;if(g.display==="flex")return g.flexDirection==="column"||g.flexDirection==="column-reverse"?"vertical":"horizontal";if(g.display==="grid")return g.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(k&&S.float&&S.float!=="none"){var r=S.float==="left"?"left":"right";return b&&(l.clear==="both"||l.clear===r)?"vertical":"horizontal"}return k&&(S.display==="block"||S.display==="flex"||S.display==="table"||S.display==="grid"||h>=N&&g[Tc]==="none"||b&&g[Tc]==="none"&&h+s>N)?"vertical":"horizontal"},mw=function(C,u,g){var N=g?C.left:C.top,k=g?C.right:C.bottom,b=g?C.width:C.height,S=g?u.left:u.top,l=g?u.right:u.bottom,h=g?u.width:u.height;return N===S||k===l||N+b/2===S+h/2},ww=function(C,u){var g;return qr.some(function(N){var k=N[Ht].options.emptyInsertThreshold;if(!(!k||Us(N))){var b=ut(N),S=C>=b.left-k&&C<=b.right+k,l=u>=b.top-k&&u<=b.bottom+k;if(S&&l)return g=N}}),g},Yc=function(C){function u(k,b){return function(S,l,h,s){var r=S.options.group.name&&l.options.group.name&&S.options.group.name===l.options.group.name;if(k==null&&(b||r))return!0;if(k==null||k===!1)return!1;if(b&&k==="clone")return k;if(typeof k=="function")return u(k(S,l,h,s),b)(S,l,h,s);var o=(b?S:l).options.group.name;return k===!0||typeof k=="string"&&k===o||k.join&&k.indexOf(o)>-1}}var g={},N=C.group;(!N||Vr(N)!="object")&&(N={name:N}),g.name=N.name,g.checkPull=u(N.pull,!0),g.checkPut=u(N.put),g.revertClone=N.revertClone,C.group=g},Xc=function(){!Vc&&Ae&&$e(Ae,"display","none")},jc=function(){!Vc&&Ae&&$e(Ae,"display","")};ao&&document.addEventListener("click",function(I){if(Jr)return I.preventDefault(),I.stopPropagation&&I.stopPropagation(),I.stopImmediatePropagation&&I.stopImmediatePropagation(),Jr=!1,!1},!0);var ei=function(C){if(ce){C=C.touches?C.touches[0]:C;var u=ww(C.clientX,C.clientY);if(u){var g={};for(var N in C)C.hasOwnProperty(N)&&(g[N]=C[N]);g.target=g.rootEl=u,g.preventDefault=void 0,g.stopPropagation=void 0,u[Ht]._onDragOver(g)}}},yw=function(C){ce&&ce.parentNode[Ht]._isOutsideThisEl(C.target)};function Se(I,C){if(!(I&&I.nodeType&&I.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(I));this.el=I,this.options=C=xn({},C),I[Ht]=this;var u={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(I.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Kc(I,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(b,S){b.setData("Text",S.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Se.supportPointer!==!1&&"PointerEvent"in window&&!Gi,emptyInsertThreshold:5};Qi.initializePlugins(this,I,u);for(var g in u)!(g in C)&&(C[g]=u[g]);Yc(C);for(var N in this)N.charAt(0)==="_"&&typeof this[N]=="function"&&(this[N]=this[N].bind(this));this.nativeDraggable=C.forceFallback?!1:vw,this.nativeDraggable&&(this.options.touchStartThreshold=1),C.supportPointer?Pe(I,"pointerdown",this._onTapStart):(Pe(I,"mousedown",this._onTapStart),Pe(I,"touchstart",this._onTapStart)),this.nativeDraggable&&(Pe(I,"dragover",this),Pe(I,"dragenter",this)),qr.push(this.el),C.store&&C.store.get&&this.sort(C.store.get(this)||[]),xn(this,hw())}Se.prototype={constructor:Se,_isOutsideThisEl:function(C){!this.el.contains(C)&&C!==this.el&&(mi=null)},_getDirection:function(C,u){return typeof this.options.direction=="function"?this.options.direction.call(this,C,u,ce):this.options.direction},_onTapStart:function(C){if(C.cancelable){var u=this,g=this.el,N=this.options,k=N.preventOnFilter,b=C.type,S=C.touches&&C.touches[0]||C.pointerType&&C.pointerType==="touch"&&C,l=(S||C).target,h=C.target.shadowRoot&&(C.path&&C.path[0]||C.composedPath&&C.composedPath()[0])||l,s=N.filter;if(Ew(g),!ce&&!(/mousedown|pointerdown/.test(b)&&C.button!==0||N.disabled)&&!h.isContentEditable&&!(!this.nativeDraggable&&Gi&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=cn(l,N.draggable,g,!1),!(l&&l.animated)&&Kr!==l)){if(yi=Zt(l),Ki=Zt(l,N.draggable),typeof s=="function"){if(s.call(this,C,l,this)){xt({sortable:u,rootEl:h,name:"filter",targetEl:l,toEl:g,fromEl:g}),Mt("filter",u,{evt:C}),k&&C.cancelable&&C.preventDefault();return}}else if(s&&(s=s.split(",").some(function(r){if(r=cn(h,r.trim(),g,!1),r)return xt({sortable:u,rootEl:r,name:"filter",targetEl:l,fromEl:g,toEl:g}),Mt("filter",u,{evt:C}),!0}),s)){k&&C.cancelable&&C.preventDefault();return}N.handle&&!cn(h,N.handle,g,!1)||this._prepareDragStart(C,S,l)}}},_prepareDragStart:function(C,u,g){var N=this,k=N.el,b=N.options,S=k.ownerDocument,l;if(g&&!ce&&g.parentNode===k){var h=ut(g);if(qe=k,ce=g,nt=ce.parentNode,ti=ce.nextSibling,Kr=g,Hr=b.group,Se.dragged=ce,qn={target:ce,clientX:(u||C).clientX,clientY:(u||C).clientY},Ec=qn.clientX-h.left,Lc=qn.clientY-h.top,this._lastX=(u||C).clientX,this._lastY=(u||C).clientY,ce.style["will-change"]="all",l=function(){if(Mt("delayEnded",N,{evt:C}),Se.eventCanceled){N._onDrop();return}N._disableDelayedDragEvents(),!_c&&N.nativeDraggable&&(ce.draggable=!0),N._triggerDragStart(C,u),xt({sortable:N,name:"choose",originalEvent:C}),Bt(ce,b.chosenClass,!0)},b.ignore.split(",").forEach(function(s){Hc(ce,s.trim(),Es)}),Pe(S,"dragover",ei),Pe(S,"mousemove",ei),Pe(S,"touchmove",ei),Pe(S,"mouseup",N._onDrop),Pe(S,"touchend",N._onDrop),Pe(S,"touchcancel",N._onDrop),_c&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ce.draggable=!0),Mt("delayStart",this,{evt:C}),b.delay&&(!b.delayOnTouchOnly||u)&&(!this.nativeDraggable||!(Zi||En))){if(Se.eventCanceled){this._onDrop();return}Pe(S,"mouseup",N._disableDelayedDrag),Pe(S,"touchend",N._disableDelayedDrag),Pe(S,"touchcancel",N._disableDelayedDrag),Pe(S,"mousemove",N._delayedDragTouchMoveHandler),Pe(S,"touchmove",N._delayedDragTouchMoveHandler),b.supportPointer&&Pe(S,"pointermove",N._delayedDragTouchMoveHandler),N._dragStartTimer=setTimeout(l,b.delay)}else l()}},_delayedDragTouchMoveHandler:function(C){var u=C.touches?C.touches[0]:C;Math.max(Math.abs(u.clientX-this._lastX),Math.abs(u.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ce&&Es(ce),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var C=this.el.ownerDocument;Fe(C,"mouseup",this._disableDelayedDrag),Fe(C,"touchend",this._disableDelayedDrag),Fe(C,"touchcancel",this._disableDelayedDrag),Fe(C,"mousemove",this._delayedDragTouchMoveHandler),Fe(C,"touchmove",this._delayedDragTouchMoveHandler),Fe(C,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(C,u){u=u||C.pointerType=="touch"&&C,!this.nativeDraggable||u?this.options.supportPointer?Pe(document,"pointermove",this._onTouchMove):u?Pe(document,"touchmove",this._onTouchMove):Pe(document,"mousemove",this._onTouchMove):(Pe(ce,"dragend",this),Pe(qe,"dragstart",this._onDragStart));try{document.selection?Xr(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(C,u){if(wi=!1,qe&&ce){Mt("dragStarted",this,{evt:u}),this.nativeDraggable&&Pe(document,"dragover",yw);var g=this.options;!C&&Bt(ce,g.dragClass,!1),Bt(ce,g.ghostClass,!0),Se.active=this,C&&this._appendGhost(),xt({sortable:this,name:"start",originalEvent:u})}else this._nulling()},_emulateDragOver:function(){if(nn){this._lastX=nn.clientX,this._lastY=nn.clientY,Xc();for(var C=document.elementFromPoint(nn.clientX,nn.clientY),u=C;C&&C.shadowRoot&&(C=C.shadowRoot.elementFromPoint(nn.clientX,nn.clientY),C!==u);)u=C;if(ce.parentNode[Ht]._isOutsideThisEl(C),u)do{if(u[Ht]){var g=void 0;if(g=u[Ht]._onDragOver({clientX:nn.clientX,clientY:nn.clientY,target:C,rootEl:u}),g&&!this.options.dragoverBubble)break}C=u}while(u=u.parentNode);jc()}},_onTouchMove:function(C){if(qn){var u=this.options,g=u.fallbackTolerance,N=u.fallbackOffset,k=C.touches?C.touches[0]:C,b=Ae&&bi(Ae,!0),S=Ae&&b&&b.a,l=Ae&&b&&b.d,h=Ur&&bt&&xc(bt),s=(k.clientX-qn.clientX+N.x)/(S||1)+(h?h[0]-xs[0]:0)/(S||1),r=(k.clientY-qn.clientY+N.y)/(l||1)+(h?h[1]-xs[1]:0)/(l||1);if(!Se.active&&!wi){if(g&&Math.max(Math.abs(k.clientX-this._lastX),Math.abs(k.clientY-this._lastY))=0&&(xt({rootEl:nt,name:"add",toEl:nt,fromEl:qe,originalEvent:C}),xt({sortable:this,name:"remove",toEl:nt,originalEvent:C}),xt({rootEl:nt,name:"sort",toEl:nt,fromEl:qe,originalEvent:C}),xt({sortable:this,name:"sort",toEl:nt,originalEvent:C})),mt&&mt.save()):Pt!==yi&&Pt>=0&&(xt({sortable:this,name:"update",toEl:nt,originalEvent:C}),xt({sortable:this,name:"sort",toEl:nt,originalEvent:C})),Se.active&&((Pt==null||Pt===-1)&&(Pt=yi,Nn=Ki),xt({sortable:this,name:"end",toEl:nt,originalEvent:C}),this.save()))),this._nulling()},_nulling:function(){Mt("nulling",this),qe=ce=nt=Ae=ti=it=Kr=Bn=qn=nn=Hi=Pt=Nn=yi=Ki=mi=Yi=mt=Hr=Se.dragged=Se.ghost=Se.clone=Se.active=null,eo.forEach(function(C){C.checked=!0}),eo.length=Cs=As=0},handleEvent:function(C){switch(C.type){case"drop":case"dragend":this._onDrop(C);break;case"dragenter":case"dragover":ce&&(this._onDragOver(C),bw(C));break;case"selectstart":C.preventDefault();break}},toArray:function(){for(var C=[],u,g=this.el.children,N=0,k=g.length,b=this.options;Ng.right+N||I.clientX<=g.right&&I.clientY>g.bottom&&I.clientX>=g.left:I.clientX>g.right&&I.clientY>g.top||I.clientX<=g.right&&I.clientY>g.bottom+N}function Cw(I,C,u,g,N,k,b,S){var l=g?I.clientY:I.clientX,h=g?u.height:u.width,s=g?u.top:u.left,r=g?u.bottom:u.right,o=!1;if(!b){if(S&&Yrs+h*k/2:lr-Yr)return-Yi}else if(l>s+h*(1-N)/2&&lr-h*k/2)?l>s+h/2?1:-1:0}function Aw(I){return Zt(ce)I.replace(Rw,(C,u)=>u?u.toUpperCase():""));function Ms(I){I.parentElement!==null&&I.parentElement.removeChild(I)}function Rc(I,C,u){const g=u===0?I.children[0]:I.children[u-1].nextSibling;I.insertBefore(C,g)}function Iw(I,C){return Object.values(I).indexOf(C)}function Ow(I,C,u,g){if(!I)return[];const N=Object.values(I),k=C.length-g;return[...C].map((S,l)=>l>=k?N.length:N.indexOf(S))}function Qc(I,C){this.$nextTick(()=>this.$emit(I.toLowerCase(),C))}function Dw(I){return C=>{this.realList!==null&&this["onDrag"+I](C),Qc.call(this,I,C)}}function Fw(I){return["transition-group","TransitionGroup"].includes(I)}function Ww(I){if(!I||I.length!==1)return!1;const[{type:C}]=I;return C?Fw(C.name):!1}function Nw(I,C){return C?{...C.props,...C.attrs}:I}const Ns=["Start","Add","Remove","Update","End"],Bs=["Choose","Unchoose","Sort","Filter","Clone"],Bw=["Move",...Ns,...Bs].map(I=>"on"+I);let Rs=null;const Pw={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:I=>I},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},Hw=zn({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...Ns.map(I=>I.toLowerCase()),...Bs.map(I=>I.toLowerCase())],props:Pw,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const I=this.$slots.default?this.$slots.default():null,C=Nw(this.$attrs,this.componentData);return I?(this.transitionMode=Ww(I),Is(this.getTag(),C,I)):Is(this.getTag(),C,[])},created(){this.list!==null&&this.modelValue!==null&&kw.error("list props are mutually exclusive! Please set one.")},mounted(){const I={};Ns.forEach(N=>{I["on"+N]=Dw.call(this,N)}),Bs.forEach(N=>{I["on"+N]=Qc.bind(this,N)});const C=Object.keys(this.$attrs).reduce((N,k)=>(N[Mc(k)]=this.$attrs[k],N),{}),u=Object.assign({},C,I,{onMove:(N,k)=>this.onDragMove(N,k)});!("draggable"in u)&&(u.draggable=">*");const g=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new Se(g,u),g.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(I){this.updateOptions(I)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?Hs(this.component):this.tag},updateOptions(I){for(var C in I){const u=Mc(C);Bw.indexOf(u)===-1&&this._sortable.option(u,I[C])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=Ow(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(I){const C=Iw(this.getChildrenNodes()||[],I);if(C===-1)return null;const u=this.realList[C];return{index:C,element:u}},emitChanges(I){this.$nextTick(()=>{this.$emit("change",I)})},alterList(I){if(this.list){I(this.list);return}const C=[...this.modelValue];I(C),this.$emit("update:modelValue",C)},spliceList(){const I=C=>C.splice(...arguments);this.alterList(I)},updatePosition(I,C){const u=g=>g.splice(C,0,g.splice(I,1)[0]);this.alterList(u)},getVmIndex(I){const C=this.visibleIndexes,u=C.length;return I>u-1?u:C[I]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(I){if(!this.noTransitionOnDrag||!this.transitionMode)return;var C=this.getChildrenNodes();C[I].data=null;const u=this.getComponent();u.children=[],u.kept=void 0},onDragStart(I){this.computeIndexes(),this.context=this.getUnderlyingVm(I.item),this.context&&(I.item._underlying_vm_=this.clone(this.context.element),Rs=I.item)},onDragAdd(I){const C=I.item._underlying_vm_;if(C===void 0)return;Ms(I.item);const u=this.getVmIndex(I.newIndex);this.spliceList(u,0,C),this.computeIndexes();const g={element:C,newIndex:u};this.emitChanges({added:g})},onDragRemove(I){if(Rc(this.$el,I.item,I.oldIndex),I.pullMode==="clone"){Ms(I.clone);return}if(!this.context)return;const C=this.context.index;this.spliceList(C,1);const u={element:this.context.element,oldIndex:C};this.resetTransitionData(C),this.emitChanges({removed:u})},onDragUpdate(I){Ms(I.item),Rc(I.from,I.item,I.oldIndex);const C=this.context.index,u=this.getVmIndex(I.newIndex);this.updatePosition(C,u);const g={element:this.context.element,oldIndex:C,newIndex:u};this.emitChanges({moved:g})},updateProperty(I,C){I.hasOwnProperty(C)&&(I[C]+=this.headerOffset)},onDragMove(I,C){const u=this.move;if(!u||!this.realList)return!0;const g=this.getRelatedContextFromMoveEvent(I),N=this.context,k=this.computeFutureIndex(g,I);Object.assign(N,{futureIndex:k});const b=Object.assign({},I,{relatedContext:g,draggedContext:N});return u(b,C)},onDragEnd(){this.computeIndexes(),Rs=null},getTrargetedComponent(I){return I.__draggable_component__},getRelatedContextFromMoveEvent({to:I,related:C}){const u=this.getTrargetedComponent(I);if(!u)return{component:u};const g=u.realList,N={list:g,component:u};if(I!==C&&g&&u.getUnderlyingVm){const k=u.getUnderlyingVm(C);if(k)return Object.assign(k,N)}return N},computeFutureIndex(I,C){const u=[...C.to.children].filter(b=>b.style.display!=="none");if(u.length===0)return 0;const g=u.indexOf(C.related),N=I.component.getVmIndex(g);return u.indexOf(Rs)!==-1||!C.willInsertAfter?N:N+1}}});var Jc={exports:{}};(function(I,C){(function(){var u="ace",g=function(){return this}();!g&&typeof window<"u"&&(g=window);var N=function(s,r,o){if(typeof s!="string"){N.original?N.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(o=r),N.modules[s]||(N.payloads[s]=o,N.modules[s]=null)};N.modules={},N.payloads={};var k=function(s,r,o){if(typeof r=="string"){var i=l(s,r);if(i!=null)return o&&o(),i}else if(Object.prototype.toString.call(r)==="[object Array]"){for(var n=[],a=0,c=r.length;al.length)&&(S=l.length),S-=b.length;var h=l.indexOf(b,S);return h!==-1&&h===S}),String.prototype.repeat||k(String.prototype,"repeat",function(b){for(var S="",l=this;b>0;)b&1&&(S+=l),(b>>=1)&&(l+=l);return S}),String.prototype.includes||k(String.prototype,"includes",function(b,S){return this.indexOf(b,S)!=-1}),Object.assign||(Object.assign=function(b){if(b==null)throw new TypeError("Cannot convert undefined or null to object");for(var S=Object(b),l=1;l>>0,h=arguments[1],s=h>>0,r=s<0?Math.max(l+s,0):Math.min(s,l),o=arguments[2],i=o===void 0?l:o>>0,n=i<0?Math.max(l+i,0):Math.min(i,l);r0;)l&1&&(h+=S),(l>>=1)&&(S+=S);return h};var k=/^\s\s*/,b=/\s\s*$/;g.stringTrimLeft=function(S){return S.replace(k,"")},g.stringTrimRight=function(S){return S.replace(b,"")},g.copyObject=function(S){var l={};for(var h in S)l[h]=S[h];return l},g.copyArray=function(S){for(var l=[],h=0,s=S.length;h65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(u,g,N){g.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},g.getOS=function(){return g.isMac?g.OS.MAC:g.isLinux?g.OS.LINUX:g.OS.WINDOWS};var k=typeof navigator=="object"?navigator:{},b=(/mac|win|linux/i.exec(k.platform)||["other"])[0].toLowerCase(),S=k.userAgent||"",l=k.appName||"";g.isWin=b=="win",g.isMac=b=="mac",g.isLinux=b=="linux",g.isIE=l=="Microsoft Internet Explorer"||l.indexOf("MSAppHost")>=0?parseFloat((S.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((S.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),g.isOldIE=g.isIE&&g.isIE<9,g.isGecko=g.isMozilla=S.match(/ Gecko\/\d+/),g.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",g.isWebKit=parseFloat(S.split("WebKit/")[1])||void 0,g.isChrome=parseFloat(S.split(" Chrome/")[1])||void 0,g.isSafari=parseFloat(S.split(" Safari/")[1])&&!g.isChrome||void 0,g.isEdge=parseFloat(S.split(" Edge/")[1])||void 0,g.isAIR=S.indexOf("AdobeAIR")>=0,g.isAndroid=S.indexOf("Android")>=0,g.isChromeOS=S.indexOf(" CrOS ")>=0,g.isIOS=/iPad|iPhone|iPod/.test(S)&&!window.MSStream,g.isIOS&&(g.isMac=!0),g.isMobile=g.isIOS||g.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(u,g,N){var k=u("./useragent"),b="http://www.w3.org/1999/xhtml";g.buildDom=function o(i,n,a){if(typeof i=="string"&&i){var c=document.createTextNode(i);return n&&n.appendChild(c),c}if(!Array.isArray(i))return i&&i.appendChild&&n&&n.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var d=[],p=0;p"u")){if(l){if(n)h();else if(n===!1)return l.push([o,i])}if(!S){var a=n;!n||!n.getRootNode?a=document:(a=n.getRootNode(),(!a||a==n)&&(a=document));var c=a.ownerDocument||a;if(i&&g.hasCssString(i,a))return null;i&&(o+=` +/*# sourceURL=ace/css/`+i+" */");var d=g.createElement("style");d.appendChild(c.createTextNode(o)),i&&(d.id=i),a==c&&(a=g.getDocumentHead(c)),a.insertBefore(d,a.firstChild)}}}if(g.importCssString=s,g.importCssStylsheet=function(o,i){g.buildDom(["link",{rel:"stylesheet",href:o}],g.getDocumentHead(i))},g.scrollbarWidth=function(o){var i=g.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var n=g.createElement("ace_outer"),a=n.style;a.position="absolute",a.left="-10000px",a.overflow="hidden",a.width="200px",a.minWidth="0px",a.height="150px",a.display="block",n.appendChild(i);var c=o&&o.documentElement||document&&document.documentElement;if(!c)return 0;c.appendChild(n);var d=i.offsetWidth;a.overflow="scroll";var p=i.offsetWidth;return d===p&&(p=n.clientWidth),c.removeChild(n),d-p},g.computedStyle=function(o,i){return window.getComputedStyle(o,"")||{}},g.setStyle=function(o,i,n){o[i]!==n&&(o[i]=n)},g.HAS_CSS_ANIMATION=!1,g.HAS_CSS_TRANSFORMS=!1,g.HI_DPI=k.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,k.isChromeOS&&(g.HI_DPI=!1),typeof document<"u"){var r=document.createElement("div");g.HI_DPI&&r.style.transform!==void 0&&(g.HAS_CSS_TRANSFORMS=!0),!k.isEdge&&typeof r.style.animationName<"u"&&(g.HAS_CSS_ANIMATION=!0),r=null}g.HAS_CSS_TRANSFORMS?g.translate=function(o,i,n){o.style.transform="translate("+Math.round(i)+"px, "+Math.round(n)+"px)"}:g.translate=function(o,i,n){o.style.top=Math.round(n)+"px",o.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(u,g,N){/* +* based on code from: +* +* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. +* Available via the MIT or new BSD license. +* see: http://github.com/jrburke/requirejs for details +*/var k=u("./dom");g.get=function(b,S){var l=new XMLHttpRequest;l.open("GET",b,!0),l.onreadystatechange=function(){l.readyState===4&&S(l.responseText)},l.send(null)},g.loadScript=function(b,S){var l=k.getDocumentHead(),h=document.createElement("script");h.src=b,l.appendChild(h),h.onload=h.onreadystatechange=function(s,r){(r||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,r||S())}},g.qualifyURL=function(b){var S=document.createElement("a");return S.href=b,S.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(u,g,N){g.inherits=function(k,b){k.super_=b,k.prototype=Object.create(b.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}})},g.mixin=function(k,b){for(var S in b)k[S]=b[S];return k},g.implement=function(k,b){g.mixin(k,b)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(u,g,N){var k={},b=function(){this.propagationStopped=!0},S=function(){this.defaultPrevented=!0};k._emit=k._dispatchEvent=function(l,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var s=this._eventRegistry[l]||[],r=this._defaultHandlers[l];if(!(!s.length&&!r)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=l),h.stopPropagation||(h.stopPropagation=b),h.preventDefault||(h.preventDefault=S),s=s.slice();for(var o=0;o1&&(d=a[a.length-2]);var R=h[n+"Path"];return R==null?R=h.basePath:c=="/"&&(n=c=""),R&&R.slice(-1)!="/"&&(R+="/"),R+n+c+d+this.get("suffix")},g.setModuleUrl=function(i,n){return h.$moduleUrls[i]=n};var s=function(i,n){if(i==="ace/theme/textmate"||i==="./theme/textmate")return n(null,u("./theme/textmate"));if(r)return r(i,n);console.error("loader is not configured")},r;g.setLoader=function(i){r=i},g.dynamicModules=Object.create(null),g.$loading={},g.$loaded={},g.loadModule=function(i,n){var a;if(Array.isArray(i))var c=i[0],d=i[1];else if(typeof i=="string")var d=i;var p=function(R){if(R&&!g.$loading[d])return n&&n(R);if(g.$loading[d]||(g.$loading[d]=[]),g.$loading[d].push(n),!(g.$loading[d].length>1)){var $=function(){s(d,function(y,m){m&&(g.$loaded[d]=m),g._emit("load.module",{name:d,module:m});var M=g.$loading[d];g.$loading[d]=null,M.forEach(function(O){O&&O(m)})})};if(!g.get("packaged"))return $();b.loadScript(g.moduleUrl(d,c),$),o()}};if(g.dynamicModules[d])g.dynamicModules[d]().then(function(R){R.default?p(R.default):p(R)});else{try{a=this.$require(d)}catch{}p(a||g.$loaded[d])}},g.$require=function(i){if(typeof N.require=="function"){var n="require";return N[n](i)}},g.setModuleLoader=function(i,n){g.dynamicModules[i]=n};var o=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),o=function(){})};g.version="1.35.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(u,g,N){u("./lib/fixoldbrowsers");var k=u("./config");k.setLoader(function(h,s){u([h],function(r){s(null,r)})});var b=function(){return this||typeof window<"u"&&window}();N.exports=function(h){k.init=S,k.$require=u,h.require=u},S(!0);function S(h){if(!(!b||!b.document)){k.set("packaged",h||u.packaged||N.packaged||b.define&&(void 0).packaged);var s={},r="",o=document.currentScript||document._currentScript,i=o&&o.ownerDocument||document;o&&o.src&&(r=o.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var n=i.getElementsByTagName("script"),a=0;a ["+this.end.row+"/"+this.end.column+"]"},b.prototype.contains=function(S,l){return this.compare(S,l)==0},b.prototype.compareRange=function(S){var l,h=S.end,s=S.start;return l=this.compare(h.row,h.column),l==1?(l=this.compare(s.row,s.column),l==1?2:l==0?1:0):l==-1?-2:(l=this.compare(s.row,s.column),l==-1?-1:l==1?42:0)},b.prototype.comparePoint=function(S){return this.compare(S.row,S.column)},b.prototype.containsRange=function(S){return this.comparePoint(S.start)==0&&this.comparePoint(S.end)==0},b.prototype.intersects=function(S){var l=this.compareRange(S);return l==-1||l==0||l==1},b.prototype.isEnd=function(S,l){return this.end.row==S&&this.end.column==l},b.prototype.isStart=function(S,l){return this.start.row==S&&this.start.column==l},b.prototype.setStart=function(S,l){typeof S=="object"?(this.start.column=S.column,this.start.row=S.row):(this.start.row=S,this.start.column=l)},b.prototype.setEnd=function(S,l){typeof S=="object"?(this.end.column=S.column,this.end.row=S.row):(this.end.row=S,this.end.column=l)},b.prototype.inside=function(S,l){return this.compare(S,l)==0?!(this.isEnd(S,l)||this.isStart(S,l)):!1},b.prototype.insideStart=function(S,l){return this.compare(S,l)==0?!this.isEnd(S,l):!1},b.prototype.insideEnd=function(S,l){return this.compare(S,l)==0?!this.isStart(S,l):!1},b.prototype.compare=function(S,l){return!this.isMultiLine()&&S===this.start.row?lthis.end.column?1:0:Sthis.end.row?1:this.start.row===S?l>=this.start.column?0:-1:this.end.row===S?l<=this.end.column?0:1:0},b.prototype.compareStart=function(S,l){return this.start.row==S&&this.start.column==l?-1:this.compare(S,l)},b.prototype.compareEnd=function(S,l){return this.end.row==S&&this.end.column==l?1:this.compare(S,l)},b.prototype.compareInside=function(S,l){return this.end.row==S&&this.end.column==l?1:this.start.row==S&&this.start.column==l?-1:this.compare(S,l)},b.prototype.clipRows=function(S,l){if(this.end.row>l)var h={row:l+1,column:0};else if(this.end.rowl)var s={row:l+1,column:0};else if(this.start.row1?(O++,O>4&&(O=1)):O=1,b.isIE){var _=Math.abs(v.clientX-L)>5||Math.abs(v.clientY-F)>5;(!E||_)&&(O=1),E&&clearTimeout(E),E=setTimeout(function(){E=null},$[O-1]||600),O==1&&(L=v.clientX,F=v.clientY)}if(v._clicks=O,y[m]("mousedown",v),O>4)O=0;else if(O>1)return y[m](A[O],v)}Array.isArray(R)||(R=[R]),R.forEach(function(v){i(v,"mousedown",w,M)})};function a(R){return 0|(R.ctrlKey?1:0)|(R.altKey?2:0)|(R.shiftKey?4:0)|(R.metaKey?8:0)}g.getModifierString=function(R){return k.KEY_MODS[a(R)]};function c(R,$,y){var m=a($);if(!y&&$.code&&(y=k.$codeToKeyCode[$.code]||y),!b.isMac&&S){if($.getModifierState&&($.getModifierState("OS")||$.getModifierState("Win"))&&(m|=8),S.altGr)if((3&m)!=3)S.altGr=0;else return;if(y===18||y===17){var M=$.location;if(y===17&&M===1)S[y]==1&&(l=$.timeStamp);else if(y===18&&m===3&&M===2){var O=$.timeStamp-l;O<50&&(S.altGr=!0)}}}if(y in k.MODIFIER_KEYS&&(y=-1),!(!m&&y===13&&$.location===3&&(R($,m,-y),$.defaultPrevented))){if(b.isChromeOS&&m&8){if(R($,m,y),$.defaultPrevented)return;m&=-9}return!m&&!(y in k.FUNCTION_KEYS)&&!(y in k.PRINTABLE_KEYS)?!1:R($,m,y)}}g.addCommandKeyListener=function(R,$,y){var m=null;i(R,"keydown",function(M){S[M.keyCode]=(S[M.keyCode]||0)+1;var O=c($,M,M.keyCode);return m=M.defaultPrevented,O},y),i(R,"keypress",function(M){m&&(M.ctrlKey||M.altKey||M.shiftKey||M.metaKey)&&(g.stopEvent(M),m=null)},y),i(R,"keyup",function(M){S[M.keyCode]=null},y),S||(d(),i(window,"focus",d))};function d(){S=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!b.isOldIE){var p=1;g.nextTick=function(R,$){$=$||window;var y="zero-timeout-message-"+p++,m=function(M){M.data==y&&(g.stopPropagation(M),n($,"message",m),R())};i($,"message",m),$.postMessage(y,"*")}}g.$idleBlocked=!1,g.onIdle=function(R,$){return setTimeout(function y(){g.$idleBlocked?setTimeout(y,100):R()},$)},g.$idleBlockId=null,g.blockIdle=function(R){g.$idleBlockId&&clearTimeout(g.$idleBlockId),g.$idleBlocked=!0,g.$idleBlockId=setTimeout(function(){g.$idleBlocked=!1},R||100)},g.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),g.nextFrame?g.nextFrame=g.nextFrame.bind(window):g.nextFrame=function(R){setTimeout(R,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(u,g,N){var k;N.exports={lineMode:!1,pasteCancelled:function(){return k&&k>Date.now()-50?!0:k=!1},cancel:function(){k=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(u,g,N){var k=u("../lib/event"),b=u("../config").nls,S=u("../lib/useragent"),l=u("../lib/dom"),h=u("../lib/lang"),s=u("../clipboard"),r=S.isChrome<18,o=S.isIE,i=S.isChrome>63,n=400,a=u("../lib/keys"),c=a.KEY_MODS,d=S.isIOS,p=d?/\s/:/\n/,R=S.isMobile,$;$=function(y,m){var M=l.createElement("textarea");M.className="ace_text-input",M.setAttribute("wrap","off"),M.setAttribute("autocorrect","off"),M.setAttribute("autocapitalize","off"),M.setAttribute("spellcheck","false"),M.style.opacity="0",y.insertBefore(M,y.firstChild);var O=!1,L=!1,F=!1,E=!1,A="";R||(M.style.fontSize="1px");var w=!1,v=!1,_="",T=0,W=0,P=0,z=Number.MAX_SAFE_INTEGER,G=Number.MIN_SAFE_INTEGER,Y=0;try{var J=document.activeElement===M}catch{}this.setNumberOfExtraLines=function(ne){if(z=Number.MAX_SAFE_INTEGER,G=Number.MIN_SAFE_INTEGER,ne<0){Y=0;return}Y=ne},this.setAriaOptions=function(ne){if(ne.activeDescendant?(M.setAttribute("aria-haspopup","true"),M.setAttribute("aria-autocomplete",ne.inline?"both":"list"),M.setAttribute("aria-activedescendant",ne.activeDescendant)):(M.setAttribute("aria-haspopup","false"),M.setAttribute("aria-autocomplete","both"),M.removeAttribute("aria-activedescendant")),ne.role&&M.setAttribute("role",ne.role),ne.setLabel){M.setAttribute("aria-roledescription",b("text-input.aria-roledescription","editor"));var fe="";if(m.$textInputAriaLabel&&(fe+="".concat(m.$textInputAriaLabel,", ")),m.session){var pe=m.session.selection.cursor.row;fe+=b("text-input.aria-label","Cursor at row $0",[pe+1])}M.setAttribute("aria-label",fe)}},this.setAriaOptions({role:"textbox"}),k.addListener(M,"blur",function(ne){v||(m.onBlur(ne),J=!1)},m),k.addListener(M,"focus",function(ne){if(!v){if(J=!0,S.isEdge)try{if(!document.hasFocus())return}catch{}m.onFocus(ne),S.isEdge?setTimeout(K):K()}},m),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:m.renderer.enableKeyboardAccessibility}),A||i||this.$focusScroll=="browser")return M.focus({preventScroll:!0});var ne=M.style.top;M.style.position="fixed",M.style.top="0px";try{var fe=M.getBoundingClientRect().top!=0}catch{return}var pe=[];if(fe)for(var Le=M.parentElement;Le&&Le.nodeType==1;)pe.push(Le),Le.setAttribute("ace_nocontext","true"),!Le.parentElement&&Le.getRootNode?Le=Le.getRootNode().host:Le=Le.parentElement;M.focus({preventScroll:!0}),fe&&pe.forEach(function(Oe){Oe.removeAttribute("ace_nocontext")}),setTimeout(function(){M.style.position="",M.style.top=="0px"&&(M.style.top=ne)},0)},this.blur=function(){M.blur()},this.isFocused=function(){return J},m.on("beforeEndOperation",function(){var ne=m.curOp,fe=ne&&ne.command&&ne.command.name;if(fe!="insertstring"){var pe=fe&&(ne.docChanged||ne.selectionChanged);F&&pe&&(_=M.value="",on()),K()}});var X=function(ne,fe){for(var pe=fe,Le=1;Le<=ne-z&&Le<2*Y+1;Le++)pe+=m.session.getLine(ne-Le).length+1;return pe},K=d?function(ne){if(!(!J||O&&!ne||E)){ne||(ne="");var fe=` + ab`+ne+`cde fg +`;fe!=M.value&&(M.value=_=fe);var pe=4,Le=4+(ne.length||(m.selection.isEmpty()?0:1));(T!=pe||W!=Le)&&M.setSelectionRange(pe,Le),T=pe,W=Le}}:function(){if(!(F||E)&&!(!J&&!ae)){F=!0;var ne=0,fe=0,pe="";if(m.session){var Le=m.selection,Oe=Le.getRange(),Ye=Le.cursor.row;Ye===G+1?(z=G+1,G=z+2*Y):Ye===z-1?(G=z-1,z=G-2*Y):(YeG+1)&&(z=Ye>Y?Ye-Y:0,G=Ye>Y?Ye+Y:2*Y);for(var Qe=[],Xe=z;Xe<=G;Xe++)Qe.push(m.session.getLine(Xe));if(pe=Qe.join(` +`),ne=X(Oe.start.row,Oe.start.column),fe=X(Oe.end.row,Oe.end.column),Oe.start.rowG){var De=m.session.getLine(G+1);fe=Oe.end.row>G+1?De.length:Oe.end.column,fe+=pe.length+1,pe=pe+` +`+De}else R&&Ye>0&&(pe=` +`+pe,fe+=1,ne+=1);pe.length>n&&(ne=_.length&&ne.value===_&&_&&ne.selectionEnd!==W},ee=function(ne){F||(O?O=!1:Z(M)?(m.selectAll(),K()):R&&M.selectionStart!=T&&K())},se=null;this.setInputHandler=function(ne){se=ne},this.getInputHandler=function(){return se};var ae=!1,le=function(ne,fe){if(ae&&(ae=!1),L)return K(),ne&&m.onPaste(ne),L=!1,"";for(var pe=M.selectionStart,Le=M.selectionEnd,Oe=T,Ye=_.length-W,Qe=ne,Xe=ne.length-pe,Ve=ne.length-Le,De=0;Oe>0&&_[De]==ne[De];)De++,Oe--;for(Qe=Qe.slice(De),De=1;Ye>0&&_.length-De>T-1&&_[_.length-De]==ne[ne.length-De];)De++,Ye--;Xe-=De-1,Ve-=De-1;var ht=Qe.length-De+1;if(ht<0&&(Oe=-ht,ht=0),Qe=Qe.slice(0,ht),!fe&&!Qe&&!Xe&&!Oe&&!Ye&&!Ve)return"";E=!0;var pn=!1;return S.isAndroid&&Qe==". "&&(Qe=" ",pn=!0),Qe&&!Oe&&!Ye&&!Xe&&!Ve||w?m.onTextInput(Qe):m.onTextInput(Qe,{extendLeft:Oe,extendRight:Ye,restoreStart:Xe,restoreEnd:Ve}),E=!1,_=ne,T=pe,W=Le,P=Ve,pn?` +`:Qe},he=function(ne){if(F)return pt();if(ne&&ne.inputType){if(ne.inputType=="historyUndo")return m.execCommand("undo");if(ne.inputType=="historyRedo")return m.execCommand("redo")}var fe=M.value,pe=le(fe,!0);(fe.length>n+100||p.test(pe)||R&&T<1&&T==W)&&K()},be=function(ne,fe,pe){var Le=ne.clipboardData||window.clipboardData;if(!(!Le||r)){var Oe=o||pe?"Text":"text/plain";try{return fe?Le.setData(Oe,fe)!==!1:Le.getData(Oe)}catch(Ye){if(!pe)return be(Ye,fe,!0)}}},Ie=function(ne,fe){var pe=m.getCopyText();if(!pe)return k.preventDefault(ne);be(ne,pe)?(d&&(K(pe),O=pe,setTimeout(function(){O=!1},10)),fe?m.onCut():m.onCopy(),k.preventDefault(ne)):(O=!0,M.value=pe,M.select(),setTimeout(function(){O=!1,K(),fe?m.onCut():m.onCopy()}))},dt=function(ne){Ie(ne,!0)},He=function(ne){Ie(ne,!1)},ze=function(ne){var fe=be(ne);s.pasteCancelled()||(typeof fe=="string"?(fe&&m.onPaste(fe,ne),S.isIE&&setTimeout(K),k.preventDefault(ne)):(M.value="",L=!0))};k.addCommandKeyListener(M,function(ne,fe,pe){if(!F)return m.onCommandKey(ne,fe,pe)},m),k.addListener(M,"select",ee,m),k.addListener(M,"input",he,m),k.addListener(M,"cut",dt,m),k.addListener(M,"copy",He,m),k.addListener(M,"paste",ze,m),(!("oncut"in M)||!("oncopy"in M)||!("onpaste"in M))&&k.addListener(y,"keydown",function(ne){if(!(S.isMac&&!ne.metaKey||!ne.ctrlKey))switch(ne.keyCode){case 67:He(ne);break;case 86:ze(ne);break;case 88:dt(ne);break}},m);var St=function(ne){if(!(F||!m.onCompositionStart||m.$readOnly)&&(F={},!w)){ne.data&&(F.useTextareaForIME=!1),setTimeout(pt,0),m._signal("compositionStart"),m.on("mousedown",_i);var fe=m.getSelectionRange();fe.end.row=fe.start.row,fe.end.column=fe.start.column,F.markerRange=fe,F.selectionStart=T,m.onCompositionStart(F),F.useTextareaForIME?(_=M.value="",T=0,W=0):(M.msGetInputContext&&(F.context=M.msGetInputContext()),M.getInputContext&&(F.context=M.getInputContext()))}},pt=function(){if(!(!F||!m.onCompositionUpdate||m.$readOnly)){if(w)return _i();if(F.useTextareaForIME)m.onCompositionUpdate(M.value);else{var ne=M.value;le(ne),F.markerRange&&(F.context&&(F.markerRange.start.column=F.selectionStart=F.context.compositionStartOffset),F.markerRange.end.column=F.markerRange.start.column+W-F.selectionStart+P)}}},on=function(ne){!m.onCompositionEnd||m.$readOnly||(F=!1,m.onCompositionEnd(),m.off("mousedown",_i),ne&&he())};function _i(){v=!0,M.blur(),M.focus(),v=!1}var Ln=h.delayedCall(pt,50).schedule.bind(null,null);function Rt(ne){ne.keyCode==27&&M.value.lengthW&&_[Ve]==` +`?De=a.end:XeW&&_.slice(0,Ve).split(` +`).length>2?De=a.down:Ve>W&&_[Ve-1]==" "?(De=a.right,ht=c.option):(Ve>W||Ve==W&&W!=T&&Xe==Ve)&&(De=a.right),Xe!==Ve&&(ht|=c.shift),De){var pn=fe.onCommandKey({},ht,De);if(!pn&&fe.commands){De=a.keyCodeToString(De);var Ji=fe.commands.findKeyCommand(ht,De);Ji&&fe.execCommand(Ji)}T=Xe,W=Ve,K("")}}};document.addEventListener("selectionchange",Ye),fe.on("destroy",function(){document.removeEventListener("selectionchange",Ye)})}this.destroy=function(){M.parentElement&&M.parentElement.removeChild(M)}},g.TextInput=$,g.$setUserAgentForTests=function(y,m){R=y,d=m}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(u,g,N){var k=u("../lib/useragent"),b=0,S=550,l=function(){function r(o){o.$clickSelection=null;var i=o.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(o)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(o)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(o)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(o)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(o));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(a){o[a]=this[a]},this),o.selectByLines=this.extendSelectionBy.bind(o,"getLineRange"),o.selectByWords=this.extendSelectionBy.bind(o,"getWordRange")}return r.prototype.onMouseDown=function(o){var i=o.inSelection(),n=o.getDocumentPosition();this.mousedownEvent=o;var a=this.editor,c=o.getButton();if(c!==0){var d=a.getSelectionRange(),p=d.isEmpty();(p||c==1)&&a.selection.moveToPosition(n),c==2&&(a.textInput.onContextMenu(o.domEvent),k.isMozilla||o.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!a.isFocused()&&(a.focus(),this.$focusTimeout&&!this.$clickSelection&&!a.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(o);return}return this.captureMouse(o),this.startSelect(n,o.domEvent._clicks>1),o.preventDefault()},r.prototype.startSelect=function(o,i){o=o||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(o):i||n.selection.moveToPosition(o),i||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},r.prototype.select=function(){var o,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var a=this.$clickSelection.comparePoint(n);if(a==-1)o=this.$clickSelection.end;else if(a==1)o=this.$clickSelection.start;else{var c=s(this.$clickSelection,n);n=c.cursor,o=c.anchor}i.selection.setSelectionAnchor(o.row,o.column)}i.selection.selectToPosition(n),i.renderer.scrollCursorIntoView()},r.prototype.extendSelectionBy=function(o){var i,n=this.editor,a=n.renderer.screenToTextCoordinates(this.x,this.y),c=n.selection[o](a.row,a.column);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(c.start),p=this.$clickSelection.comparePoint(c.end);if(d==-1&&p<=0)i=this.$clickSelection.end,(c.end.row!=a.row||c.end.column!=a.column)&&(a=c.start);else if(p==1&&d>=0)i=this.$clickSelection.start,(c.start.row!=a.row||c.start.column!=a.column)&&(a=c.end);else if(d==-1&&p==1)a=c.end,i=c.start;else{var R=s(this.$clickSelection,a);a=R.cursor,i=R.anchor}n.selection.setSelectionAnchor(i.row,i.column)}n.selection.selectToPosition(a),n.renderer.scrollCursorIntoView()},r.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},r.prototype.focusWait=function(){var o=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(o>b||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},r.prototype.onDoubleClick=function(o){var i=o.getDocumentPosition(),n=this.editor,a=n.session,c=a.getBracketRange(i);c?(c.isEmpty()&&(c.start.column--,c.end.column++),this.setState("select")):(c=n.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=c,this.select()},r.prototype.onTripleClick=function(o){var i=o.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var a=n.getSelectionRange();a.isMultiLine()&&a.contains(i.row,i.column)?(this.$clickSelection=n.selection.getLineRange(a.start.row),this.$clickSelection.end=n.selection.getLineRange(a.end.row).end):this.$clickSelection=n.selection.getLineRange(i.row),this.select()},r.prototype.onQuadClick=function(o){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},r.prototype.onMouseWheel=function(o){if(!o.getAccelKey()){o.getShiftKey()&&o.wheelY&&!o.wheelX&&(o.wheelX=o.wheelY,o.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,a=o.domEvent.timeStamp,c=a-n.t,d=c?o.wheelX/c:n.vx,p=c?o.wheelY/c:n.vy;c=1&&i.renderer.isScrollableBy(o.wheelX*o.speed,0)&&($=!0),R<=1&&i.renderer.isScrollableBy(0,o.wheelY*o.speed)&&($=!0),$)n.allowed=a;else if(a-n.allowedS.clientHeight;l||b.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(u,g,N){var k=this&&this.__extends||function(){var a=function(c,d){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(p,R){p.__proto__=R}||function(p,R){for(var $ in R)Object.prototype.hasOwnProperty.call(R,$)&&(p[$]=R[$])},a(c,d)};return function(c,d){if(typeof d!="function"&&d!==null)throw new TypeError("Class extends value "+String(d)+" is not a constructor or null");a(c,d);function p(){this.constructor=c}c.prototype=d===null?Object.create(d):(p.prototype=d.prototype,new p)}}(),b=this&&this.__values||function(a){var c=typeof Symbol=="function"&&Symbol.iterator,d=c&&a[c],p=0;if(d)return d.call(a);if(a&&typeof a.length=="number")return{next:function(){return a&&p>=a.length&&(a=void 0),{value:a&&a[p++],done:!a}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")},S=u("./lib/dom");u("./lib/event");var l=u("./range").Range,h=u("./lib/scroll").preventParentScroll,s="ace_tooltip",r=function(){function a(c){this.isOpen=!1,this.$element=null,this.$parentNode=c}return a.prototype.$init=function(){return this.$element=S.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},a.prototype.getElement=function(){return this.$element||this.$init()},a.prototype.setText=function(c){this.getElement().textContent=c},a.prototype.setHtml=function(c){this.getElement().innerHTML=c},a.prototype.setPosition=function(c,d){this.getElement().style.left=c+"px",this.getElement().style.top=d+"px"},a.prototype.setClassName=function(c){S.addCssClass(this.getElement(),c)},a.prototype.setTheme=function(c){this.$element.className=s+" "+(c.isDark?"ace_dark ":"")+(c.cssClass||"")},a.prototype.show=function(c,d,p){c!=null&&this.setText(c),d!=null&&p!=null&&this.setPosition(d,p),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},a.prototype.hide=function(c){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},a.prototype.getHeight=function(){return this.getElement().offsetHeight},a.prototype.getWidth=function(){return this.getElement().offsetWidth},a.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},a}(),o=function(){function a(){this.popups=[]}return a.prototype.addPopup=function(c){this.popups.push(c),this.updatePopups()},a.prototype.removePopup=function(c){var d=this.popups.indexOf(c);d!==-1&&(this.popups.splice(d,1),this.updatePopups())},a.prototype.updatePopups=function(){var c,d,p,R;this.popups.sort(function(A,w){return w.priority-A.priority});var $=[];try{for(var y=b(this.popups),m=y.next();!m.done;m=y.next()){var M=m.value,O=!0;try{for(var L=(p=void 0,b($)),F=L.next();!F.done;F=L.next()){var E=F.value;if(this.doPopupsOverlap(E,M)){O=!1;break}}}catch(A){p={error:A}}finally{try{F&&!F.done&&(R=L.return)&&R.call(L)}finally{if(p)throw p.error}}O?$.push(M):M.hide()}}catch(A){c={error:A}}finally{try{m&&!m.done&&(d=y.return)&&d.call(y)}finally{if(c)throw c.error}}},a.prototype.doPopupsOverlap=function(c,d){var p=c.getElement().getBoundingClientRect(),R=d.getElement().getBoundingClientRect();return p.leftR.left&&p.topR.top},a}(),i=new o;g.popupManager=i,g.Tooltip=r;var n=function(a){k(c,a);function c(d){d===void 0&&(d=document.body);var p=a.call(this,d)||this;p.timeout=void 0,p.lastT=0,p.idleTime=350,p.lastEvent=void 0,p.onMouseOut=p.onMouseOut.bind(p),p.onMouseMove=p.onMouseMove.bind(p),p.waitForHover=p.waitForHover.bind(p),p.hide=p.hide.bind(p);var R=p.getElement();return R.style.whiteSpace="pre-wrap",R.style.pointerEvents="auto",R.addEventListener("mouseout",p.onMouseOut),R.tabIndex=-1,R.addEventListener("blur",(function(){R.contains(document.activeElement)||this.hide()}).bind(p)),R.addEventListener("wheel",h),p}return c.prototype.addToEditor=function(d){d.on("mousemove",this.onMouseMove),d.on("mousedown",this.hide),d.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},c.prototype.removeFromEditor=function(d){d.off("mousemove",this.onMouseMove),d.off("mousedown",this.hide),d.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},c.prototype.onMouseMove=function(d,p){this.lastEvent=d,this.lastT=Date.now();var R=p.$mouseHandler.isMousePressed;if(this.isOpen){var $=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains($.row,$.column)||R||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||R||(this.lastEvent=d,this.timeout=setTimeout(this.waitForHover,this.idleTime))},c.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var d=Date.now()-this.lastT;if(this.idleTime-d>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-d);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},c.prototype.isOutsideOfText=function(d){var p=d.editor,R=d.getDocumentPosition(),$=p.session.getLine(R.row);if(R.column==$.length){var y=p.renderer.pixelToScreenCoordinates(d.clientX,d.clientY),m=p.session.documentToScreenPosition(R.row,R.column);if(m.column!=y.column||m.row!=y.row)return!0}return!1},c.prototype.setDataProvider=function(d){this.$gatherData=d},c.prototype.showForRange=function(d,p,R,$){var y=10;if(!($&&$!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var m=d.renderer;this.isOpen||(i.addPopup(this),this.$registerCloseEvents(),this.setTheme(m.theme)),this.isOpen=!0,this.addMarker(p,d.session),this.range=l.fromPoints(p.start,p.end);var M=m.textToScreenCoordinates(p.start.row,p.start.column),O=m.scroller.getBoundingClientRect();M.pageX=i.length&&(i=void 0),{value:i&&i[c++],done:!i}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},S=u("../lib/dom"),l=u("../lib/event"),h=u("../tooltip").Tooltip,s=u("../config").nls;u("../lib/lang");function r(i){var n=i.editor,a=n.renderer.$gutterLayer,c=new o(n);i.editor.setDefaultHandler("guttermousedown",function(m){if(!(!n.isFocused()||m.getButton()!=0)){var M=a.getRegion(m);if(M!="foldWidgets"){var O=m.getDocumentPosition().row,L=n.session.selection;if(m.getShiftKey())L.selectTo(O,0);else{if(m.domEvent.detail==2)return n.selectAll(),m.preventDefault();i.$clickSelection=n.selection.getLineRange(O)}return i.setState("selectByLines"),i.captureMouse(m),m.preventDefault()}}});var d,p;function R(){var m=p.getDocumentPosition().row,M=n.session.getLength();if(m==M){var O=n.renderer.pixelToScreenCoordinates(0,p.y).row,L=p.$pos;if(O>n.session.documentToScreenRow(L.row,L.column))return $()}if(c.showTooltip(m),!!c.isOpen)if(n.on("mousewheel",$),i.$tooltipFollowsMouse)y(p);else{var F=p.getGutterRow(),E=a.$lines.get(F);if(E){var A=E.element.querySelector(".ace_gutter_annotation"),w=A.getBoundingClientRect(),v=c.getElement().style;v.left=w.right+"px",v.top=w.bottom+"px"}else y(p)}}function $(){d&&(d=clearTimeout(d)),c.isOpen&&(c.hideTooltip(),n.off("mousewheel",$))}function y(m){c.setPosition(m.x,m.y)}i.editor.setDefaultHandler("guttermousemove",function(m){var M=m.domEvent.target||m.domEvent.srcElement;if(S.hasCssClass(M,"ace_fold-widget"))return $();c.isOpen&&i.$tooltipFollowsMouse&&y(m),p=m,!d&&(d=setTimeout(function(){d=null,p&&!i.isMousePressed?R():$()},50))}),l.addListener(n.renderer.$gutter,"mouseout",function(m){p=null,!(!c.isOpen||d)&&(d=setTimeout(function(){d=null,$()},50))},n),n.on("changeSession",$),n.on("input",$)}g.GutterHandler=r;var o=function(i){k(n,i);function n(a){var c=i.call(this,a.container)||this;return c.editor=a,c}return n.prototype.setPosition=function(a,c){var d=window.innerWidth||document.documentElement.clientWidth,p=window.innerHeight||document.documentElement.clientHeight,R=this.getWidth(),$=this.getHeight();a+=15,c+=15,a+R>d&&(a-=a+R-d),c+$>p&&(c-=20+$),h.prototype.setPosition.call(this,a,c)},Object.defineProperty(n,"annotationLabels",{get:function(){return{error:{singular:s("gutter-tooltip.aria-label.error.singular","error"),plural:s("gutter-tooltip.aria-label.error.plural","errors")},warning:{singular:s("gutter-tooltip.aria-label.warning.singular","warning"),plural:s("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:s("gutter-tooltip.aria-label.info.singular","information message"),plural:s("gutter-tooltip.aria-label.info.plural","information messages")}}},enumerable:!1,configurable:!0}),n.prototype.showTooltip=function(a){var c,d=this.editor.renderer.$gutterLayer,p=d.$annotations[a],R;p?R={displayText:Array.from(p.displayText),type:Array.from(p.type)}:R={displayText:[],type:[]};var $=d.session.getFoldLine(a);if($&&d.$showFoldedAnnotations){for(var y={error:[],warning:[],info:[]},m,M=a+1;M<=$.end.row;M++)if(d.$annotations[M])for(var O=0;Os?A=null:Z-A>=h&&(n.renderer.scrollCursorIntoView(),A=null)}}function _(X,K){var Z=Date.now(),ee=n.renderer.layerConfig.lineHeight,se=n.renderer.layerConfig.characterWidth,ae=n.renderer.scroller.getBoundingClientRect(),le={x:{left:R-ae.left,right:ae.right-R},y:{top:$-ae.top,bottom:ae.bottom-$}},he=Math.min(le.x.left,le.x.right),be=Math.min(le.y.top,le.y.bottom),Ie={row:X.row,column:X.column};he/se<=2&&(Ie.column+=le.x.left=l&&n.renderer.scrollCursorIntoView(Ie):E=Z:E=null}function T(){var X=M;M=n.renderer.screenToTextCoordinates(R,$),v(M,X),_(M,X)}function W(){m=n.selection.toOrientedRange(),p=n.session.addMarker(m,"ace_selection",n.getSelectionStyle()),n.clearSelection(),n.isFocused()&&n.renderer.$cursorLayer.setBlinking(!1),clearInterval(y),T(),y=setInterval(T,20),O=0,b.addListener(document,"mousemove",G)}function P(){clearInterval(y),n.session.removeMarker(p),p=null,n.selection.fromOrientedRange(m),n.isFocused()&&!F&&n.$resetCursorStyle(),m=null,M=null,O=0,E=null,A=null,b.removeListener(document,"mousemove",G)}var z=null;function G(){z==null&&(z=setTimeout(function(){z!=null&&p&&P()},20))}function Y(X){var K=X.types;return!K||Array.prototype.some.call(K,function(Z){return Z=="text/plain"||Z=="Text"})}function J(X){var K=["copy","copymove","all","uninitialized"],Z=["move","copymove","linkmove","all","uninitialized"],ee=S.isMac?X.altKey:X.ctrlKey,se="uninitialized";try{se=X.dataTransfer.effectAllowed.toLowerCase()}catch{}var ae="none";return ee&&K.indexOf(se)>=0?ae="copy":Z.indexOf(se)>=0?ae="move":K.indexOf(se)>=0&&(ae="copy"),ae}}(function(){this.dragWait=function(){var i=Date.now()-this.mousedownEvent.time;i>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var i=this.editor.container;i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(i){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor,n=i.container;n.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging");var a=S.isWin?"default":"move";i.renderer.setCursorStyle(a),this.setState("dragReady")},this.onMouseDrag=function(i){var n=this.editor.container;if(S.isIE&&this.state=="dragReady"){var a=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);a>3&&n.dragDrop()}if(this.state==="dragWait"){var a=o(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);a>0&&(n.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var n=this.editor,a=i.inSelection(),c=i.getButton(),d=i.domEvent.detail||1;if(d===1&&c===0&&a){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var p=i.domEvent.target||i.domEvent.srcElement;if("unselectable"in p&&(p.unselectable="on"),n.getDragDelay()){if(S.isWebKit){this.cancelDrag=!0;var R=n.container;R.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(r.prototype);function o(i,n,a,c){return Math.sqrt(Math.pow(a-i,2)+Math.pow(c-n,2))}g.DragdropHandler=r}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(u,g,N){var k=u("./mouse_event").MouseEvent,b=u("../lib/event"),S=u("../lib/dom");g.addTouchListeners=function(l,h){var s="scroll",r,o,i,n,a,c,d=0,p,R=0,$=0,y=0,m,M;function O(){var v=window.navigator&&window.navigator.clipboard,_=!1,T=function(){var z=h.getCopyText(),G=h.session.getUndoManager().hasUndo();M.replaceChild(S.buildDom(_?["span",!z&&W("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],z&&W("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],z&&W("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],v&&W("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],G&&W("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],W("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],W("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),M.firstChild)},W=function(z){return h.commands.canExecute(z,h)},P=function(z){var G=z.target.getAttribute("action");if(G=="more"||!_)return _=!_,T();G=="paste"?v.readText().then(function(Y){h.execCommand(G,Y)}):G&&((G=="cut"||G=="copy")&&(v?v.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(G)),M.firstChild.style.display="none",_=!1,G!="openCommandPalette"&&h.focus()};M=S.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(z){s="menu",z.stopPropagation(),z.preventDefault(),h.textInput.focus()},ontouchend:function(z){z.stopPropagation(),z.preventDefault(),P(z)},onclick:P},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function L(){if(!h.getOption("enableMobileMenu")){M&&F();return}M||O();var v=h.selection.cursor,_=h.renderer.textToScreenCoordinates(v.row,v.column),T=h.renderer.textToScreenCoordinates(0,0).pageX,W=h.renderer.scrollLeft,P=h.container.getBoundingClientRect();M.style.top=_.pageY-P.top-3+"px",_.pageX-P.left=2?h.selection.getLineRange(p.row):h.session.getBracketRange(p);v&&!v.isEmpty()?h.selection.setRange(v):h.selection.selectWord(),s="wait"}b.addListener(l,"contextmenu",function(v){if(m){var _=h.textInput.getElement();_.focus()}},h),b.addListener(l,"touchstart",function(v){var _=v.touches;if(a||_.length>1){clearTimeout(a),a=null,i=-1,s="zoom";return}m=h.$mouseHandler.isMousePressed=!0;var T=h.renderer.layerConfig.lineHeight,W=h.renderer.layerConfig.lineHeight,P=v.timeStamp;n=P;var z=_[0],G=z.clientX,Y=z.clientY;Math.abs(r-G)+Math.abs(o-Y)>T&&(i=-1),r=v.clientX=G,o=v.clientY=Y,$=y=0;var J=new k(v,h);if(p=J.getDocumentPosition(),P-i<500&&_.length==1&&!d)R++,v.preventDefault(),v.button=0,A();else{R=0;var X=h.selection.cursor,K=h.selection.isEmpty()?X:h.selection.anchor,Z=h.renderer.$cursorLayer.getPixelPosition(X,!0),ee=h.renderer.$cursorLayer.getPixelPosition(K,!0),se=h.renderer.scroller.getBoundingClientRect(),ae=h.renderer.layerConfig.offset,le=h.renderer.scrollLeft,he=function(dt,He){return dt=dt/W,He=He/T-.75,dt*dt+He*He};if(v.clientXIe?"cursor":"anchor"),Ie<3.5?s="anchor":be<3.5?s="cursor":s="scroll",a=setTimeout(E,450)}i=P},h),b.addListener(l,"touchend",function(v){m=h.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),s=="zoom"?(s="",d=0):a?(h.selection.moveToPosition(p),d=0,L()):s=="scroll"?(w(),F()):L(),clearTimeout(a),a=null},h),b.addListener(l,"touchmove",function(v){a&&(clearTimeout(a),a=null);var _=v.touches;if(!(_.length>1||s=="zoom")){var T=_[0],W=r-T.clientX,P=o-T.clientY;if(s=="wait")if(W*W+P*P>4)s="cursor";else return v.preventDefault();r=T.clientX,o=T.clientY,v.clientX=T.clientX,v.clientY=T.clientY;var z=v.timeStamp,G=z-n;if(n=z,s=="scroll"){var Y=new k(v,h);Y.speed=1,Y.wheelX=W,Y.wheelY=P,10*Math.abs(W)0)if(Ie==16){for(ze=He;ze-1){for(ze=He;ze=0&&ee[on]==m;on--)K[on]=k}}}function G(X,K,Z){if(!(b=X){for(ae=se+1;ae=X;)ae++;for(le=se,he=ae-1;le=K.length||(ae=Z[ee-1])!=c&&ae!=d||(le=K[ee+1])!=c&&le!=d?p:(S&&(le=d),le==ae?le:p);case O:return ae=ee>0?Z[ee-1]:R,ae==c&&ee+10&&Z[ee-1]==c)return c;if(S)return p;for(be=ee+1,he=K.length;be=1425&&Ie<=2303||Ie==64286;if(ae=K[be],dt&&(ae==a||ae==y))return a}return ee<1||(ae=K[ee-1])==R?p:Z[ee-1];case R:return S=!1,l=!0,k;case $:return h=!0,p;case E:case A:case v:case _:case w:S=!1;case T:return p}}function J(X){var K=X.charCodeAt(0),Z=K>>8;return Z==0?K>191?n:W[K]:Z==5?/[\u0591-\u05f4]/.test(X)?a:n:Z==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(X)?F:/[\u0660-\u0669\u066b-\u066c]/.test(X)?d:K==1642?L:/[\u06f0-\u06f9]/.test(X)?c:y:Z==32&&K<=8287?P[K&255]:Z==254&&K>=65136?y:p}g.L=n,g.R=a,g.EN=c,g.ON_R=3,g.AN=4,g.R_H=5,g.B=6,g.RLE=7,g.DOT="·",g.doBidiReorder=function(X,K,Z){if(X.length<2)return{};var ee=X.split(""),se=new Array(ee.length),ae=new Array(ee.length),le=[];k=Z?i:o,z(ee,le,ee.length,K);for(var he=0;hey&&K[he]0&&ee[he-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(ee[he])&&(le[he-1]=le[he]=g.R_H,he++);ee[ee.length-1]===g.DOT&&(le[ee.length-1]=g.B),ee[0]==="‫"&&(le[0]=g.RLE);for(var he=0;he=0&&(s=this.session.$docRowCache[o])}return s},h.prototype.getSplitIndex=function(){var s=0,r=this.session.$screenRowCache;if(r.length)for(var o,i=this.session.$getRowCacheIndex(r,this.currentRow);this.currentRow-s>0&&(o=this.session.$getRowCacheIndex(r,this.currentRow-s-1),o===i);)i=o,s++;else s=this.currentRow;return s},h.prototype.updateRowLine=function(s,r){s===void 0&&(s=this.getDocumentRow());var o=s===this.session.getLength()-1,i=o?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(s),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var n=this.session.$wrapData[s];n&&(r===void 0&&(r=this.getSplitIndex()),r>0&&n.length?(this.wrapIndent=n.indent,this.wrapOffset=this.wrapIndent*this.charWidths[k.L],this.line=rr?this.session.getOverwrite()?s:s-1:r,i=k.getVisualFromLogicalIdx(o,this.bidiMap),n=this.bidiMap.bidiLevels,a=0;!this.session.getOverwrite()&&s<=r&&n[i]%2!==0&&i++;for(var c=0;cr&&n[i]%2===0&&(a+=this.charWidths[n[i]]),this.wrapIndent&&(a+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(a+=this.rtlLineOffset),a},h.prototype.getSelections=function(s,r){var o=this.bidiMap,i=o.bidiLevels,n,a=[],c=0,d=Math.min(s,r)-this.wrapIndent,p=Math.max(s,r)-this.wrapIndent,R=!1,$=!1,y=0;this.wrapIndent&&(c+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var m,M=0;M=d&&mi+c/2;){if(i+=c,n===a.length-1){c=0;break}c=this.charWidths[a[++n]]}return n>0&&a[n-1]%2!==0&&a[n]%2===0?(o0&&a[n-1]%2===0&&a[n]%2!==0?r=1+(o>i?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===a.length-1&&c===0&&a[n-1]%2===0||!this.isRtlDir&&n===0&&a[n]%2!==0?r=1+this.bidiMap.logicalFromVisual[n]:(n>0&&a[n-1]%2!==0&&c!==0&&n--,r=this.bidiMap.logicalFromVisual[n]),r===0&&this.isRtlDir&&r++,r+this.wrapIndent},h}();g.BidiHandler=l}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(u,g,N){var k=u("./lib/oop"),b=u("./lib/lang"),S=u("./lib/event_emitter").EventEmitter,l=u("./range").Range,h=function(){function s(r){this.session=r,this.doc=r.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var o=this;this.cursor.on("change",function(i){o.$cursorChanged=!0,o.$silent||o._emit("changeCursor"),!o.$isEmpty&&!o.$silent&&o._emit("changeSelection"),!o.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(o.$desiredColumn=null)}),this.anchor.on("change",function(){o.$anchorChanged=!0,!o.$isEmpty&&!o.$silent&&o._emit("changeSelection")})}return s.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},s.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},s.prototype.getCursor=function(){return this.lead.getPosition()},s.prototype.setAnchor=function(r,o){this.$isEmpty=!1,this.anchor.setPosition(r,o)},s.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},s.prototype.getSelectionLead=function(){return this.lead.getPosition()},s.prototype.isBackwards=function(){var r=this.anchor,o=this.lead;return r.row>o.row||r.row==o.row&&r.column>o.column},s.prototype.getRange=function(){var r=this.anchor,o=this.lead;return this.$isEmpty?l.fromPoints(o,o):this.isBackwards()?l.fromPoints(o,r):l.fromPoints(r,o)},s.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},s.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},s.prototype.setRange=function(r,o){var i=o?r.end:r.start,n=o?r.start:r.end;this.$setSelection(i.row,i.column,n.row,n.column)},s.prototype.$setSelection=function(r,o,i,n){if(!this.$silent){var a=this.$isEmpty,c=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(r,o),this.cursor.setPosition(i,n),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||a!=this.$isEmpty||c)&&this._emit("changeSelection")}},s.prototype.$moveSelection=function(r){var o=this.lead;this.$isEmpty&&this.setSelectionAnchor(o.row,o.column),r.call(this)},s.prototype.selectTo=function(r,o){this.$moveSelection(function(){this.moveCursorTo(r,o)})},s.prototype.selectToPosition=function(r){this.$moveSelection(function(){this.moveCursorToPosition(r)})},s.prototype.moveTo=function(r,o){this.clearSelection(),this.moveCursorTo(r,o)},s.prototype.moveToPosition=function(r){this.clearSelection(),this.moveCursorToPosition(r)},s.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},s.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},s.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},s.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},s.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},s.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},s.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},s.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},s.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},s.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},s.prototype.getWordRange=function(r,o){if(typeof o>"u"){var i=r||this.lead;r=i.row,o=i.column}return this.session.getWordRange(r,o)},s.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},s.prototype.selectAWord=function(){var r=this.getCursor(),o=this.session.getAWordRange(r.row,r.column);this.setSelectionRange(o)},s.prototype.getLineRange=function(r,o){var i=typeof r=="number"?r:this.lead.row,n,a=this.session.getFoldLine(i);return a?(i=a.start.row,n=a.end.row):n=i,o===!0?new l(i,0,n,this.session.getLine(n).length):new l(i,0,n+1,0)},s.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},s.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},s.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},s.prototype.wouldMoveIntoSoftTab=function(r,o,i){var n=r.column,a=r.column+o;return i<0&&(n=r.column-o,a=r.column),this.session.isTabStop(r)&&this.doc.getLine(r.row).slice(n,a).split(" ").length-1==o},s.prototype.moveCursorLeft=function(){var r=this.lead.getPosition(),o;if(o=this.session.getFoldAt(r.row,r.column,-1))this.moveCursorTo(o.start.row,o.start.column);else if(r.column===0)r.row>0&&this.moveCursorTo(r.row-1,this.doc.getLine(r.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(r,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},s.prototype.moveCursorRight=function(){var r=this.lead.getPosition(),o;if(o=this.session.getFoldAt(r.row,r.column,1))this.moveCursorTo(o.end.row,o.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(o.column=n)}}this.moveCursorTo(o.row,o.column)},s.prototype.moveCursorFileEnd=function(){var r=this.doc.getLength()-1,o=this.doc.getLine(r).length;this.moveCursorTo(r,o)},s.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},s.prototype.moveCursorLongWordRight=function(){var r=this.lead.row,o=this.lead.column,i=this.doc.getLine(r),n=i.substring(o);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var a=this.session.getFoldAt(r,o,1);if(a){this.moveCursorTo(a.end.row,a.end.column);return}if(this.session.nonTokenRe.exec(n)&&(o+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(o)),o>=i.length){this.moveCursorTo(r,i.length),this.moveCursorRight(),r0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(a)&&(o-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(r,o)},s.prototype.$shortWordEndIndex=function(r){var o=0,i,n=/\s/,a=this.session.tokenRe;if(a.lastIndex=0,this.session.tokenRe.exec(r))o=this.session.tokenRe.lastIndex;else{for(;(i=r[o])&&n.test(i);)o++;if(o<1){for(a.lastIndex=0;(i=r[o])&&!a.test(i);)if(a.lastIndex=0,o++,n.test(i))if(o>2){o--;break}else{for(;(i=r[o])&&n.test(i);)o++;if(o>2)break}}}return a.lastIndex=0,o},s.prototype.moveCursorShortWordRight=function(){var r=this.lead.row,o=this.lead.column,i=this.doc.getLine(r),n=i.substring(o),a=this.session.getFoldAt(r,o,1);if(a)return this.moveCursorTo(a.end.row,a.end.column);if(o==i.length){var c=this.doc.getLength();do r++,n=this.doc.getLine(r);while(r0&&/^\s*$/.test(n));o=n.length,/\s+$/.test(n)||(n="")}var a=b.stringReverse(n),c=this.$shortWordEndIndex(a);return this.moveCursorTo(r,o-c)},s.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},s.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},s.prototype.moveCursorBy=function(r,o){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),n;if(o===0&&(r!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),r!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var a=this.session.lineWidgets[this.lead.row];r<0?r-=a.rowsAbove||0:r>0&&(r+=a.rowCount-(a.rowsAbove||0))}var c=this.session.screenToDocumentPosition(i.row+r,i.column,n);r!==0&&o===0&&c.row===this.lead.row&&(c.column,this.lead.column),this.moveCursorTo(c.row,c.column+o,o===0)},s.prototype.moveCursorToPosition=function(r){this.moveCursorTo(r.row,r.column)},s.prototype.moveCursorTo=function(r,o,i){var n=this.session.getFoldAt(r,o,1);n&&(r=n.start.row,o=n.start.column),this.$keepDesiredColumnOnChange=!0;var a=this.session.getLine(r);/[\uDC00-\uDFFF]/.test(a.charAt(o))&&a.charAt(o-1)&&(this.lead.row==r&&this.lead.column==o+1?o=o-1:o=o+1),this.lead.setPosition(r,o),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},s.prototype.moveCursorToScreen=function(r,o,i){var n=this.session.screenToDocumentPosition(r,o);this.moveCursorTo(n.row,n.column,i)},s.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},s.prototype.fromOrientedRange=function(r){this.setSelectionRange(r,r.cursor==r.start),this.$desiredColumn=r.desiredColumn||this.$desiredColumn},s.prototype.toOrientedRange=function(r){var o=this.getRange();return r?(r.start.column=o.start.column,r.start.row=o.start.row,r.end.column=o.end.column,r.end.row=o.end.row):r=o,r.cursor=this.isBackwards()?r.start:r.end,r.desiredColumn=this.$desiredColumn,r},s.prototype.getRangeOfMovements=function(r){var o=this.getCursor();try{r(this);var i=this.getCursor();return l.fromPoints(o,i)}catch{return l.fromPoints(o,o)}finally{this.moveCursorToPosition(o)}},s.prototype.toJSON=function(){if(this.rangeCount)var r=this.ranges.map(function(o){var i=o.clone();return i.isBackwards=o.cursor==o.start,i});else{var r=this.getRange();r.isBackwards=this.isBackwards()}return r},s.prototype.fromJSON=function(r){if(r.start==null)if(this.rangeList&&r.length>1){this.toSingleRange(r[0]);for(var o=r.length;o--;){var i=l.fromPoints(r[o].start,r[o].end);r[o].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else r=r[0];this.rangeList&&this.toSingleRange(r),this.setSelectionRange(r,r.isBackwards)},s.prototype.isEqual=function(r){if((r.length||this.rangeCount)&&r.length!=this.rangeCount)return!1;if(!r.length||!this.ranges)return this.getRange().isEqual(r);for(var o=this.ranges.length;o--;)if(!this.ranges[o].isEqual(r[o]))return!1;return!0},s}();h.prototype.setSelectionAnchor=h.prototype.setAnchor,h.prototype.getSelectionAnchor=h.prototype.getAnchor,h.prototype.setSelectionRange=h.prototype.setRange,k.implement(h.prototype,S),g.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(u,g,N){var k=u("./lib/report_error").reportError,b=2e3,S=function(){function l(h){this.splitRegex,this.states=h,this.regExps={},this.matchMappings={};for(var s in this.states){for(var r=this.states[s],o=[],i=0,n=this.matchMappings[s]={defaultToken:"text"},a="g",c=[],d=0;d1?p.onMatch=this.$applyToken:p.onMatch=p.token),$>1&&(/\\\d/.test(p.regex)?R=p.regex.replace(/\\([0-9]+)/g,function(y,m){return"\\"+(parseInt(m,10)+i+1)}):($=1,R=this.removeCapturingGroups(p.regex)),!p.splitRegex&&typeof p.token!="string"&&c.push(p)),n[i]=d,i+=$,o.push(R),p.onMatch||(p.onMatch=null)}}o.length||(n[0]=0,o.push("$")),c.forEach(function(y){y.splitRegex=this.createSplitterRegexp(y.regex,a)},this),this.regExps[s]=new RegExp("("+o.join(")|(")+")|($)",a)}}return l.prototype.$setMaxTokenCount=function(h){b=h|0},l.prototype.$applyToken=function(h){var s=this.splitRegex.exec(h).slice(1),r=this.token.apply(this,s);if(typeof r=="string")return[{type:r,value:h}];for(var o=[],i=0,n=r.length;ip){var L=h.substring(p,O-M.length);$.type==y?$.value+=L:($.type&&d.push($),$={type:y,value:L})}for(var F=0;Fb){for(R>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:s,line:h});p1&&r[0]!==o&&r.unshift("#tmp",o),{tokens:d,state:r.length?r:o}},l}();S.prototype.reportError=k,g.Tokenizer=S}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(u,g,N){var k=u("../lib/deep_copy").deepCopy,b;b=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(h,s){if(!s){for(var r in h)this.$rules[r]=h[r];return}for(var r in h){for(var o=h[r],i=0;i=this.$rowTokens.length;){if(this.$row+=1,l||(l=this.$session.getLength()),this.$row>=l)return this.$row=l-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},S.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},S.prototype.getCurrentTokenRow=function(){return this.$row},S.prototype.getCurrentTokenColumn=function(){var l=this.$rowTokens,h=this.$tokenIndex,s=l[h].start;if(s!==void 0)return s;for(s=0;h>0;)h-=1,s+=l[h].value.length;return s},S.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},S.prototype.getCurrentTokenRange=function(){var l=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new k(this.$row,h,this.$row,h+l.value.length)},S}();g.TokenIterator=b}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(u,g,N){var k=u("../../lib/oop"),b=u("../behaviour").Behaviour,S=u("../../token_iterator").TokenIterator,l=u("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],s=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],r,o={},i={'"':'"',"'":"'"},n=function(d){var p=-1;if(d.multiSelect&&(p=d.selection.index,o.rangeCount!=d.multiSelect.rangeCount&&(o={rangeCount:d.multiSelect.rangeCount})),o[p])return r=o[p];r=o[p]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},a=function(d,p,R,$){var y=d.end.row-d.start.row;return{text:R+p+$,selection:[0,d.start.column+1,y,d.end.column+(y?0:1)]}},c;c=function(d){d=d||{},this.add("braces","insertion",function(p,R,$,y,m){var M=$.getCursorPosition(),O=y.doc.getLine(M.row);if(m=="{"){n($);var L=$.getSelectionRange(),F=y.doc.getTextRange(L),E=y.getTokenAt(M.row,M.column);if(F!==""&&F!=="{"&&$.getWrapBehavioursEnabled())return a(L,F,"{","}");if(E&&/(?:string)\.quasi|\.xml/.test(E.type)){var A=[/tag\-(?:open|name)/,/attribute\-name/];return A.some(function(z){return z.test(E.type)})||/(string)\.quasi/.test(E.type)&&E.value[M.column-E.start-1]!=="$"?void 0:(c.recordAutoInsert($,y,"}"),{text:"{}",selection:[1,1]})}else if(c.isSaneInsertion($,y))return/[\]\}\)]/.test(O[M.column])||$.inMultiSelectMode||d.braces?(c.recordAutoInsert($,y,"}"),{text:"{}",selection:[1,1]}):(c.recordMaybeInsert($,y,"{"),{text:"{",selection:[1,1]})}else if(m=="}"){n($);var w=O.substring(M.column,M.column+1);if(w=="}"){var v=y.$findOpeningBracket("}",{column:M.column+1,row:M.row});if(v!==null&&c.isAutoInsertedClosing(M,O,m))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(m==` +`||m==`\r +`){n($);var _="";c.isMaybeInsertedClosing(M,O)&&(_=l.stringRepeat("}",r.maybeInsertedBrackets),c.clearMaybeInsertedClosing());var w=O.substring(M.column,M.column+1);if(w==="}"){var T=y.findMatchingBracket({row:M.row,column:M.column+1},"}");if(!T)return null;var W=this.$getIndent(y.getLine(T.row))}else if(_)var W=this.$getIndent(O);else{c.clearMaybeInsertedClosing();return}var P=W+y.getTabString();return{text:` +`+P+` +`+W+_,selection:[1,P.length,1,P.length]}}else c.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(p,R,$,y,m){var M=y.doc.getTextRange(m);if(!m.isMultiLine()&&M=="{"){n($);var O=y.doc.getLine(m.start.row),L=O.substring(m.end.column,m.end.column+1);if(L=="}")return m.end.column++,m;r.maybeInsertedBrackets--}}),this.add("parens","insertion",function(p,R,$,y,m){if(m=="("){n($);var M=$.getSelectionRange(),O=y.doc.getTextRange(M);if(O!==""&&$.getWrapBehavioursEnabled())return a(M,O,"(",")");if(c.isSaneInsertion($,y))return c.recordAutoInsert($,y,")"),{text:"()",selection:[1,1]}}else if(m==")"){n($);var L=$.getCursorPosition(),F=y.doc.getLine(L.row),E=F.substring(L.column,L.column+1);if(E==")"){var A=y.$findOpeningBracket(")",{column:L.column+1,row:L.row});if(A!==null&&c.isAutoInsertedClosing(L,F,m))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(p,R,$,y,m){var M=y.doc.getTextRange(m);if(!m.isMultiLine()&&M=="("){n($);var O=y.doc.getLine(m.start.row),L=O.substring(m.start.column+1,m.start.column+2);if(L==")")return m.end.column++,m}}),this.add("brackets","insertion",function(p,R,$,y,m){if(m=="["){n($);var M=$.getSelectionRange(),O=y.doc.getTextRange(M);if(O!==""&&$.getWrapBehavioursEnabled())return a(M,O,"[","]");if(c.isSaneInsertion($,y))return c.recordAutoInsert($,y,"]"),{text:"[]",selection:[1,1]}}else if(m=="]"){n($);var L=$.getCursorPosition(),F=y.doc.getLine(L.row),E=F.substring(L.column,L.column+1);if(E=="]"){var A=y.$findOpeningBracket("]",{column:L.column+1,row:L.row});if(A!==null&&c.isAutoInsertedClosing(L,F,m))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(p,R,$,y,m){var M=y.doc.getTextRange(m);if(!m.isMultiLine()&&M=="["){n($);var O=y.doc.getLine(m.start.row),L=O.substring(m.start.column+1,m.start.column+2);if(L=="]")return m.end.column++,m}}),this.add("string_dquotes","insertion",function(p,R,$,y,m){var M=y.$mode.$quotes||i;if(m.length==1&&M[m]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(m)!=-1)return;n($);var O=m,L=$.getSelectionRange(),F=y.doc.getTextRange(L);if(F!==""&&(F.length!=1||!M[F])&&$.getWrapBehavioursEnabled())return a(L,F,O,O);if(!F){var E=$.getCursorPosition(),A=y.doc.getLine(E.row),w=A.substring(E.column-1,E.column),v=A.substring(E.column,E.column+1),_=y.getTokenAt(E.row,E.column),T=y.getTokenAt(E.row,E.column+1);if(w=="\\"&&_&&/escape/.test(_.type))return null;var W=_&&/string|escape/.test(_.type),P=!T||/string|escape/.test(T.type),z;if(v==O)z=W!==P,z&&/string\.end/.test(T.type)&&(z=!1);else{if(W&&!P||W&&P)return null;var G=y.$mode.tokenRe;G.lastIndex=0;var Y=G.test(w);G.lastIndex=0;var J=G.test(v),X=y.$mode.$pairQuotesAfter,K=X&&X[O]&&X[O].test(w);if(!K&&Y||J||v&&!/[\s;,.})\]\\]/.test(v))return null;var Z=A[E.column-2];if(w==O&&(Z==O||G.test(Z)))return null;z=!0}return{text:z?O+O:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(p,R,$,y,m){var M=y.$mode.$quotes||i,O=y.doc.getTextRange(m);if(!m.isMultiLine()&&M.hasOwnProperty(O)){n($);var L=y.doc.getLine(m.start.row),F=L.substring(m.start.column+1,m.start.column+2);if(F==O)return m.end.column++,m}}),d.closeDocComment!==!1&&this.add("doc comment end","insertion",function(p,R,$,y,m){if(p==="doc-start"&&(m===` +`||m===`\r +`)&&$.selection.isEmpty()){var M=$.getCursorPosition();if(M.column===0)return;for(var O=y.doc.getLine(M.row),L=y.doc.getLine(M.row+1),F=y.getTokens(M.row),E=0,A=0;A=M.column){if(E===M.column){if(!/\.doc/.test(w.type))return;if(/\*\//.test(w.value)){var v=F[A+1];if(!v||!/\.doc/.test(v.type))return}}var _=M.column-(E-w.value.length),T=w.value.indexOf("*/"),W=w.value.indexOf("/**",T>-1?T+2:0);if(W!==-1&&_>W&&_=T&&_<=W||!/\.doc/.test(w.type))return;break}}var P=this.$getIndent(O);if(/\s*\*/.test(L))return/^\s*\*/.test(O)?{text:m+P+"* ",selection:[1,2+P.length,1,2+P.length]}:{text:m+P+" * ",selection:[1,3+P.length,1,3+P.length]};if(/\/\*\*/.test(O.substring(0,M.column)))return{text:m+P+" * "+m+" "+P+"*/",selection:[1,4+P.length,1,4+P.length]}}})},c.isSaneInsertion=function(d,p){var R=d.getCursorPosition(),$=new S(p,R.row,R.column);if(!this.$matchTokenType($.getCurrentToken()||"text",h)){if(/[)}\]]/.test(d.session.getLine(R.row)[R.column]))return!0;var y=new S(p,R.row,R.column+1);if(!this.$matchTokenType(y.getCurrentToken()||"text",h))return!1}return $.stepForward(),$.getCurrentTokenRow()!==R.row||this.$matchTokenType($.getCurrentToken()||"text",s)},c.$matchTokenType=function(d,p){return p.indexOf(d.type||d)>-1},c.recordAutoInsert=function(d,p,R){var $=d.getCursorPosition(),y=p.doc.getLine($.row);this.isAutoInsertedClosing($,y,r.autoInsertedLineEnd[0])||(r.autoInsertedBrackets=0),r.autoInsertedRow=$.row,r.autoInsertedLineEnd=R+y.substr($.column),r.autoInsertedBrackets++},c.recordMaybeInsert=function(d,p,R){var $=d.getCursorPosition(),y=p.doc.getLine($.row);this.isMaybeInsertedClosing($,y)||(r.maybeInsertedBrackets=0),r.maybeInsertedRow=$.row,r.maybeInsertedLineStart=y.substr(0,$.column)+R,r.maybeInsertedLineEnd=y.substr($.column),r.maybeInsertedBrackets++},c.isAutoInsertedClosing=function(d,p,R){return r.autoInsertedBrackets>0&&d.row===r.autoInsertedRow&&R===r.autoInsertedLineEnd[0]&&p.substr(d.column)===r.autoInsertedLineEnd},c.isMaybeInsertedClosing=function(d,p){return r.maybeInsertedBrackets>0&&d.row===r.maybeInsertedRow&&p.substr(d.column)===r.maybeInsertedLineEnd&&p.substr(0,d.column)==r.maybeInsertedLineStart},c.popAutoInsertedClosing=function(){r.autoInsertedLineEnd=r.autoInsertedLineEnd.substr(1),r.autoInsertedBrackets--},c.clearMaybeInsertedClosing=function(){r&&(r.maybeInsertedBrackets=0,r.maybeInsertedRow=-1)},k.inherits(c,b),g.CstyleBehaviour=c}),ace.define("ace/unicode",["require","exports","module"],function(u,g,N){for(var k=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],b=0,S=[],l=0;l2?Z%m!=m-1:Z%m==0}}else{if(!this.blockComment)return!1;var O=this.blockComment.start,L=this.blockComment.end,F=new RegExp("^(\\s*)(?:"+s.escapeRegExp(O)+")"),E=new RegExp("(?:"+s.escapeRegExp(L)+")\\s*$"),A=function(z,G){v(z,G)||(!R||/\S/.test(z))&&(p.insertInLine({row:G,column:z.length},L),p.insertInLine({row:G,column:y},O))},w=function(z,G){var Y;(Y=z.match(E))&&p.removeInLine(G,z.length-Y[0].length,z.length),(Y=z.match(F))&&p.removeInLine(G,Y[1].length,Y[0].length)},v=function(z,G){if(F.test(z))return!0;for(var Y=a.getTokens(G),J=0;Jz.length&&(P=z.length)}),y==1/0&&(y=P,R=!1,$=!1),M&&y%m!=0&&(y=Math.floor(y/m)*m),W($?w:A)},this.toggleBlockComment=function(n,a,c,d){var p=this.blockComment;if(p){!p.start&&p[0]&&(p=p[0]);var R=new r(a,d.row,d.column),$=R.getCurrentToken();a.selection;var y=a.selection.toOrientedRange(),m,M;if($&&/comment/.test($.type)){for(var O,L;$&&/comment/.test($.type);){var F=$.value.indexOf(p.start);if(F!=-1){var E=R.getCurrentTokenRow(),A=R.getCurrentTokenColumn()+F;O=new o(E,A,E,A+p.start.length);break}$=R.stepBackward()}for(var R=new r(a,d.row,d.column),$=R.getCurrentToken();$&&/comment/.test($.type);){var F=$.value.indexOf(p.end);if(F!=-1){var E=R.getCurrentTokenRow(),A=R.getCurrentTokenColumn()+F;L=new o(E,A,E,A+p.end.length);break}$=R.stepForward()}L&&a.remove(L),O&&(a.remove(O),m=O.start.row,M=-p.start.length)}else M=p.start.length,m=c.start.row,a.insert(c.end,p.end),a.insert(c.start,p.start);y.start.row==m&&(y.start.column+=M),y.end.row==m&&(y.end.column+=M),a.selection.fromOrientedRange(y)}},this.getNextLineIndent=function(n,a,c){return this.$getIndent(a)},this.checkOutdent=function(n,a,c){return!1},this.autoOutdent=function(n,a,c){},this.$getIndent=function(n){return n.match(/^\s*/)[0]},this.createWorker=function(n){return null},this.createModeDelegates=function(n){this.$embeds=[],this.$modes={};for(var a in n)if(n[a]){var c=n[a],d=c.prototype.$id,p=k.$modes[d];p||(k.$modes[d]=p=new c),k.$modes[a]||(k.$modes[a]=p),this.$embeds.push(a),this.$modes[a]=p}for(var R=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],$=function(m){(function(M){var O=R[m],L=M[O];M[R[m]]=function(){return this.$delegator(O,arguments,L)}})(y)},y=this,a=0;athis.row)){var o=h(r,{row:this.row,column:this.column},this.$insertRight);this.setPosition(o.row,o.column,!0)}},s.prototype.setPosition=function(r,o,i){var n;if(i?n={row:r,column:o}:n=this.$clipPositionToDocument(r,o),!(this.row==n.row&&this.column==n.column)){var a={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:a,value:n})}},s.prototype.detach=function(){this.document.off("change",this.$onChange)},s.prototype.attach=function(r){this.document=r||this.document,this.document.on("change",this.$onChange)},s.prototype.$clipPositionToDocument=function(r,o){var i={};return r>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):r<0?(i.row=0,i.column=0):(i.row=r,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,o))),o<0&&(i.column=0),i},s}();S.prototype.$insertRight=!1,k.implement(S.prototype,b);function l(s,r,o){var i=o?s.column<=r.column:s.column=n&&(o=n-1,i=void 0);var a=this.getLine(o);return i==null&&(i=a.length),i=Math.min(Math.max(i,0),a.length),{row:o,column:i}},r.prototype.clonePos=function(o){return{row:o.row,column:o.column}},r.prototype.pos=function(o,i){return{row:o,column:i}},r.prototype.$clipPosition=function(o){var i=this.getLength();return o.row>=i?(o.row=Math.max(0,i-1),o.column=this.getLine(i-1).length):(o.row=Math.max(0,o.row),o.column=Math.min(Math.max(o.column,0),this.getLine(o.row).length)),o},r.prototype.insertFullLines=function(o,i){o=Math.min(Math.max(o,0),this.getLength());var n=0;o0,a=i=0&&this.applyDelta({start:this.pos(o,this.getLine(o).length),end:this.pos(o+1,0),action:"remove",lines:["",""]})},r.prototype.replace=function(o,i){if(o instanceof l||(o=l.fromPoints(o.start,o.end)),i.length===0&&o.isEmpty())return o.start;if(i==this.getTextRange(o))return o.end;this.remove(o);var n;return i?n=this.insert(o.start,i):n=o.start,n},r.prototype.applyDeltas=function(o){for(var i=0;i=0;i--)this.revertDelta(o[i])},r.prototype.applyDelta=function(o,i){var n=o.action=="insert";(n?o.lines.length<=1&&!o.lines[0]:!l.comparePoints(o.start,o.end))||(n&&o.lines.length>2e4?this.$splitAndapplyLargeDelta(o,2e4):(b(this.$lines,o,i),this._signal("change",o)))},r.prototype.$safeApplyDelta=function(o){var i=this.$lines.length;(o.action=="remove"&&o.start.row20){r.running=setTimeout(r.$worker,20);break}}r.currentLine=i,n==-1&&(n=i),c<=n&&r.fireUpdateEvent(c,n)}}}return l.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},l.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},l.prototype.fireUpdateEvent=function(h,s){var r={first:h,last:s};this._signal("update",{data:r})},l.prototype.start=function(h){this.currentLine=Math.min(h||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},l.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},l.prototype.$updateOnChange=function(h){var s=h.start.row,r=h.end.row-s;if(r===0)this.lines[s]=null;else if(h.action=="remove")this.lines.splice(s,r+1,null),this.states.splice(s,r+1,null);else{var o=Array(r+1);o.unshift(s,1),this.lines.splice.apply(this.lines,o),this.states.splice.apply(this.states,o)}this.currentLine=Math.min(s,this.currentLine,this.doc.getLength()),this.stop()},l.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},l.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},l.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},l.prototype.$tokenizeRow=function(h){var s=this.doc.getLine(h),r=this.states[h-1],o=this.tokenizer.getLineTokens(s,r,h);return this.states[h]+""!=o.state+""?(this.states[h]=o.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=o.tokens},l.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},l}();k.implement(S.prototype,b),g.BackgroundTokenizer=S}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(u,g,N){var k=u("./lib/lang"),b=u("./range").Range,S=function(){function l(h,s,r){r===void 0&&(r="text"),this.setRegexp(h),this.clazz=s,this.type=r}return l.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},l.prototype.update=function(h,s,r,o){if(this.regExp)for(var i=o.firstRow,n=o.lastRow,a={},c=i;c<=n;c++){var d=this.cache[c];d==null&&(d=k.getMatchOffsets(r.getLine(c),this.regExp),d.length>this.MAX_RANGES&&(d=d.slice(0,this.MAX_RANGES)),d=d.map(function(y){return new b(c,y.offset,c,y.offset+y.length)}),this.cache[c]=d.length?d:"");for(var p=d.length;p--;){var R=d[p].toScreenRange(r),$=R.toString();a[$]||(a[$]=!0,s.drawSingleLineMarker(h,R,this.clazz,o))}}},l}();S.prototype.MAX_RANGES=500,g.SearchHighlight=S}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(u,g,N){var k=function(){function y(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return y.prototype.addSession=function(m){this.$session=m},y.prototype.add=function(m,M,O){if(!this.$fromUndo&&m!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),M===!1||!this.lastDeltas){this.lastDeltas=[];var L=this.$undoStack.length;L>this.$undoDepth-1&&this.$undoStack.splice(0,L-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),m.id=this.$rev=++this.$maxRev}(m.action=="remove"||m.action=="insert")&&(this.$lastDelta=m),this.lastDeltas.push(m)}},y.prototype.addSelection=function(m,M){this.selections.push({value:m,rev:M||this.$rev})},y.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},y.prototype.markIgnored=function(m,M){M==null&&(M=this.$rev+1);for(var O=this.$undoStack,L=O.length;L--;){var F=O[L][0];if(F.id<=m)break;F.id0},y.prototype.canRedo=function(){return this.$redoStack.length>0},y.prototype.bookmark=function(m){m==null&&(m=this.$rev),this.mark=m},y.prototype.isAtBookmark=function(){return this.$rev===this.mark},y.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},y.prototype.fromJSON=function(m){this.reset(),this.$undoStack=m.$undoStack,this.$redoStack=m.$redoStack},y.prototype.$prettyPrint=function(m){return m?r(m):r(this.$undoStack)+` +--- +`+r(this.$redoStack)},y}();k.prototype.hasUndo=k.prototype.canUndo,k.prototype.hasRedo=k.prototype.canRedo,k.prototype.isClean=k.prototype.isAtBookmark,k.prototype.markClean=k.prototype.bookmark;function b(y,m){for(var M=m;M--;){var O=y[M];if(O&&!O[0].ignore){for(;M"+y.end.row+":"+y.end.column}function i(y,m){var M=y.action=="insert",O=m.action=="insert";if(M&&O)if(l(m.start,y.end)>=0)c(m,y,-1);else if(l(m.start,y.start)<=0)c(y,m,1);else return null;else if(M&&!O)if(l(m.start,y.end)>=0)c(m,y,-1);else if(l(m.end,y.start)<=0)c(y,m,-1);else return null;else if(!M&&O)if(l(m.start,y.start)>=0)c(m,y,1);else if(l(m.start,y.start)<=0)c(y,m,1);else return null;else if(!M&&!O)if(l(m.start,y.start)>=0)c(m,y,1);else if(l(m.end,y.start)<=0)c(y,m,-1);else return null;return[m,y]}function n(y,m){for(var M=y.length;M--;)for(var O=0;O=0?c(y,m,-1):(l(y.start,m.start)<=0||c(y,S.fromPoints(m.start,y.start),-1),c(m,y,1));else if(!M&&O)l(m.start,y.end)>=0?c(m,y,-1):(l(m.start,y.start)<=0||c(m,S.fromPoints(y.start,m.start),-1),c(y,m,1));else if(!M&&!O)if(l(m.start,y.end)>=0)c(m,y,-1);else if(l(m.end,y.start)<=0)c(y,m,-1);else{var L,F;return l(y.start,m.start)<0&&(L=y,y=p(y,m.start)),l(y.end,m.end)>0&&(F=p(y,m.end)),d(m.end,y.start,y.end,-1),F&&!L&&(y.lines=F.lines,y.start=F.start,y.end=F.end,F=y),[m,L,F].filter(Boolean)}return[m,y]}function c(y,m,M){d(y.start,m.start,m.end,M),d(y.end,m.start,m.end,M)}function d(y,m,M,O){y.row==(O==1?m:M).row&&(y.column+=O*(M.column-m.column)),y.row+=O*(M.row-m.row)}function p(y,m){var M=y.lines,O=y.end;y.end=h(m);var L=y.end.row-y.start.row,F=M.splice(L,M.length),E=L?m.column:m.column-y.start.column;M.push(F[0].substring(0,E)),F[0]=F[0].substr(E);var A={start:h(m),end:O,lines:F,action:y.action};return A}function R(y,m){m=s(m);for(var M=y.length;M--;){for(var O=y[M],L=0;Lthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(l),this.folds.sort(function(h,s){return-h.range.compareEnd(s.start.row,s.start.column)}),this.range.compareEnd(l.start.row,l.start.column)>0?(this.end.row=l.end.row,this.end.column=l.end.column):this.range.compareStart(l.end.row,l.end.column)<0&&(this.start.row=l.start.row,this.start.column=l.start.column)}else if(l.start.row==this.end.row)this.folds.push(l),this.end.row=l.end.row,this.end.column=l.end.column;else if(l.end.row==this.start.row)this.folds.unshift(l),this.start.row=l.start.row,this.start.column=l.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");l.foldLine=this},S.prototype.containsRow=function(l){return l>=this.start.row&&l<=this.end.row},S.prototype.walk=function(l,h,s){var r=0,o=this.folds,i,n,a,c=!0;h==null&&(h=this.end.row,s=this.end.column);for(var d=0;d0)){var c=b(h,n.start);return a===0?s&&c!==0?-i-2:i:c>0||c===0&&!s?i:-i-1}}return-i-1},l.prototype.add=function(h){var s=!h.isEmpty(),r=this.pointIndex(h.start,s);r<0&&(r=-r-1);var o=this.pointIndex(h.end,s,r);return o<0?o=-o-1:o++,this.ranges.splice(r,o-r,h)},l.prototype.addList=function(h){for(var s=[],r=h.length;r--;)s.push.apply(s,this.add(h[r]));return s},l.prototype.substractPoint=function(h){var s=this.pointIndex(h);if(s>=0)return this.ranges.splice(s,1)},l.prototype.merge=function(){var h=[],s=this.ranges;s=s.sort(function(a,c){return b(a.start,c.start)});for(var r=s[0],o,i=1;i=0},l.prototype.containsPoint=function(h){return this.pointIndex(h)>=0},l.prototype.rangeAtPoint=function(h){var s=this.pointIndex(h);if(s>=0)return this.ranges[s]},l.prototype.clipRows=function(h,s){var r=this.ranges;if(r[0].start.row>s||r[r.length-1].start.row=o)break}if(h.action=="insert")for(var p=i-o,R=-s.column+r.column;ao)break;if(d.start.row==o&&d.start.column>=s.column&&(d.start.column==s.column&&this.$bias<=0||(d.start.column+=R,d.start.row+=p)),d.end.row==o&&d.end.column>=s.column){if(d.end.column==s.column&&this.$bias<0)continue;d.end.column==s.column&&R>0&&ad.start.column&&d.end.column==n[a+1].start.column&&(d.end.column-=R),d.end.column+=R,d.end.row+=p}}else for(var p=o-i,R=s.column-r.column;ai)break;d.end.rows.column)&&(d.end.column=s.column,d.end.row=s.row):(d.end.column+=R,d.end.row+=p):d.end.row>i&&(d.end.row+=p),d.start.rows.column)&&(d.start.column=s.column,d.start.row=s.row):(d.start.column+=R,d.start.row+=p):d.start.row>i&&(d.start.row+=p)}if(p!=0&&a=r)return a;if(a.end.row>r)return null}return null},this.getNextFoldLine=function(r,o){var i=this.$foldData,n=0;for(o&&(n=i.indexOf(o)),n==-1&&(n=0),n;n=r)return a}return null},this.getFoldedRowCount=function(r,o){for(var i=this.$foldData,n=o-r+1,a=0;a=o){p=r?n-=o-p:n=0);break}else d>=r&&(p>=r?n-=d-p:n-=d-r+1)}return n},this.$addFoldLine=function(r){return this.$foldData.push(r),this.$foldData.sort(function(o,i){return o.start.row-i.start.row}),r},this.addFold=function(r,o){var i=this.$foldData,n=!1,a;r instanceof S?a=r:(a=new S(o,r),a.collapseChildren=o.collapseChildren),this.$clipRangeToDocument(a.range);var c=a.start.row,d=a.start.column,p=a.end.row,R=a.end.column,$=this.getFoldAt(c,d,1),y=this.getFoldAt(p,R,-1);if($&&y==$)return $.addSubFold(a);$&&!$.range.isStart(c,d)&&this.removeFold($),y&&!y.range.isEnd(p,R)&&this.removeFold(y);var m=this.getFoldsInRange(a.range);m.length>0&&(this.removeFolds(m),a.collapseChildren||m.forEach(function(F){a.addSubFold(F)}));for(var M=0;M0&&this.foldAll(r.start.row+1,r.end.row,r.collapseChildren-1),r.subFolds=[]},this.expandFolds=function(r){r.forEach(function(o){this.expandFold(o)},this)},this.unfold=function(r,o){var i,n;if(r==null)i=new k(0,0,this.getLength(),0),o==null&&(o=!0);else if(typeof r=="number")i=new k(r,0,r,this.getLine(r).length);else if("row"in r)i=k.fromPoints(r,r);else{if(Array.isArray(r))return n=[],r.forEach(function(c){n=n.concat(this.unfold(c))},this),n;i=r}n=this.getFoldsInRangeList(i);for(var a=n;n.length==1&&k.comparePoints(n[0].start,i.start)<0&&k.comparePoints(n[0].end,i.end)>0;)this.expandFolds(n),n=this.getFoldsInRangeList(i);if(o!=!1?this.removeFolds(n):this.expandFolds(n),a.length)return a},this.isRowFolded=function(r,o){return!!this.getFoldLine(r,o)},this.getRowFoldEnd=function(r,o){var i=this.getFoldLine(r,o);return i?i.end.row:r},this.getRowFoldStart=function(r,o){var i=this.getFoldLine(r,o);return i?i.start.row:r},this.getFoldDisplayLine=function(r,o,i,n,a){n==null&&(n=r.start.row),a==null&&(a=0),o==null&&(o=r.end.row),i==null&&(i=this.getLine(o).length);var c=this.doc,d="";return r.walk(function(p,R,$,y){if(!(R$)break;while(a&&d.test(a.type));a=n.stepBackward()}else a=n.getCurrentToken();return p.end.row=n.getCurrentTokenRow(),p.end.column=n.getCurrentTokenColumn(),p}},this.foldAll=function(r,o,i,n){i==null&&(i=1e5);var a=this.foldWidgets;if(a){o=o||this.getLength(),r=r||0;for(var c=r;c=r&&(c=d.end.row,d.collapseChildren=i,this.addFold("...",d))}}},this.foldToLevel=function(r){for(this.foldAll();r-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var r=this;this.foldAll(null,null,null,function(o){for(var i=r.getTokens(o),n=0;n=0;){var c=i[n];if(c==null&&(c=i[n]=this.getFoldWidget(n)),c=="start"){var d=this.getFoldWidgetRange(n);if(a||(a=d),d&&d.end.row>=r)break}n--}return{range:n!==-1&&d,firstRange:a}},this.onFoldWidgetClick=function(r,o){o instanceof h&&(o=o.domEvent);var i={children:o.shiftKey,all:o.ctrlKey||o.metaKey,siblings:o.altKey},n=this.$toggleFoldWidget(r,i);if(!n){var a=o.target||o.srcElement;a&&/ace_fold-widget/.test(a.className)&&(a.className+=" ace_invalid")}},this.$toggleFoldWidget=function(r,o){if(this.getFoldWidget){var i=this.getFoldWidget(r),n=this.getLine(r),a=i==="end"?-1:1,c=this.getFoldAt(r,a===-1?0:n.length,a);if(c)return o.children||o.all?this.removeFold(c):this.expandFold(c),c;var d=this.getFoldWidgetRange(r,!0);if(d&&!d.isMultiLine()&&(c=this.getFoldAt(d.start.row,d.start.column,1),c&&d.isEqual(c.range)))return this.removeFold(c),c;if(o.siblings){var p=this.getParentFoldRangeData(r);if(p.range)var R=p.range.start.row+1,$=p.range.end.row;this.foldAll(R,$,o.all?1e4:0)}else o.children?($=d?d.end.row:this.getLength(),this.foldAll(r+1,$,o.all?1e4:0)):d&&(o.all&&(d.collapseChildren=1e4),this.addFold("...",d));return d}},this.toggleFoldWidget=function(r){var o=this.selection.getCursor().row;o=this.getRowFoldStart(o);var i=this.$toggleFoldWidget(o,{});if(!i){var n=this.getParentFoldRangeData(o,!0);if(i=n.range||n.firstRange,i){o=i.start.row;var a=this.getFoldAt(o,this.getLine(o).length,1);a?this.removeFold(a):this.addFold("...",i)}}},this.updateFoldWidgets=function(r){var o=r.start.row,i=r.end.row-o;if(i===0)this.foldWidgets[o]=null;else if(r.action=="remove")this.foldWidgets.splice(o,i+1,null);else{var n=Array(i+1);n.unshift(o,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(r){var o=r.data;o.first!=o.last&&this.foldWidgets.length>o.first&&this.foldWidgets.splice(o.first,this.foldWidgets.length)}}g.Folding=s}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(u,g,N){var k=u("../token_iterator").TokenIterator,b=u("../range").Range;function S(){this.findMatchingBracket=function(l,h){if(l.column==0)return null;var s=h||this.getLine(l.row).charAt(l.column-1);if(s=="")return null;var r=s.match(/([\(\[\{])|([\)\]\}])/);return r?r[1]?this.$findClosingBracket(r[1],l):this.$findOpeningBracket(r[2],l):null},this.getBracketRange=function(l){var h=this.getLine(l.row),s=!0,r,o=h.charAt(l.column-1),i=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(i||(o=h.charAt(l.column),l={row:l.row,column:l.column+1},i=o&&o.match(/([\(\[\{])|([\)\]\}])/),s=!1),!i)return null;if(i[1]){var n=this.$findClosingBracket(i[1],l);if(!n)return null;r=b.fromPoints(l,n),s||(r.end.column++,r.start.column--),r.cursor=r.end}else{var n=this.$findOpeningBracket(i[2],l);if(!n)return null;r=b.fromPoints(n,l),s||(r.start.column++,r.end.column--),r.cursor=r.start}return r},this.getMatchingBracketRanges=function(l,h){var s=this.getLine(l.row),r=/([\(\[\{])|([\)\]\}])/,o=!h&&s.charAt(l.column-1),i=o&&o.match(r);if(i||(o=(h===void 0||h)&&s.charAt(l.column),l={row:l.row,column:l.column+1},i=o&&o.match(r)),!i)return null;var n=new b(l.row,l.column-1,l.row,l.column),a=i[1]?this.$findClosingBracket(i[1],l):this.$findOpeningBracket(i[2],l);if(!a)return[n];var c=new b(a.row,a.column,a.row,a.column+1);return[n,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(l,h,s){var r=this.$brackets[l],o=1,i=new k(this,h.row,h.column),n=i.getCurrentToken();if(n||(n=i.stepForward()),!!n){s||(s=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var a=h.column-i.getCurrentTokenColumn()-2,c=n.value;;){for(;a>=0;){var d=c.charAt(a);if(d==r){if(o-=1,o==0)return{row:i.getCurrentTokenRow(),column:a+i.getCurrentTokenColumn()}}else d==l&&(o+=1);a-=1}do n=i.stepBackward();while(n&&!s.test(n.type));if(n==null)break;c=n.value,a=c.length-1}return null}},this.$findClosingBracket=function(l,h,s){var r=this.$brackets[l],o=1,i=new k(this,h.row,h.column),n=i.getCurrentToken();if(n||(n=i.stepForward()),!!n){s||(s=new RegExp("(\\.?"+n.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var a=h.column-i.getCurrentTokenColumn();;){for(var c=n.value,d=c.length;a"?r=!0:h.type.indexOf("tag-name")!==-1&&(s=!0));while(h&&!s);return h},this.$findClosingTag=function(l,h){var s,r=h.value,o=h.value,i=0,n=new b(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);h=l.stepForward();var a=new b(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+h.value.length),c=!1;do{if(s=h,s.type.indexOf("tag-close")!==-1&&!c){var d=new b(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);c=!0}if(h=l.stepForward(),h){if(h.value===">"&&!c){var d=new b(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);c=!0}if(h.type.indexOf("tag-name")!==-1){if(r=h.value,o===r){if(s.value==="<")i++;else if(s.value==="")var $=new b(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);else return}}}else if(o===r&&h.value==="/>"&&(i--,i<0))var p=new b(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+2),R=p,$=R,d=new b(a.end.row,a.end.column,a.end.row,a.end.column+1)}}while(h&&i>=0);if(n&&d&&p&&$&&a&&R)return{openTag:new b(n.start.row,n.start.column,d.end.row,d.end.column),closeTag:new b(p.start.row,p.start.column,$.end.row,$.end.column),openTagName:a,closeTagName:R}},this.$findOpeningTag=function(l,h){var s=l.getCurrentToken(),r=h.value,o=0,i=l.getCurrentTokenRow(),n=l.getCurrentTokenColumn(),a=n+2,c=new b(i,n,i,a);l.stepForward();var d=new b(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=l.stepForward()),!(!h||h.value!==">")){var p=new b(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);l.stepBackward(),l.stepBackward();do if(h=s,i=l.getCurrentTokenRow(),n=l.getCurrentTokenColumn(),a=n+h.value.length,s=l.stepBackward(),h){if(h.type.indexOf("tag-name")!==-1){if(r===h.value)if(s.value==="<"){if(o++,o>0){var R=new b(i,n,i,a),$=new b(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1);do h=l.stepForward();while(h&&h.value!==">");var y=new b(l.getCurrentTokenRow(),l.getCurrentTokenColumn(),l.getCurrentTokenRow(),l.getCurrentTokenColumn()+1)}}else s.value===""){for(var m=0,M=s;M;){if(M.type.indexOf("tag-name")!==-1&&M.value===r){o--;break}else if(M.value==="<")break;M=l.stepBackward(),m++}for(var O=0;Ov&&(this.$docRowCache.splice(v,w),this.$screenRowCache.splice(v,w))},E.prototype.$getRowCacheIndex=function(A,w){for(var v=0,_=A.length-1;v<=_;){var T=v+_>>1,W=A[T];if(w>W)v=T+1;else if(w=w));W++);return _=v[W],_?(_.index=W,_.start=T-_.value.length,_):null},E.prototype.setUndoManager=function(A){if(this.$undoManager=A,this.$informUndoManager&&this.$informUndoManager.cancel(),A){var w=this;A.addSession(this),this.$syncInformUndoManager=function(){w.$informUndoManager.cancel(),w.mergeUndoDeltas=!1},this.$informUndoManager=b.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},E.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},E.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},E.prototype.getTabString=function(){return this.getUseSoftTabs()?b.stringRepeat(" ",this.getTabSize()):" "},E.prototype.setUseSoftTabs=function(A){this.setOption("useSoftTabs",A)},E.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},E.prototype.setTabSize=function(A){this.setOption("tabSize",A)},E.prototype.getTabSize=function(){return this.$tabSize},E.prototype.isTabStop=function(A){return this.$useSoftTabs&&A.column%this.$tabSize===0},E.prototype.setNavigateWithinSoftTabs=function(A){this.setOption("navigateWithinSoftTabs",A)},E.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},E.prototype.setOverwrite=function(A){this.setOption("overwrite",A)},E.prototype.getOverwrite=function(){return this.$overwrite},E.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},E.prototype.addGutterDecoration=function(A,w){this.$decorations[A]||(this.$decorations[A]=""),this.$decorations[A]+=" "+w,this._signal("changeBreakpoint",{})},E.prototype.removeGutterDecoration=function(A,w){this.$decorations[A]=(this.$decorations[A]||"").replace(" "+w,""),this._signal("changeBreakpoint",{})},E.prototype.getBreakpoints=function(){return this.$breakpoints},E.prototype.setBreakpoints=function(A){this.$breakpoints=[];for(var w=0;w0&&(_=!!v.charAt(w-1).match(this.tokenRe)),_||(_=!!v.charAt(w).match(this.tokenRe)),_)var T=this.tokenRe;else if(/^\s+$/.test(v.slice(w-1,w+1)))var T=/\s/;else var T=this.nonTokenRe;var W=w;if(W>0){do W--;while(W>=0&&v.charAt(W).match(T));W++}for(var P=w;PA&&(A=w.screenWidth)}),this.lineWidgetWidth=A},E.prototype.$computeWidth=function(A){if(this.$modified||A){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var w=this.doc.getAllLines(),v=this.$rowLengthCache,_=0,T=0,W=this.$foldData[T],P=W?W.start.row:1/0,z=w.length,G=0;GP){if(G=W.end.row+1,G>=z)break;W=this.$foldData[T++],P=W?W.start.row:1/0}v[G]==null&&(v[G]=this.$getStringScreenWidth(w[G])[0]),v[G]>_&&(_=v[G])}this.screenWidth=_}},E.prototype.getLine=function(A){return this.doc.getLine(A)},E.prototype.getLines=function(A,w){return this.doc.getLines(A,w)},E.prototype.getLength=function(){return this.doc.getLength()},E.prototype.getTextRange=function(A){return this.doc.getTextRange(A||this.selection.getRange())},E.prototype.insert=function(A,w){return this.doc.insert(A,w)},E.prototype.remove=function(A){return this.doc.remove(A)},E.prototype.removeFullLines=function(A,w){return this.doc.removeFullLines(A,w)},E.prototype.undoChanges=function(A,w){if(A.length){this.$fromUndo=!0;for(var v=A.length-1;v!=-1;v--){var _=A[v];_.action=="insert"||_.action=="remove"?this.doc.revertDelta(_):_.folds&&this.addFolds(_.folds)}!w&&this.$undoSelect&&(A.selectionBefore?this.selection.fromJSON(A.selectionBefore):this.selection.setRange(this.$getUndoSelection(A,!0))),this.$fromUndo=!1}},E.prototype.redoChanges=function(A,w){if(A.length){this.$fromUndo=!0;for(var v=0;vA.end.column&&(W.start.column+=z),W.end.row==A.end.row&&W.end.column>A.end.column&&(W.end.column+=z)),P&&W.start.row>=A.end.row&&(W.start.row+=P,W.end.row+=P)}if(W.end=this.insert(W.start,_),T.length){var G=A.start,Y=W.start,P=Y.row-G.row,z=Y.column-G.column;this.addFolds(T.map(function(K){return K=K.clone(),K.start.row==G.row&&(K.start.column+=z),K.end.row==G.row&&(K.end.column+=z),K.start.row+=P,K.end.row+=P,K}))}return W},E.prototype.indentRows=function(A,w,v){v=v.replace(/\t/g,this.getTabString());for(var _=A;_<=w;_++)this.doc.insertInLine({row:_,column:0},v)},E.prototype.outdentRows=function(A){for(var w=A.collapseRows(),v=new o(0,0,0,0),_=this.getTabSize(),T=w.start.row;T<=w.end.row;++T){var W=this.getLine(T);v.start.row=T,v.end.row=T;for(var P=0;P<_&&W.charAt(P)==" ";++P);P<_&&W.charAt(P)==" "?(v.start.column=P,v.end.column=P+1):(v.start.column=0,v.end.column=P),this.remove(v)}},E.prototype.$moveLines=function(A,w,v){if(A=this.getRowFoldStart(A),w=this.getRowFoldEnd(w),v<0){var _=this.getRowFoldStart(A+v);if(_<0)return 0;var T=_-A}else if(v>0){var _=this.getRowFoldEnd(w+v);if(_>this.doc.getLength()-1)return 0;var T=_-w}else{A=this.$clipRowToDocument(A),w=this.$clipRowToDocument(w);var T=w-A+1}var W=new o(A,0,w,Number.MAX_VALUE),P=this.getFoldsInRange(W).map(function(G){return G=G.clone(),G.start.row+=T,G.end.row+=T,G}),z=v==0?this.doc.getLines(A,w):this.doc.removeFullLines(A,w);return this.doc.insertFullLines(A+T,z),P.length&&this.addFolds(P),T},E.prototype.moveLinesUp=function(A,w){return this.$moveLines(A,w,-1)},E.prototype.moveLinesDown=function(A,w){return this.$moveLines(A,w,1)},E.prototype.duplicateLines=function(A,w){return this.$moveLines(A,w,0)},E.prototype.$clipRowToDocument=function(A){return Math.max(0,Math.min(A,this.doc.getLength()-1))},E.prototype.$clipColumnToRow=function(A,w){return w<0?0:Math.min(this.doc.getLine(A).length,w)},E.prototype.$clipPositionToDocument=function(A,w){if(w=Math.max(0,w),A<0)A=0,w=0;else{var v=this.doc.getLength();A>=v?(A=v-1,w=this.doc.getLine(v-1).length):w=Math.min(this.doc.getLine(A).length,w)}return{row:A,column:w}},E.prototype.$clipRangeToDocument=function(A){A.start.row<0?(A.start.row=0,A.start.column=0):A.start.column=this.$clipColumnToRow(A.start.row,A.start.column);var w=this.doc.getLength()-1;return A.end.row>w?(A.end.row=w,A.end.column=this.doc.getLine(w).length):A.end.column=this.$clipColumnToRow(A.end.row,A.end.column),A},E.prototype.setUseWrapMode=function(A){if(A!=this.$useWrapMode){if(this.$useWrapMode=A,this.$modified=!0,this.$resetRowCache(0),A){var w=this.getLength();this.$wrapData=Array(w),this.$updateWrapData(0,w-1)}this._signal("changeWrapMode")}},E.prototype.getUseWrapMode=function(){return this.$useWrapMode},E.prototype.setWrapLimitRange=function(A,w){(this.$wrapLimitRange.min!==A||this.$wrapLimitRange.max!==w)&&(this.$wrapLimitRange={min:A,max:w},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},E.prototype.adjustWrapLimit=function(A,w){var v=this.$wrapLimitRange;v.max<0&&(v={min:w,max:w});var _=this.$constrainWrapLimit(A,v.min,v.max);return _!=this.$wrapLimit&&_>1?(this.$wrapLimit=_,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},E.prototype.$constrainWrapLimit=function(A,w,v){return w&&(A=Math.max(w,A)),v&&(A=Math.min(v,A)),A},E.prototype.getWrapLimit=function(){return this.$wrapLimit},E.prototype.setWrapLimit=function(A){this.setWrapLimitRange(A,A)},E.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},E.prototype.$updateInternalDataOnChange=function(A){var w=this.$useWrapMode,v=A.action,_=A.start,T=A.end,W=_.row,P=T.row,z=P-W,G=null;if(this.$updating=!0,z!=0)if(v==="remove"){this[w?"$wrapData":"$rowLengthCache"].splice(W,z);var Y=this.$foldData;G=this.getFoldsInRange(A),this.removeFolds(G);var J=this.getFoldLine(T.row),X=0;if(J){J.addRemoveChars(T.row,T.column,_.column-T.column),J.shiftRow(-z);var K=this.getFoldLine(W);K&&K!==J&&(K.merge(J),J=K),X=Y.indexOf(J)+1}for(X;X=T.row&&J.shiftRow(-z)}P=W}else{var Z=Array(z);Z.unshift(W,0);var ee=w?this.$wrapData:this.$rowLengthCache;ee.splice.apply(ee,Z);var Y=this.$foldData,J=this.getFoldLine(W),X=0;if(J){var se=J.range.compareInside(_.row,_.column);se==0?(J=J.split(_.row,_.column),J&&(J.shiftRow(z),J.addRemoveChars(P,0,T.column-_.column))):se==-1&&(J.addRemoveChars(W,0,T.column-_.column),J.shiftRow(z)),X=Y.indexOf(J)+1}for(X;X=W&&J.shiftRow(z)}}else{z=Math.abs(A.start.column-A.end.column),v==="remove"&&(G=this.getFoldsInRange(A),this.removeFolds(G),z=-z);var J=this.getFoldLine(W);J&&J.addRemoveChars(W,_.column,z)}return w&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,w?this.$updateWrapData(W,P):this.$updateRowLengthCache(W,P),G},E.prototype.$updateRowLengthCache=function(A,w){this.$rowLengthCache[A]=null,this.$rowLengthCache[w]=null},E.prototype.$updateWrapData=function(A,w){var v=this.doc.getAllLines(),_=this.getTabSize(),T=this.$wrapData,W=this.$wrapLimit,P,z,G=A;for(w=Math.min(w,v.length-1);G<=w;)z=this.getFoldLine(G,z),z?(P=[],z.walk((function(Y,J,X,K){var Z;if(Y!=null){Z=this.$getDisplayTokens(Y,P.length),Z[0]=$;for(var ee=1;eew-K;){var Z=W+w-K;if(A[Z-1]>=M&&A[Z]>=M){X(Z);continue}if(A[Z]==$||A[Z]==y){for(Z;Z!=W-1&&A[Z]!=$;Z--);if(Z>W){X(Z);continue}for(Z=W+w,Z;Z>2)),W-1);Z>ee&&A[Z]<$;)Z--;if(z){for(;Z>ee&&A[Z]<$;)Z--;for(;Z>ee&&A[Z]==m;)Z--}else for(;Z>ee&&A[Z]ee){X(++Z);continue}Z=W+w,A[Z]==R&&Z--,X(Z-K)}return _},E.prototype.$getDisplayTokens=function(A,w){var v=[],_;w=w||0;for(var T=0;T39&&W<48||W>57&&W<64?v.push(m):W>=4352&&F(W)?v.push(p,R):v.push(p)}return v},E.prototype.$getStringScreenWidth=function(A,w,v){if(w==0)return[0,0];w==null&&(w=1/0),v=v||0;var _,T;for(T=0;T=4352&&F(_)?v+=2:v+=1,!(v>w));T++);return[v,T]},E.prototype.getRowLength=function(A){var w=1;return this.lineWidgets&&(w+=this.lineWidgets[A]&&this.lineWidgets[A].rowCount||0),!this.$useWrapMode||!this.$wrapData[A]?w:this.$wrapData[A].length+w},E.prototype.getRowLineCount=function(A){return!this.$useWrapMode||!this.$wrapData[A]?1:this.$wrapData[A].length+1},E.prototype.getRowWrapIndent=function(A){if(this.$useWrapMode){var w=this.screenToDocumentPosition(A,Number.MAX_VALUE),v=this.$wrapData[w.row];return v.length&&v[0]=0)var z=Y[J],T=this.$docRowCache[J],K=A>Y[X-1];else var K=!X;for(var Z=this.getLength()-1,ee=this.getNextFoldLine(T),se=ee?ee.start.row:1/0;z<=A&&(G=this.getRowLength(T),!(z+G>A||T>=Z));)z+=G,T++,T>se&&(T=ee.end.row+1,ee=this.getNextFoldLine(T,ee),se=ee?ee.start.row:1/0),K&&(this.$docRowCache.push(T),this.$screenRowCache.push(z));if(ee&&ee.start.row<=T)_=this.getFoldDisplayLine(ee),T=ee.start.row;else{if(z+G<=A||T>Z)return{row:Z,column:this.getLine(Z).length};_=this.getLine(T),ee=null}var ae=0,le=Math.floor(A-z);if(this.$useWrapMode){var he=this.$wrapData[T];he&&(P=he[le],le>0&&he.length&&(ae=he.indent,W=he[le-1]||he[he.length-1],_=_.substring(W)))}return v!==void 0&&this.$bidiHandler.isBidiRow(z+le,T,le)&&(w=this.$bidiHandler.offsetToCol(v)),W+=this.$getStringScreenWidth(_,w-ae)[1],this.$useWrapMode&&W>=P&&(W=P-1),ee?ee.idxToPosition(W):{row:T,column:W}},E.prototype.documentToScreenPosition=function(A,w){if(typeof w>"u")var v=this.$clipPositionToDocument(A.row,A.column);else v=this.$clipPositionToDocument(A,w);A=v.row,w=v.column;var _=0,T=null,W=null;W=this.getFoldAt(A,w,1),W&&(A=W.start.row,w=W.start.column);var P,z=0,G=this.$docRowCache,Y=this.$getRowCacheIndex(G,A),J=G.length;if(J&&Y>=0)var z=G[Y],_=this.$screenRowCache[Y],X=A>G[J-1];else var X=!J;for(var K=this.getNextFoldLine(z),Z=K?K.start.row:1/0;z=Z){if(P=K.end.row+1,P>A)break;K=this.getNextFoldLine(P,K),Z=K?K.start.row:1/0}else P=z+1;_+=this.getRowLength(z),z=P,X&&(this.$docRowCache.push(z),this.$screenRowCache.push(_))}var ee="";K&&z>=Z?(ee=this.getFoldDisplayLine(K,A,w),T=K.start.row):(ee=this.getLine(A).substring(0,w),T=A);var se=0;if(this.$useWrapMode){var ae=this.$wrapData[T];if(ae){for(var le=0;ee.length>=ae[le];)_++,le++;ee=ee.substring(ae[le-1]||0,ee.length),se=le>0?ae.indent:0}}return this.lineWidgets&&this.lineWidgets[z]&&this.lineWidgets[z].rowsAbove&&(_+=this.lineWidgets[z].rowsAbove),{row:_,column:se+this.$getStringScreenWidth(ee)[0]}},E.prototype.documentToScreenColumn=function(A,w){return this.documentToScreenPosition(A,w).column},E.prototype.documentToScreenRow=function(A,w){return this.documentToScreenPosition(A,w).row},E.prototype.getScreenLength=function(){var A=0,w=null;if(this.$useWrapMode)for(var T=this.$wrapData.length,W=0,_=0,w=this.$foldData[_++],P=w?w.start.row:1/0;WP&&(W=w.end.row+1,w=this.$foldData[_++],P=w?w.start.row:1/0)}else{A=this.getLength();for(var v=this.$foldData,_=0;_v));W++);return[_,W]})},E.prototype.getPrecedingCharacter=function(){var A=this.selection.getCursor();if(A.column===0)return A.row===0?"":this.doc.getNewLineCharacter();var w=this.getLine(A.row);return w[A.column-1]},E.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},E}();d.$uid=0,d.prototype.$modes=l.$modes,d.prototype.getValue=d.prototype.toString,d.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},d.prototype.$overwrite=!1,d.prototype.$mode=null,d.prototype.$modeId=null,d.prototype.$scrollTop=0,d.prototype.$scrollLeft=0,d.prototype.$wrapLimit=80,d.prototype.$useWrapMode=!1,d.prototype.$wrapLimitRange={min:null,max:null},d.prototype.lineWidgets=null,d.prototype.isFullWidth=F,k.implement(d.prototype,h);var p=1,R=2,$=3,y=4,m=9,M=10,O=11,L=12;function F(E){return E<4352?!1:E>=4352&&E<=4447||E>=4515&&E<=4519||E>=4602&&E<=4607||E>=9001&&E<=9002||E>=11904&&E<=11929||E>=11931&&E<=12019||E>=12032&&E<=12245||E>=12272&&E<=12283||E>=12288&&E<=12350||E>=12353&&E<=12438||E>=12441&&E<=12543||E>=12549&&E<=12589||E>=12593&&E<=12686||E>=12688&&E<=12730||E>=12736&&E<=12771||E>=12784&&E<=12830||E>=12832&&E<=12871||E>=12880&&E<=13054||E>=13056&&E<=19903||E>=19968&&E<=42124||E>=42128&&E<=42182||E>=43360&&E<=43388||E>=44032&&E<=55203||E>=55216&&E<=55238||E>=55243&&E<=55291||E>=63744&&E<=64255||E>=65040&&E<=65049||E>=65072&&E<=65106||E>=65108&&E<=65126||E>=65128&&E<=65131||E>=65281&&E<=65376||E>=65504&&E<=65510}u("./edit_session/folding").Folding.call(d.prototype),u("./edit_session/bracket_match").BracketMatch.call(d.prototype),l.defineOptions(d.prototype,"session",{wrap:{set:function(E){if(!E||E=="off"?E=!1:E=="free"?E=!0:E=="printMargin"?E=-1:typeof E=="string"&&(E=parseInt(E,10)||!1),this.$wrap!=E)if(this.$wrap=E,!E)this.setUseWrapMode(!1);else{var A=typeof E=="number"?E:null;this.setWrapLimitRange(A,A),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(E){E=E=="auto"?this.$mode.type!="text":E!="text",E!=this.$wrapAsCode&&(this.$wrapAsCode=E,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(E){this.$useWorker=E,this.$stopWorker(),E&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(E){E=parseInt(E),E>0&&this.$tabSize!==E&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=E,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(E){this.setFoldStyle(E)},handlesSet:!0},overwrite:{set:function(E){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(E){this.doc.setNewLineMode(E)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(E){this.setMode(E)},get:function(){return this.$modeId},handlesSet:!0}}),g.EditSession=d}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(u,g,N){var k=u("./lib/lang"),b=u("./lib/oop"),S=u("./range").Range,l=function(){function s(){this.$options={}}return s.prototype.set=function(r){return b.mixin(this.$options,r),this},s.prototype.getOptions=function(){return k.copyObject(this.$options)},s.prototype.setOptions=function(r){this.$options=r},s.prototype.find=function(r){var o=this.$options,i=this.$matchIterator(r,o);if(!i)return!1;var n=null;return i.forEach(function(a,c,d,p){return n=new S(a,c,d,p),c==p&&o.start&&o.start.start&&o.skipCurrent!=!1&&n.isEqual(o.start)?(n=null,!1):!0}),n},s.prototype.findAll=function(r){var o=this.$options;if(!o.needle)return[];this.$assembleRegExp(o);var i=o.range,n=i?r.getLines(i.start.row,i.end.row):r.doc.getAllLines(),a=[],c=o.re;if(o.$isMultiLine){var d=c.length,p=n.length-d,R;e:for(var $=c.offset||0;$<=p;$++){for(var y=0;yO||(a.push(R=new S($,O,$+d-1,L)),d>2&&($=$+d-2))}}else for(var F=0;Fv&&a[y].end.row==_;)y--;for(a=a.slice(F,y+1),F=0,y=a.length;F=R;L--)if(M(L,Number.MAX_VALUE,O))return;if(o.wrap!=!1){for(L=$,R=p.row;L>=R;L--)if(M(L,Number.MAX_VALUE,O))return}}};else var y=function(L){var F=p.row;if(!M(F,p.column,L)){for(F=F+1;F<=$;F++)if(M(F,0,L))return;if(o.wrap!=!1){for(F=R,$=p.row;F<=$;F++)if(M(F,0,L))return}}};if(o.$isMultiLine)var m=i.length,M=function(O,L,F){var E=n?O-m+1:O;if(!(E<0||E+m>r.getLength())){var A=r.getLine(E),w=A.search(i[0]);if(!(!n&&wL)&&F(E,w,E+m-1,_))return!0}}};else if(n)var M=function(L,F,E){var A=r.getLine(L),w=[],v,_=0;for(i.lastIndex=0;v=i.exec(A);){var T=v[0].length;if(_=v.index,!T){if(_>=A.length)break;i.lastIndex=_+=k.skipEmptyMatch(A,_,c)}if(v.index+T>F)break;w.push(v.index,T)}for(var W=w.length-1;W>=0;W-=2){var P=w[W-1],T=w[W];if(E(L,P,L,P+T))return!0}};else var M=function(L,F,E){var A=r.getLine(L),w,v;for(i.lastIndex=F;v=i.exec(A);){var _=v[0].length;if(w=v.index,E(L,w,L,w+_))return!0;if(!_&&(i.lastIndex=w+=k.skipEmptyMatch(A,w,c),w>=A.length))return!1}};return{forEach:y}},s}();function h(s,r){var o=k.supportsLookbehind();function i(d,p){p===void 0&&(p=!0);var R=o&&r.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return R.test(d)||r.regExp?o&&r.$supportsUnicodeFlag?p?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var n=Array.from(s),a=n[0],c=n[n.length-1];return i(a)+s+i(c,!1)}g.Search=l}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(u,g,N){var k=this&&this.__extends||function(){var o=function(i,n){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,c){a.__proto__=c}||function(a,c){for(var d in c)Object.prototype.hasOwnProperty.call(c,d)&&(a[d]=c[d])},o(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");o(i,n);function a(){this.constructor=i}i.prototype=n===null?Object.create(n):(a.prototype=n.prototype,new a)}}(),b=u("../lib/keys"),S=u("../lib/useragent"),l=b.KEY_MODS,h=function(){function o(i,n){this.$init(i,n,!1)}return o.prototype.$init=function(i,n,a){this.platform=n||(S.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=a},o.prototype.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},o.prototype.removeCommand=function(i,n){var a=i&&(typeof i=="string"?i:i.name);i=this.commands[a],n||delete this.commands[a];var c=this.commandKeyBinding;for(var d in c){var p=c[d];if(p==i)delete c[d];else if(Array.isArray(p)){var R=p.indexOf(i);R!=-1&&(p.splice(R,1),p.length==1&&(c[d]=p[0]))}}},o.prototype.bindKey=function(i,n,a){if(typeof i=="object"&&i&&(a==null&&(a=i.position),i=i[this.platform]),!!i){if(typeof n=="function")return this.addCommand({exec:n,bindKey:i,name:n.name||i});i.split("|").forEach(function(c){var d="";if(c.indexOf(" ")!=-1){var p=c.split(/\s+/);c=p.pop(),p.forEach(function(y){var m=this.parseKeys(y),M=l[m.hashId]+m.key;d+=(d?" ":"")+M,this._addCommandToBinding(d,"chainKeys")},this),d+=" "}var R=this.parseKeys(c),$=l[R.hashId]+R.key;this._addCommandToBinding(d+$,n,a)},this)}},o.prototype._addCommandToBinding=function(i,n,a){var c=this.commandKeyBinding,d;if(!n)delete c[i];else if(!c[i]||this.$singleCommand)c[i]=n;else{Array.isArray(c[i])?(d=c[i].indexOf(n))!=-1&&c[i].splice(d,1):c[i]=[c[i]],typeof a!="number"&&(a=s(n));var p=c[i];for(d=0;da)break}p.splice(d,0,n)}},o.prototype.addCommands=function(i){i&&Object.keys(i).forEach(function(n){var a=i[n];if(a){if(typeof a=="string")return this.bindKey(a,n);typeof a=="function"&&(a={exec:a}),typeof a=="object"&&(a.name||(a.name=n),this.addCommand(a))}},this)},o.prototype.removeCommands=function(i){Object.keys(i).forEach(function(n){this.removeCommand(i[n])},this)},o.prototype.bindKeys=function(i){Object.keys(i).forEach(function(n){this.bindKey(n,i[n])},this)},o.prototype._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},o.prototype.parseKeys=function(i){var n=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function($){return $}),a=n.pop(),c=b[a];if(b.FUNCTION_KEYS[c])a=b.FUNCTION_KEYS[c].toLowerCase();else if(n.length){if(n.length==1&&n[0]=="shift")return{key:a.toUpperCase(),hashId:-1}}else return{key:a,hashId:-1};for(var d=0,p=n.length;p--;){var R=b.KEY_MODS[n[p]];if(R==null)return typeof console<"u"&&console.error("invalid modifier "+n[p]+" in "+i),!1;d|=R}return{key:a,hashId:d}},o.prototype.findKeyCommand=function(i,n){var a=l[i]+n;return this.commandKeyBinding[a]},o.prototype.handleKeyboard=function(i,n,a,c){if(!(c<0)){var d=l[n]+a,p=this.commandKeyBinding[d];return i.$keyChain&&(i.$keyChain+=" "+d,p=this.commandKeyBinding[i.$keyChain]||p),p&&(p=="chainKeys"||p[p.length-1]=="chainKeys")?(i.$keyChain=i.$keyChain||d,{command:"null"}):(i.$keyChain&&((!n||n==4)&&a.length==1?i.$keyChain=i.$keyChain.slice(0,-d.length-1):(n==-1||c>0)&&(i.$keyChain="")),{command:p})}},o.prototype.getStatusText=function(i,n){return n.$keyChain||""},o}();function s(o){return typeof o=="object"&&o.bindKey&&o.bindKey.position||(o.isDefault?-100:0)}var r=function(o){k(i,o);function i(n,a){var c=o.call(this,n,a)||this;return c.$singleCommand=!0,c}return i}(h);r.call=function(o,i,n){h.prototype.$init.call(o,i,n,!0)},h.call=function(o,i,n){h.prototype.$init.call(o,i,n,!1)},g.HashHandler=r,g.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(u,g,N){var k=this&&this.__extends||function(){var s=function(r,o){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(i[a]=n[a])},s(r,o)};return function(r,o){if(typeof o!="function"&&o!==null)throw new TypeError("Class extends value "+String(o)+" is not a constructor or null");s(r,o);function i(){this.constructor=r}r.prototype=o===null?Object.create(o):(i.prototype=o.prototype,new i)}}(),b=u("../lib/oop"),S=u("../keyboard/hash_handler").MultiHashHandler,l=u("../lib/event_emitter").EventEmitter,h=function(s){k(r,s);function r(o,i){var n=s.call(this,i,o)||this;return n.byName=n.commands,n.setDefaultHandler("exec",function(a){return a.args?a.command.exec(a.editor,a.args,a.event,!1):a.command.exec(a.editor,{},a.event,!0)}),n}return r.prototype.exec=function(o,i,n){if(Array.isArray(o)){for(var a=o.length;a--;)if(this.exec(o[a],i,n))return!0;return!1}if(typeof o=="string"&&(o=this.commands[o]),!this.canExecute(o,i))return!1;var c={editor:i,command:o,args:n};return c.returnValue=this._emit("exec",c),this._signal("afterExec",c),c.returnValue!==!1},r.prototype.canExecute=function(o,i){return typeof o=="string"&&(o=this.commands[o]),!(!o||i&&i.$readOnly&&!o.readOnly||this.$checkCommandState!=!1&&o.isAvailable&&!o.isAvailable(i))},r.prototype.toggleRecording=function(o){if(!this.$inReplay)return o&&o._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(i){this.macro.push([i.command,i.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},r.prototype.replay=function(o){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(o);try{this.$inReplay=!0,this.macro.forEach(function(i){typeof i=="string"?this.exec(i,o):this.exec(i[0],o,i[1])},this)}finally{this.$inReplay=!1}}},r.prototype.trimMacro=function(o){return o.map(function(i){return typeof i[0]!="string"&&(i[0]=i[0].name),i[1]||(i=i[0]),i})},r}(S);b.implement(h.prototype,l),g.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(u,g,N){var k=u("../lib/lang"),b=u("../config"),S=u("../range").Range;function l(s,r){return{win:s,mac:r}}g.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(s){b.loadModule("ace/ext/settings_menu",function(r){r.init(s),s.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(s){b.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(s,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(s){b.loadModule("ace/ext/error_marker",function(r){r.showErrorMarker(s,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(s){s.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(s){s.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(s,r){typeof r=="number"&&!isNaN(r)&&s.gotoLine(r),s.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(s){s.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(s){s.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(s){s.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(s){s.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(s){s.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(s){s.session.foldAll(),s.session.unfold(s.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(s){s.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(s){s.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(s){s.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(s){s.selection.isEmpty()?s.selection.selectWord():s.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(s){b.loadModule("ace/ext/searchbox",function(r){r.Search(s)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(s){s.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(s){s.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(s){s.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(s){s.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(s,r){s.navigateUp(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(s){s.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(s){s.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(s){s.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(s,r){s.navigateDown(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(s){s.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(s){s.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(s){s.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(s){s.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(s,r){s.navigateLeft(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(s){s.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(s){s.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(s){s.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(s){s.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(s,r){s.navigateRight(r.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(s){s.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(s){s.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(s){s.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(s){s.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(s){s.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(s){s.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(s){s.renderer.scrollBy(0,-2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(s){s.renderer.scrollBy(0,2*s.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(s){s.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(s){s.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(s){s.commands.toggleRecording(s)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(s){s.commands.replay(s)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(s){s.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(s){s.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(s){s.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(s){},readOnly:!0},{name:"cut",description:"Cut",exec:function(s){var r=s.$copyWithEmptySelection&&s.selection.isEmpty(),o=r?s.selection.getLineRange():s.selection.getRange();s._emit("cut",o),o.isEmpty()||s.session.remove(o),s.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(s,r){s.$handlePaste(r)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(s){s.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(s){s.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(s){s.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(s){s.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(s){s.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(s){s.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(s){s.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(s){b.loadModule("ace/ext/searchbox",function(r){r.Search(s,!0)})}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(s){s.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(s){s.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(s){s.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(s){s.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(s){s.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(s){s.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(s){s.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(s){s.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(s){if(s.selection.isEmpty())s.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(s){s.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(s){s.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(s){var r=s.selection.getRange();r.start.column=0,s.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(s){var r=s.selection.getRange();r.end.column=Number.MAX_VALUE,s.session.remove(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(s){s.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(s){s.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(s){s.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(s){s.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(s){s.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(s){s.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(s,r){s.insert(r)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(s,r){s.insert(k.stringRepeat(r.text||"",r.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(s){s.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(s){s.transposeLetters()},multiSelectAction:function(s){s.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(s){s.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(s){s.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(s){s.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(s){var r=s.selection.getRange();r.start.column=r.end.column=0,r.end.row++,s.selection.setRange(r,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(s){s.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(s){for(var r=s.selection.isBackwards(),o=r?s.selection.getSelectionLead():s.selection.getSelectionAnchor(),i=r?s.selection.getSelectionAnchor():s.selection.getSelectionLead(),n=s.session.doc.getLine(o.row).length,a=s.session.doc.getTextRange(s.selection.getRange()),c=a.replace(/\n\s*/," ").length,d=s.session.doc.getLine(o.row),p=o.row+1;p<=i.row+1;p++){var R=k.stringTrimLeft(k.stringTrimRight(s.session.doc.getLine(p)));R.length!==0&&(R=" "+R),d+=R}i.row+10?(s.selection.moveCursorTo(o.row,o.column),s.selection.selectTo(o.row,o.column+c)):(n=s.session.doc.getLine(o.row).length>n?n+1:n,s.selection.moveCursorTo(o.row,n))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(s){var r=s.session.doc.getLength()-1,o=s.session.doc.getLine(r).length,i=s.selection.rangeList.ranges,n=[];i.length<1&&(i=[s.selection.getRange()]);for(var a=0;ah[s].column&&s++,i.unshift(s,0),h.splice.apply(h,i),this.$updateRows()}}},S.prototype.$updateRows=function(){var l=this.session.lineWidgets;if(l){var h=!0;l.forEach(function(s,r){if(s)for(h=!1,s.row=r;s.$oldWidget;)s.$oldWidget.row=r,s=s.$oldWidget}),h&&(this.session.lineWidgets=null)}},S.prototype.$registerLineWidget=function(l){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[l.row];return h&&(l.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[l.row]=l,l},S.prototype.addLineWidget=function(l){if(this.$registerLineWidget(l),l.session=this.session,!this.editor)return l;var h=this.editor.renderer;l.html&&!l.el&&(l.el=k.createElement("div"),l.el.innerHTML=l.html),l.text&&!l.el&&(l.el=k.createElement("div"),l.el.textContent=l.text),l.el&&(k.addCssClass(l.el,"ace_lineWidgetContainer"),l.className&&k.addCssClass(l.el,l.className),l.el.style.position="absolute",l.el.style.zIndex="5",h.container.appendChild(l.el),l._inDocument=!0,l.coverGutter||(l.el.style.zIndex="3"),l.pixelHeight==null&&(l.pixelHeight=l.el.offsetHeight)),l.rowCount==null&&(l.rowCount=l.pixelHeight/h.layerConfig.lineHeight);var s=this.session.getFoldAt(l.row,0);if(l.$fold=s,s){var r=this.session.lineWidgets;l.row==s.end.row&&!r[s.start.row]?r[s.start.row]=l:l.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(l),l},S.prototype.removeLineWidget=function(l){if(l._inDocument=!1,l.session=null,l.el&&l.el.parentNode&&l.el.parentNode.removeChild(l.el),l.editor&&l.editor.destroy)try{l.editor.destroy()}catch{}if(this.session.lineWidgets){var h=this.session.lineWidgets[l.row];if(h==l)this.session.lineWidgets[l.row]=l.$oldWidget,l.$oldWidget&&this.onWidgetChanged(l.$oldWidget);else for(;h;){if(h.$oldWidget==l){h.$oldWidget=l.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:l.row}}}),this.$updateRows()},S.prototype.getWidgetsAtRow=function(l){for(var h=this.session.lineWidgets,s=h&&h[l],r=[];s;)r.push(s),s=s.$oldWidget;return r},S.prototype.onWidgetChanged=function(l){this.session._changedWidgets.push(l),this.editor&&this.editor.renderer.updateFull()},S.prototype.measureWidgets=function(l,h){var s=this.session._changedWidgets,r=h.layerConfig;if(!(!s||!s.length)){for(var o=1/0,i=0;i0&&!r[o];)o--;this.firstRow=s.firstRow,this.lastRow=s.lastRow,h.$cursorLayer.config=s;for(var n=o;n<=i;n++){var a=r[n];if(!(!a||!a.el)){if(a.hidden){a.el.style.top=-100-(a.pixelHeight||0)+"px";continue}a._inDocument||(a._inDocument=!0,h.container.appendChild(a.el));var c=h.$cursorLayer.getPixelPosition({row:n,column:0},!0).top;a.coverLine||(c+=s.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=c-s.offset+"px";var d=a.coverGutter?0:h.gutterWidth;a.fixedWidth||(d-=h.scrollLeft),a.el.style.left=d+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=s.width+2*s.padding+"px"),a.fixedWidth?a.el.style.right=h.scrollBar.getWidth()+"px":a.el.style.right=""}}}},S}();g.LineWidgets=b}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(u,g,N){var k=u("../lib/keys"),b=u("../mouse/default_gutter_handler").GutterTooltip,S=function(){function h(s){this.editor=s,this.gutterLayer=s.renderer.$gutterLayer,this.element=s.renderer.$gutter,this.lines=s.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new b(this.editor)}return h.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},h.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},h.prototype.$onGutterKeyDown=function(s){if(this.annotationTooltip.isOpen){s.preventDefault(),s.keyCode===k.escape&&this.annotationTooltip.hideTooltip();return}if(s.target===this.element){if(s.keyCode!=k.enter)return;s.preventDefault();var r=this.editor.getCursorPosition().row;this.editor.isRowVisible(r)||this.editor.scrollToLine(r,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),i=this.$findNearestFoldWidget(o),n=this.$findNearestAnnotation(o);if(!(i===null&&n===null)){if(i===null&&n!==null){this.activeRowIndex=n,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(i!==null&&n===null){this.activeRowIndex=i,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(n-o)0||s+r=0&&this.$isFoldWidgetVisible(s-r))return s-r;if(s+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(s+r))return s+r}return null},h.prototype.$findNearestAnnotation=function(s){if(this.$isAnnotationVisible(s))return s;for(var r=0;s-r>0||s+r=0&&this.$isAnnotationVisible(s-r))return s-r;if(s+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(s+r))return s+r}return null},h.prototype.$focusFoldWidget=function(s){if(s!=null){var r=this.$getFoldWidget(s);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},h.prototype.$focusAnnotation=function(s){if(s!=null){var r=this.$getAnnotation(s);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},h.prototype.$blurFoldWidget=function(s){var r=this.$getFoldWidget(s);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},h.prototype.$blurAnnotation=function(s){var r=this.$getAnnotation(s);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},h.prototype.$moveFoldWidgetUp=function(){for(var s=this.activeRowIndex;s>0;)if(s--,this.$isFoldWidgetVisible(s)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=s,this.$focusFoldWidget(this.activeRowIndex);return}},h.prototype.$moveFoldWidgetDown=function(){for(var s=this.activeRowIndex;s0;)if(s--,this.$isAnnotationVisible(s)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=s,this.$focusAnnotation(this.activeRowIndex);return}},h.prototype.$moveAnnotationDown=function(){for(var s=this.activeRowIndex;s=w.length&&(w=void 0),{value:w&&w[T++],done:!w}}};throw new TypeError(v?"Object is not iterable.":"Symbol.iterator is not defined.")},b=u("./lib/oop"),S=u("./lib/dom"),l=u("./lib/lang"),h=u("./lib/useragent"),s=u("./keyboard/textinput").TextInput,r=u("./mouse/mouse_handler").MouseHandler,o=u("./mouse/fold_handler").FoldHandler,i=u("./keyboard/keybinding").KeyBinding,n=u("./edit_session").EditSession,a=u("./search").Search,c=u("./range").Range,d=u("./lib/event_emitter").EventEmitter,p=u("./commands/command_manager").CommandManager,R=u("./commands/default_commands").commands,$=u("./config"),y=u("./token_iterator").TokenIterator,m=u("./line_widgets").LineWidgets,M=u("./keyboard/gutter_handler").GutterKeyboardHandler,O=u("./config").nls,L=u("./clipboard"),F=u("./lib/keys"),E=function(){function w(v,_,T){this.session,this.$toDestroy=[];var W=v.getContainerElement();this.container=W,this.renderer=v,this.id="editor"+ ++w.$uid,this.commands=new p(h.isMac?"mac":"win",R),typeof document=="object"&&(this.textInput=new s(v.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new r(this),new o(this)),this.keyBinding=new i(this),this.$search=new a().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(P,z){z._$emitInputEvent.schedule(31)}),this.setSession(_||T&&T.session||new n("")),$.resetOptions(this),T&&this.setOptions(T),$._signal("editor",this)}return w.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=l.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},w.prototype.startOperation=function(v){if(this.curOp){if(!v||this.curOp.command)return;this.prevOp=this.curOp}v||(this.previousCommand=null,v={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:v.command||{},args:v.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},w.prototype.endOperation=function(v){if(this.curOp&&this.session){if(v&&v.returnValue===!1||!this.session)return this.curOp=null;if(v==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var _=this.curOp.command,T=_&&_.scrollIntoView;if(T){switch(T){case"center-animate":T="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var W=this.selection.getRange(),P=this.renderer.layerConfig;(W.start.row>=P.lastRow||W.end.row<=P.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}T=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var z=this.selection.toJSON();this.curOp.selectionAfter=z,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(z),this.prevOp=this.curOp,this.curOp=null}},w.prototype.$historyTracker=function(v){if(this.$mergeUndoDeltas){var _=this.prevOp,T=this.$mergeableCommands,W=_.command&&v.command.name==_.command.name;if(v.command.name=="insertstring"){var P=v.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),W=W&&this.mergeNextCommand&&(!/\s/.test(P)||/\s/.test(_.args)),this.mergeNextCommand=!0}else W=W&&T.indexOf(v.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(W=!1),W?this.session.mergeUndoDeltas=!0:T.indexOf(v.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},w.prototype.setKeyboardHandler=function(v,_){if(v&&typeof v=="string"&&v!="ace"){this.$keybindingId=v;var T=this;$.loadModule(["keybinding",v],function(W){T.$keybindingId==v&&T.keyBinding.setKeyboardHandler(W&&W.handler),_&&_()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(v),_&&_()},w.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},w.prototype.setSession=function(v){if(this.session!=v){this.curOp&&this.endOperation(),this.curOp={};var _=this.session;if(_){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var T=this.session.getSelection();T.off("changeCursor",this.$onCursorChange),T.off("changeSelection",this.$onSelectionChange)}this.session=v,v?(this.$onDocumentChange=this.onDocumentChange.bind(this),v.on("change",this.$onDocumentChange),this.renderer.setSession(v),this.$onChangeMode=this.onChangeMode.bind(this),v.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),v.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),v.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),v.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),v.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),v.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=v.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(v)),this._signal("changeSession",{session:v,oldSession:_}),this.curOp=null,_&&_._signal("changeEditor",{oldEditor:this}),v&&v._signal("changeEditor",{editor:this}),v&&!v.destroyed&&v.bgTokenizer.scheduleStart()}},w.prototype.getSession=function(){return this.session},w.prototype.setValue=function(v,_){return this.session.doc.setValue(v),_?_==1?this.navigateFileEnd():_==-1&&this.navigateFileStart():this.selectAll(),v},w.prototype.getValue=function(){return this.session.getValue()},w.prototype.getSelection=function(){return this.selection},w.prototype.resize=function(v){this.renderer.onResize(v)},w.prototype.setTheme=function(v,_){this.renderer.setTheme(v,_)},w.prototype.getTheme=function(){return this.renderer.getTheme()},w.prototype.setStyle=function(v){this.renderer.setStyle(v)},w.prototype.unsetStyle=function(v){this.renderer.unsetStyle(v)},w.prototype.getFontSize=function(){return this.getOption("fontSize")||S.computedStyle(this.container).fontSize},w.prototype.setFontSize=function(v){this.setOption("fontSize",v)},w.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var v=this;this.$highlightPending=!0,setTimeout(function(){v.$highlightPending=!1;var _=v.session;if(!(!_||_.destroyed)){_.$bracketHighlight&&(_.$bracketHighlight.markerIds.forEach(function(K){_.removeMarker(K)}),_.$bracketHighlight=null);var T=v.getCursorPosition(),W=v.getKeyboardHandler(),P=W&&W.$getDirectionForHighlight&&W.$getDirectionForHighlight(v),z=_.getMatchingBracketRanges(T,P);if(!z){var G=new y(_,T.row,T.column),Y=G.getCurrentToken();if(Y&&/\b(?:tag-open|tag-name)/.test(Y.type)){var J=_.getMatchingTags(T);J&&(z=[J.openTagName.isEmpty()?J.openTag:J.openTagName,J.closeTagName.isEmpty()?J.closeTag:J.closeTagName])}}if(!z&&_.$mode.getMatching&&(z=_.$mode.getMatching(v.session)),!z){v.getHighlightIndentGuides()&&v.renderer.$textLayer.$highlightIndentGuide();return}var X="ace_bracket";Array.isArray(z)?z.length==1&&(X="ace_error_bracket"):z=[z],z.length==2&&(c.comparePoints(z[0].end,z[1].start)==0?z=[c.fromPoints(z[0].start,z[1].end)]:c.comparePoints(z[0].start,z[1].end)==0&&(z=[c.fromPoints(z[1].start,z[0].end)])),_.$bracketHighlight={ranges:z,markerIds:z.map(function(K){return _.addMarker(K,X,"text")})},v.getHighlightIndentGuides()&&v.renderer.$textLayer.$highlightIndentGuide()}},50)}},w.prototype.focus=function(){this.textInput.focus()},w.prototype.isFocused=function(){return this.textInput.isFocused()},w.prototype.blur=function(){this.textInput.blur()},w.prototype.onFocus=function(v){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",v))},w.prototype.onBlur=function(v){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",v))},w.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},w.prototype.onDocumentChange=function(v){var _=this.session.$useWrapMode,T=v.start.row==v.end.row?v.end.row:1/0;this.renderer.updateLines(v.start.row,T,_),this._signal("change",v),this.$cursorChange()},w.prototype.onTokenizerUpdate=function(v){var _=v.data;this.renderer.updateLines(_.first,_.last)},w.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},w.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},w.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},w.prototype.$updateHighlightActiveLine=function(){var v=this.getSession(),_;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(_=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(_=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(_=!1)),v.$highlightLineMarker&&!_)v.removeMarker(v.$highlightLineMarker.id),v.$highlightLineMarker=null;else if(!v.$highlightLineMarker&&_){var T=new c(_.row,_.column,_.row,1/0);T.id=v.addMarker(T,"ace_active-line","screenLine"),v.$highlightLineMarker=T}else _&&(v.$highlightLineMarker.start.row=_.row,v.$highlightLineMarker.end.row=_.row,v.$highlightLineMarker.start.column=_.column,v._signal("changeBackMarker"))},w.prototype.onSelectionChange=function(v){var _=this.session;if(_.$selectionMarker&&_.removeMarker(_.$selectionMarker),_.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var T=this.selection.getRange(),W=this.getSelectionStyle();_.$selectionMarker=_.addMarker(T,"ace_selection",W)}var P=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(P),this._signal("changeSelection")},w.prototype.$getSelectionHighLightRegexp=function(){var v=this.session,_=this.getSelectionRange();if(!(_.isEmpty()||_.isMultiLine())){var T=_.start.column,W=_.end.column,P=v.getLine(_.start.row),z=P.substring(T,W);if(!(z.length>5e3||!/[\w\d]/.test(z))){var G=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:z}),Y=P.substring(T-1,W+1);if(G.test(Y))return G}}},w.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},w.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},w.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},w.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},w.prototype.onChangeMode=function(v){this.renderer.updateText(),this._emit("changeMode",v)},w.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},w.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},w.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},w.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},w.prototype.getCopyText=function(){var v=this.getSelectedText(),_=this.session.doc.getNewLineCharacter(),T=!1;if(!v&&this.$copyWithEmptySelection){T=!0;for(var W=this.selection.getAllRanges(),P=0;PK.search(/\S|$/)){var Y=K.substr(P.column).search(/\S|$/);T.doc.removeInLine(P.row,P.column,P.column+Y)}}this.clearSelection();var J=P.column,X=T.getState(P.row),K=T.getLine(P.row),Z=W.checkOutdent(X,K,v);if(T.insert(P,v),z&&z.selection&&(z.selection.length==2?this.selection.setSelectionRange(new c(P.row,J+z.selection[0],P.row,J+z.selection[1])):this.selection.setSelectionRange(new c(P.row+z.selection[0],z.selection[1],P.row+z.selection[2],z.selection[3]))),this.$enableAutoIndent){if(T.getDocument().isNewLine(v)){var ee=W.getNextLineIndent(X,K.slice(0,P.column),T.getTabString());T.insert({row:P.row+1,column:0},ee)}Z&&W.autoOutdent(X,T,P.row)}},w.prototype.autoIndent=function(){for(var v=this.session,_=v.getMode(),T=this.selection.isEmpty()?[new c(0,0,v.doc.getLength()-1,0)]:this.selection.getAllRanges(),W="",P="",z="",G=v.getTabString(),Y=0;Y0&&(W=v.getState(K-1),P=v.getLine(K-1),z=_.getNextLineIndent(W,P,G));var Z=v.getLine(K),ee=_.$getIndent(Z);if(z!==ee){if(ee.length>0){var se=new c(K,0,K,ee.length);v.remove(se)}z.length>0&&v.insert({row:K,column:0},z)}_.autoOutdent(W,v,K)}},w.prototype.onTextInput=function(v,_){if(!_)return this.keyBinding.onTextInput(v);this.startOperation({command:{name:"insertstring"}});var T=this.applyComposition.bind(this,v,_);this.selection.rangeCount?this.forEachSelection(T):T(),this.endOperation()},w.prototype.applyComposition=function(v,_){if(_.extendLeft||_.extendRight){var T=this.selection.getRange();T.start.column-=_.extendLeft,T.end.column+=_.extendRight,T.start.column<0&&(T.start.row--,T.start.column+=this.session.getLine(T.start.row).length+1),this.selection.setRange(T),!v&&!T.isEmpty()&&this.remove()}if((v||!this.selection.isEmpty())&&this.insert(v,!0),_.restoreStart||_.restoreEnd){var T=this.selection.getRange();T.start.column-=_.restoreStart,T.end.column-=_.restoreEnd,this.selection.setRange(T)}},w.prototype.onCommandKey=function(v,_,T){return this.keyBinding.onCommandKey(v,_,T)},w.prototype.setOverwrite=function(v){this.session.setOverwrite(v)},w.prototype.getOverwrite=function(){return this.session.getOverwrite()},w.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},w.prototype.setScrollSpeed=function(v){this.setOption("scrollSpeed",v)},w.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},w.prototype.setDragDelay=function(v){this.setOption("dragDelay",v)},w.prototype.getDragDelay=function(){return this.getOption("dragDelay")},w.prototype.setSelectionStyle=function(v){this.setOption("selectionStyle",v)},w.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},w.prototype.setHighlightActiveLine=function(v){this.setOption("highlightActiveLine",v)},w.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},w.prototype.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},w.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},w.prototype.setHighlightSelectedWord=function(v){this.setOption("highlightSelectedWord",v)},w.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},w.prototype.setAnimatedScroll=function(v){this.renderer.setAnimatedScroll(v)},w.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},w.prototype.setShowInvisibles=function(v){this.renderer.setShowInvisibles(v)},w.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},w.prototype.setDisplayIndentGuides=function(v){this.renderer.setDisplayIndentGuides(v)},w.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},w.prototype.setHighlightIndentGuides=function(v){this.renderer.setHighlightIndentGuides(v)},w.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},w.prototype.setShowPrintMargin=function(v){this.renderer.setShowPrintMargin(v)},w.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},w.prototype.setPrintMarginColumn=function(v){this.renderer.setPrintMarginColumn(v)},w.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},w.prototype.setReadOnly=function(v){this.setOption("readOnly",v)},w.prototype.getReadOnly=function(){return this.getOption("readOnly")},w.prototype.setBehavioursEnabled=function(v){this.setOption("behavioursEnabled",v)},w.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},w.prototype.setWrapBehavioursEnabled=function(v){this.setOption("wrapBehavioursEnabled",v)},w.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},w.prototype.setShowFoldWidgets=function(v){this.setOption("showFoldWidgets",v)},w.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},w.prototype.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},w.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},w.prototype.remove=function(v){this.selection.isEmpty()&&(v=="left"?this.selection.selectLeft():this.selection.selectRight());var _=this.getSelectionRange();if(this.getBehavioursEnabled()){var T=this.session,W=T.getState(_.start.row),P=T.getMode().transformAction(W,"deletion",this,T,_);if(_.end.column===0){var z=T.getTextRange(_);if(z[z.length-1]==` +`){var G=T.getLine(_.end.row);/^\s+$/.test(G)&&(_.end.column=G.length)}}P&&(_=P)}this.session.remove(_),this.clearSelection()},w.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},w.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var v=this.getSelectionRange();v.start.column==v.end.column&&v.start.row==v.end.row&&(v.end.column=0,v.end.row++),this.session.remove(v),this.clearSelection()},w.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var v=this.getCursorPosition();this.insert(` +`),this.moveCursorToPosition(v)},w.prototype.setGhostText=function(v,_){this.session.widgetManager||(this.session.widgetManager=new m(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(v,_)},w.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},w.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var v=this.getCursorPosition(),_=v.column;if(_!==0){var T=this.session.getLine(v.row),W,P;_Y.toLowerCase()?1:0});for(var P=new c(0,0,0,0),W=v.first;W<=v.last;W++){var z=_.getLine(W);P.start.row=W,P.end.row=W,P.end.column=z.length,_.replace(P,T[W-v.first])}},w.prototype.toggleCommentLines=function(){var v=this.session.getState(this.getCursorPosition().row),_=this.$getSelectedRows();this.session.getMode().toggleCommentLines(v,this.session,_.first,_.last)},w.prototype.toggleBlockComment=function(){var v=this.getCursorPosition(),_=this.session.getState(v.row),T=this.getSelectionRange();this.session.getMode().toggleBlockComment(_,this.session,T,v)},w.prototype.getNumberAt=function(v,_){var T=/[\-]?[0-9]+(?:\.[0-9]+)?/g;T.lastIndex=0;for(var W=this.session.getLine(v);T.lastIndex<_;){var P=T.exec(W);if(P.index<=_&&P.index+P[0].length>=_){var z={value:P[0],start:P.index,end:P.index+P[0].length};return z}}return null},w.prototype.modifyNumber=function(v){var _=this.selection.getCursor().row,T=this.selection.getCursor().column,W=new c(_,T-1,_,T),P=this.session.getTextRange(W);if(!isNaN(parseFloat(P))&&isFinite(P)){var z=this.getNumberAt(_,T);if(z){var G=z.value.indexOf(".")>=0?z.start+z.value.indexOf(".")+1:z.end,Y=z.start+z.value.length-G,J=parseFloat(z.value);J*=Math.pow(10,Y),G!==z.end&&T=G&&z<=Y&&(T=be,J.selection.clearSelection(),J.moveCursorTo(v,G+W),J.selection.selectTo(v,Y+W)),G=Y});for(var X=this.$toggleWordPairs,K,Z=0;Z=Y&&G<=J&&ee.match(/((?:https?|ftp):\/\/[\S]+)/)){X=ee.replace(/[\s:.,'";}\]]+$/,"");break}Y=J}}catch(se){T={error:se}}finally{try{Z&&!Z.done&&(W=K.return)&&W.call(K)}finally{if(T)throw T.error}}return X},w.prototype.openLink=function(){var v=this.selection.getCursor(),_=this.findLinkAt(v.row,v.column);return _&&window.open(_,"_blank"),_!=null},w.prototype.removeLines=function(){var v=this.$getSelectedRows();this.session.removeFullLines(v.first,v.last),this.clearSelection()},w.prototype.duplicateSelection=function(){var v=this.selection,_=this.session,T=v.getRange(),W=v.isBackwards();if(T.isEmpty()){var P=T.start.row;_.duplicateLines(P,P)}else{var z=W?T.start:T.end,G=_.insert(z,_.getTextRange(T));T.start=z,T.end=G,v.setSelectionRange(T,W)}},w.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},w.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},w.prototype.moveText=function(v,_,T){return this.session.moveText(v,_,T)},w.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},w.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},w.prototype.$moveLines=function(v,_){var T,W,P=this.selection;if(!P.inMultiSelectMode||this.inVirtualSelectionMode){var z=P.toOrientedRange();T=this.$getSelectedRows(z),W=this.session.$moveLines(T.first,T.last,_?0:v),_&&v==-1&&(W=0),z.moveBy(W,0),P.fromOrientedRange(z)}else{var G=P.rangeList.ranges;P.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var Y=0,J=0,X=G.length,K=0;Kse+1)break;se=ae.last}for(K--,Y=this.session.$moveLines(ee,se,_?0:v),_&&v==-1&&(Z=K+1);Z<=K;)G[Z].moveBy(Y,0),Z++;_||(Y=0),J+=Y}P.fromOrientedRange(P.ranges[0]),P.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},w.prototype.$getSelectedRows=function(v){return v=(v||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(v.start.row),last:this.session.getRowFoldEnd(v.end.row)}},w.prototype.onCompositionStart=function(v){this.renderer.showComposition(v)},w.prototype.onCompositionUpdate=function(v){this.renderer.setCompositionText(v)},w.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},w.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},w.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},w.prototype.isRowVisible=function(v){return v>=this.getFirstVisibleRow()&&v<=this.getLastVisibleRow()},w.prototype.isRowFullyVisible=function(v){return v>=this.renderer.getFirstFullyVisibleRow()&&v<=this.renderer.getLastFullyVisibleRow()},w.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},w.prototype.$moveByPage=function(v,_){var T=this.renderer,W=this.renderer.layerConfig,P=v*Math.floor(W.height/W.lineHeight);_===!0?this.selection.$moveSelection(function(){this.moveCursorBy(P,0)}):_===!1&&(this.selection.moveCursorBy(P,0),this.selection.clearSelection());var z=T.scrollTop;T.scrollBy(0,P*W.lineHeight),_!=null&&T.scrollCursorIntoView(null,.5),T.animateScrolling(z)},w.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},w.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},w.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},w.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},w.prototype.scrollPageDown=function(){this.$moveByPage(1)},w.prototype.scrollPageUp=function(){this.$moveByPage(-1)},w.prototype.scrollToRow=function(v){this.renderer.scrollToRow(v)},w.prototype.scrollToLine=function(v,_,T,W){this.renderer.scrollToLine(v,_,T,W)},w.prototype.centerSelection=function(){var v=this.getSelectionRange(),_={row:Math.floor(v.start.row+(v.end.row-v.start.row)/2),column:Math.floor(v.start.column+(v.end.column-v.start.column)/2)};this.renderer.alignCursor(_,.5)},w.prototype.getCursorPosition=function(){return this.selection.getCursor()},w.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},w.prototype.getSelectionRange=function(){return this.selection.getRange()},w.prototype.selectAll=function(){this.selection.selectAll()},w.prototype.clearSelection=function(){this.selection.clearSelection()},w.prototype.moveCursorTo=function(v,_){this.selection.moveCursorTo(v,_)},w.prototype.moveCursorToPosition=function(v){this.selection.moveCursorToPosition(v)},w.prototype.jumpToMatching=function(v,_){var T=this.getCursorPosition(),W=new y(this.session,T.row,T.column),P=W.getCurrentToken(),z=0;P&&P.type.indexOf("tag-name")!==-1&&(P=W.stepBackward());var G=P||W.stepForward();if(G){var Y,J=!1,X={},K=T.column-G.start,Z,ee={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(G.value.match(/[{}()\[\]]/g)){for(;K1?X[G.value]++:P.value==="=0;--z)this.$tryReplace(T[z],v)&&W++;return this.selection.setSelectionRange(P),W},w.prototype.$tryReplace=function(v,_){var T=this.session.getTextRange(v);return _=this.$search.replace(T,_),_!==null?(v.end=this.session.replace(v,_),v):null},w.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},w.prototype.find=function(v,_,T){_||(_={}),typeof v=="string"||v instanceof RegExp?_.needle=v:typeof v=="object"&&b.mixin(_,v);var W=this.selection.getRange();_.needle==null&&(v=this.session.getTextRange(W)||this.$search.$options.needle,v||(W=this.session.getWordRange(W.start.row,W.start.column),v=this.session.getTextRange(W)),this.$search.set({needle:v})),this.$search.set(_),_.start||this.$search.set({start:W});var P=this.$search.find(this.session);if(_.preventScroll)return P;if(P)return this.revealRange(P,T),P;_.backwards?W.start=W.end:W.end=W.start,this.selection.setRange(W)},w.prototype.findNext=function(v,_){this.find({skipCurrent:!0,backwards:!1},v,_)},w.prototype.findPrevious=function(v,_){this.find(v,{skipCurrent:!0,backwards:!0},_)},w.prototype.revealRange=function(v,_){this.session.unfold(v),this.selection.setSelectionRange(v);var T=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(v.start,v.end,.5),_!==!1&&this.renderer.animateScrolling(T)},w.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},w.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(v){v.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},w.prototype.setAutoScrollEditorIntoView=function(v){if(v){var _,T=this,W=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var P=this.$scrollAnchor;P.style.cssText="position:absolute",this.container.insertBefore(P,this.container.firstChild);var z=this.on("changeSelection",function(){W=!0}),G=this.renderer.on("beforeRender",function(){W&&(_=T.renderer.container.getBoundingClientRect())}),Y=this.renderer.on("afterRender",function(){if(W&&_&&(T.isFocused()||T.searchBox&&T.searchBox.isFocused())){var J=T.renderer,X=J.$cursorLayer.$pixelPos,K=J.layerConfig,Z=X.top-K.offset;X.top>=0&&Z+_.top<0?W=!0:X.topwindow.innerHeight?W=!1:W=null,W!=null&&(P.style.top=Z+"px",P.style.left=X.left+"px",P.style.height=K.lineHeight+"px",P.scrollIntoView(W)),W=_=null}});this.setAutoScrollEditorIntoView=function(J){J||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",z),this.renderer.off("afterRender",Y),this.renderer.off("beforeRender",G))}}},w.prototype.$resetCursorStyle=function(){var v=this.$cursorStyle||"ace",_=this.renderer.$cursorLayer;_&&(_.setSmoothBlinking(/smooth/.test(v)),_.isBlinking=!this.$readOnly&&v!="wide",S.setCssClass(_.element,"ace_slim-cursors",/slim/.test(v)))},w.prototype.prompt=function(v,_,T){var W=this;$.loadModule("ace/ext/prompt",function(P){P.prompt(W,v,_,T)})},w}();E.$uid=0,E.prototype.curOp=null,E.prototype.prevOp={},E.prototype.$mergeableCommands=["backspace","del","insertstring"],E.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],b.implement(E.prototype,d),$.defineOptions(E.prototype,"editor",{selectionStyle:{set:function(w){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:w})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(w){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(w){this.textInput.setReadOnly(w),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(w){this.textInput.setCopyWithEmptySelection(w)},initialValue:!1},cursorStyle:{set:function(w){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(w){this.setAutoScrollEditorIntoView(w)}},keyboardHandler:{set:function(w){this.setKeyboardHandler(w)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(w){this.session.setValue(w)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(w){this.setSession(w)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(w){this.renderer.$gutterLayer.setShowLineNumbers(w),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),w&&this.$relativeLineNumbers?A.attach(this):A.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(w){this.$showLineNumbers&&w?A.attach(this):A.detach(this)}},placeholder:{set:function(w){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var v=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(v&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),S.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!v&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),S.addCssClass(this.container,"ace_hasPlaceholder");var _=S.createElement("div");_.className="ace_placeholder",_.textContent=this.$placeholder||"",this.renderer.placeholderNode=_,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!v&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(w){var v={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(W){W.blur(),W.renderer.scroller.focus()},readOnly:!0},_=function(W){if(W.target==this.renderer.scroller&&W.keyCode===F.enter){W.preventDefault();var P=this.getCursorPosition().row;this.isRowVisible(P)||this.scrollToLine(P,!0,!0),this.focus()}},T;w?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(h.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",O("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",O("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",_.bind(this)),this.commands.addCommand(v),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",O("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",O("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),T||(T=new M(this)),T.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",_.bind(this)),this.commands.removeCommand(v),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),T&&T.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(w){this.$textInputAriaLabel=w},initialValue:""},enableMobileMenu:{set:function(w){this.$enableMobileMenu=w},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var A={getText:function(w,v){return(Math.abs(w.selection.lead.row-v)||v+1+(v<9?"·":""))+""},getWidth:function(w,v,_){return Math.max(v.toString().length,(_.lastRow+1).toString().length,2)*_.characterWidth},update:function(w,v){v.renderer.$loop.schedule(v.renderer.CHANGE_GUTTER)},attach:function(w){w.renderer.$gutterLayer.$renderer=this,w.on("changeSelection",this.update),this.update(null,w)},detach:function(w){w.renderer.$gutterLayer.$renderer==this&&(w.renderer.$gutterLayer.$renderer=null),w.off("changeSelection",this.update),this.update(null,w)}};g.Editor=E}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(u,g,N){var k=u("../lib/dom"),b=function(){function S(l,h){this.element=l,this.canvasHeight=h||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return S.prototype.moveContainer=function(l){k.translate(this.element,0,-(l.firstRowScreen*l.lineHeight%this.canvasHeight)-l.offset*this.$offsetCoefficient)},S.prototype.pageChanged=function(l,h){return Math.floor(l.firstRowScreen*l.lineHeight/this.canvasHeight)!==Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)},S.prototype.computeLineTop=function(l,h,s){var r=h.firstRowScreen*h.lineHeight,o=Math.floor(r/this.canvasHeight),i=s.documentToScreenRow(l,0)*h.lineHeight;return i-o*this.canvasHeight},S.prototype.computeLineHeight=function(l,h,s){return h.lineHeight*s.getRowLineCount(l)},S.prototype.getLength=function(){return this.cells.length},S.prototype.get=function(l){return this.cells[l]},S.prototype.shift=function(){this.$cacheCell(this.cells.shift())},S.prototype.pop=function(){this.$cacheCell(this.cells.pop())},S.prototype.push=function(l){if(Array.isArray(l)){this.cells.push.apply(this.cells,l);for(var h=k.createFragment(this.element),s=0;sR&&(m=p.end.row+1,p=a.getNextFoldLine(m,p),R=p?p.start.row:1/0),m>d){for(;this.$lines.getLength()>y+1;)this.$lines.pop();break}$=this.$lines.get(++y),$?$.row=m:($=this.$lines.createCell(m,n,this.session,o),this.$lines.push($)),this.$renderCell($,n,p,m),m++}this._signal("afterRender"),this.$updateGutterWidth(n)},i.prototype.$updateGutterWidth=function(n){var a=this.session,c=a.gutterRenderer||this.$renderer,d=a.$firstLineNumber,p=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||a.$useWrapMode)&&(p=a.getLength()+d-1);var R=c?c.getWidth(a,p,n):p.toString().length*n.characterWidth,$=this.$padding||this.$computePadding();R+=$.left+$.right,R!==this.gutterWidth&&!isNaN(R)&&(this.gutterWidth=R,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",R))},i.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var n=this.session.selection.getCursor();this.$cursorRow!==n.row&&(this.$cursorRow=n.row)}},i.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var n=this.session.selection.cursor.row;if(this.$cursorRow=n,!(this.$cursorCell&&this.$cursorCell.row==n)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var a=this.$lines.cells;this.$cursorCell=null;for(var c=0;c=this.$cursorRow){if(d.row>this.$cursorRow){var p=this.session.getFoldLine(this.$cursorRow);if(c>0&&p&&p.start.row==a[c-1].row)d=a[c-1];else break}d.element.className="ace_gutter-active-line "+d.element.className,this.$cursorCell=d;break}}}}},i.prototype.scrollLines=function(n){var a=this.config;if(this.config=n,this.$updateCursorRow(),this.$lines.pageChanged(a,n))return this.update(n);this.$lines.moveContainer(n);var c=Math.min(n.lastRow+n.gutterOffset,this.session.getLength()-1),d=this.oldLastRow;if(this.oldLastRow=c,!a||d0;p--)this.$lines.shift();if(d>c)for(var p=this.session.getFoldedRowCount(c+1,d);p>0;p--)this.$lines.pop();n.firstRowd&&this.$lines.push(this.$renderLines(n,d+1,c)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(n)},i.prototype.$renderLines=function(n,a,c){for(var d=[],p=a,R=this.session.getNextFoldLine(p),$=R?R.start.row:1/0;p>$&&(p=R.end.row+1,R=this.session.getNextFoldLine(p,R),$=R?R.start.row:1/0),!(p>c);){var y=this.$lines.createCell(p,n,this.session,o);this.$renderCell(y,n,R,p),d.push(y),p++}return d},i.prototype.$renderCell=function(n,a,c,d){var p=n.element,R=this.session,$=p.childNodes[0],y=p.childNodes[1],m=p.childNodes[2],M=m.firstChild,O=R.$firstLineNumber,L=R.$breakpoints,F=R.$decorations,E=R.gutterRenderer||this.$renderer,A=this.$showFoldWidgets&&R.foldWidgets,w=c?c.start.row:Number.MAX_VALUE,v=a.lineHeight+"px",_=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",T=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",W=(E?E.getText(R,d):d+O).toString();if(this.$highlightGutterLine&&(d==this.$cursorRow||c&&d=w&&this.$cursorRow<=c.end.row)&&(_+="ace_gutter-active-line ",this.$cursorCell!=n&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=n)),L[d]&&(_+=L[d]),F[d]&&(_+=F[d]),this.$annotations[d]&&d!==w&&(_+=this.$annotations[d].className),A){var P=A[d];P==null&&(P=A[d]=R.getFoldWidget(d))}if(P){var z="ace_fold-widget ace_"+P,G=P=="start"&&d==w&&dc.right-a.right)return"foldWidgets"},i}();r.prototype.$fixedWidth=!1,r.prototype.$highlightGutterLine=!0,r.prototype.$renderer="",r.prototype.$showLineNumbers=!0,r.prototype.$showFoldWidgets=!0,b.implement(r.prototype,l);function o(i){var n=document.createTextNode("");i.appendChild(n);var a=k.createElement("span");i.appendChild(a);var c=k.createElement("span");i.appendChild(c);var d=k.createElement("span");return c.appendChild(d),i}g.Gutter=r}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(u,g,N){var k=u("../range").Range,b=u("../lib/dom"),S=function(){function h(s){this.element=b.createElement("div"),this.element.className="ace_layer ace_marker-layer",s.appendChild(this.element)}return h.prototype.setPadding=function(s){this.$padding=s},h.prototype.setSession=function(s){this.session=s},h.prototype.setMarkers=function(s){this.markers=s},h.prototype.elt=function(s,r){var o=this.i!=-1&&this.element.childNodes[this.i];o?this.i++:(o=document.createElement("div"),this.element.appendChild(o),this.i=-1),o.style.cssText=r,o.className=s},h.prototype.update=function(s){if(s){this.config=s,this.i=0;var r;for(var o in this.markers){var i=this.markers[o];if(!i.range){i.update(r,this,this.session,s);continue}var n=i.range.clipRows(s.firstRow,s.lastRow);if(!n.isEmpty())if(n=n.toScreenRange(this.session),i.renderer){var a=this.$getTop(n.start.row,s),c=this.$padding+n.start.column*s.characterWidth;i.renderer(r,n,c,a,s)}else i.type=="fullLine"?this.drawFullLineMarker(r,n,i.clazz,s):i.type=="screenLine"?this.drawScreenLineMarker(r,n,i.clazz,s):n.isMultiLine()?i.type=="text"?this.drawTextMarker(r,n,i.clazz,s):this.drawMultiLineMarker(r,n,i.clazz,s):this.drawSingleLineMarker(r,n,i.clazz+" ace_start ace_br15",s)}if(this.i!=-1)for(;this.iy,p==d),i,p==d?0:1,n)},h.prototype.drawMultiLineMarker=function(s,r,o,i,n){var a=this.$padding,c=i.lineHeight,d=this.$getTop(r.start.row,i),p=a+r.start.column*i.characterWidth;if(n=n||"",this.session.$bidiHandler.isBidiRow(r.start.row)){var R=r.clone();R.end.row=R.start.row,R.end.column=this.session.getLine(R.start.row).length,this.drawBidiSingleLineMarker(s,R,o+" ace_br1 ace_start",i,null,n)}else this.elt(o+" ace_br1 ace_start","height:"+c+"px;right:0;top:"+d+"px;left:"+p+"px;"+(n||""));if(this.session.$bidiHandler.isBidiRow(r.end.row)){var R=r.clone();R.start.row=R.end.row,R.start.column=0,this.drawBidiSingleLineMarker(s,R,o+" ace_br12",i,null,n)}else{d=this.$getTop(r.end.row,i);var $=r.end.column*i.characterWidth;this.elt(o+" ace_br12","height:"+c+"px;width:"+$+"px;top:"+d+"px;left:"+a+"px;"+(n||""))}if(c=(r.end.row-r.start.row-1)*i.lineHeight,!(c<=0)){d=this.$getTop(r.start.row+1,i);var y=(r.start.column?1:0)|(r.end.column?0:8);this.elt(o+(y?" ace_br"+y:""),"height:"+c+"px;right:0;top:"+d+"px;left:"+a+"px;"+(n||""))}},h.prototype.drawSingleLineMarker=function(s,r,o,i,n,a){if(this.session.$bidiHandler.isBidiRow(r.start.row))return this.drawBidiSingleLineMarker(s,r,o,i,n,a);var c=i.lineHeight,d=(r.end.column+(n||0)-r.start.column)*i.characterWidth,p=this.$getTop(r.start.row,i),R=this.$padding+r.start.column*i.characterWidth;this.elt(o,"height:"+c+"px;width:"+d+"px;top:"+p+"px;left:"+R+"px;"+(a||""))},h.prototype.drawBidiSingleLineMarker=function(s,r,o,i,n,a){var c=i.lineHeight,d=this.$getTop(r.start.row,i),p=this.$padding,R=this.session.$bidiHandler.getSelections(r.start.column,r.end.column);R.forEach(function($){this.elt(o,"height:"+c+"px;width:"+($.width+(n||0))+"px;top:"+d+"px;left:"+(p+$.left)+"px;"+(a||""))},this)},h.prototype.drawFullLineMarker=function(s,r,o,i,n){var a=this.$getTop(r.start.row,i),c=i.lineHeight;r.start.row!=r.end.row&&(c+=this.$getTop(r.end.row,i)-a),this.elt(o,"height:"+c+"px;top:"+a+"px;left:0;right:0;"+(n||""))},h.prototype.drawScreenLineMarker=function(s,r,o,i,n){var a=this.$getTop(r.start.row,i),c=i.lineHeight;this.elt(o,"height:"+c+"px;top:"+a+"px;left:0;right:0;"+(n||""))},h}();S.prototype.$padding=0;function l(h,s,r,o){return(h?1:0)|(s?2:0)|(r?4:0)|(o?8:0)}g.Marker=S}),ace.define("ace/layer/text_util",["require","exports","module"],function(u,g,N){var k=new Set(["text","rparen","lparen"]);g.isTextToken=function(b){return k.has(b)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(u,g,N){var k=u("../lib/oop"),b=u("../lib/dom"),S=u("../lib/lang"),l=u("./lines").Lines,h=u("../lib/event_emitter").EventEmitter,s=u("../config").nls,r=u("./text_util").isTextToken,o=function(){function i(n){this.dom=b,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",n.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new l(this.element)}return i.prototype.$updateEolChar=function(){var n=this.session.doc,a=n.getNewLineCharacter()==` +`&&n.getNewLineMode()!="windows",c=a?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=c)return this.EOL_CHAR=c,!0},i.prototype.setPadding=function(n){this.$padding=n,this.element.style.margin="0 "+n+"px"},i.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},i.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},i.prototype.$setFontMetrics=function(n){this.$fontMetrics=n,this.$fontMetrics.on("changeCharacterSize",(function(a){this._signal("changeCharacterSize",a)}).bind(this)),this.$pollSizeChanges()},i.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},i.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},i.prototype.setSession=function(n){this.session=n,n&&this.$computeTabString()},i.prototype.setShowInvisibles=function(n){return this.showInvisibles==n?!1:(this.showInvisibles=n,typeof n=="string"?(this.showSpaces=/tab/i.test(n),this.showTabs=/space/i.test(n),this.showEOL=/eol/i.test(n)):this.showSpaces=this.showTabs=this.showEOL=n,this.$computeTabString(),!0)},i.prototype.setDisplayIndentGuides=function(n){return this.displayIndentGuides==n?!1:(this.displayIndentGuides=n,this.$computeTabString(),!0)},i.prototype.setHighlightIndentGuides=function(n){return this.$highlightIndentGuides===n?!1:(this.$highlightIndentGuides=n,n)},i.prototype.$computeTabString=function(){var n=this.session.getTabSize();this.tabSize=n;for(var a=this.$tabStrings=[0],c=1;cO&&(m=M.end.row+1,M=this.session.getNextFoldLine(m,M),O=M?M.start.row:1/0),!(m>p);){var L=R[$++];if(L){this.dom.removeChildren(L),this.$renderLine(L,m,m==O?M:!1),y&&(L.style.top=this.$lines.computeLineTop(m,n,this.session)+"px");var F=n.lineHeight*this.session.getRowLength(m)+"px";L.style.height!=F&&(y=!0,L.style.height=F)}m++}if(y)for(;$0;p--)this.$lines.shift();if(a.lastRow>n.lastRow)for(var p=this.session.getFoldedRowCount(n.lastRow+1,a.lastRow);p>0;p--)this.$lines.pop();n.firstRowa.lastRow&&this.$lines.push(this.$renderLinesFragment(n,a.lastRow+1,n.lastRow)),this.$highlightIndentGuide()},i.prototype.$renderLinesFragment=function(n,a,c){for(var d=[],p=a,R=this.session.getNextFoldLine(p),$=R?R.start.row:1/0;p>$&&(p=R.end.row+1,R=this.session.getNextFoldLine(p,R),$=R?R.start.row:1/0),!(p>c);){var y=this.$lines.createCell(p,n,this.session),m=y.element;this.dom.removeChildren(m),b.setStyle(m.style,"height",this.$lines.computeLineHeight(p,n,this.session)+"px"),b.setStyle(m.style,"top",this.$lines.computeLineTop(p,n,this.session)+"px"),this.$renderLine(m,p,p==$?R:!1),this.$useLineGroups()?m.className="ace_line_group":m.className="ace_line",d.push(y),p++}return d},i.prototype.update=function(n){this.$lines.moveContainer(n),this.config=n;for(var a=n.firstRow,c=n.lastRow,d=this.$lines;d.getLength();)d.pop();d.push(this.$renderLinesFragment(n,a,c))},i.prototype.$renderToken=function(n,a,c,d){for(var p=this,R=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,$=this.dom.createFragment(this.element),y,m=0;y=R.exec(d);){var M=y[1],O=y[2],L=y[3],F=y[4],E=y[5];if(!(!p.showSpaces&&O)){var A=m!=y.index?d.slice(m,y.index):"";if(m=y.index+y[0].length,A&&$.appendChild(this.dom.createTextNode(A,this.element)),M){var w=p.session.getScreenTabSize(a+y.index);$.appendChild(p.$tabStrings[w].cloneNode(!0)),a+=w-1}else if(O)if(p.showSpaces){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space",v.textContent=S.stringRepeat(p.SPACE_CHAR,O.length),$.appendChild(v)}else $.appendChild(this.dom.createTextNode(O,this.element));else if(L){var v=this.dom.createElement("span");v.className="ace_invisible ace_invisible_space ace_invalid",v.textContent=S.stringRepeat(p.SPACE_CHAR,L.length),$.appendChild(v)}else if(F){a+=1;var v=this.dom.createElement("span");v.style.width=p.config.characterWidth*2+"px",v.className=p.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",v.textContent=p.showSpaces?p.SPACE_CHAR:F,$.appendChild(v)}else if(E){a+=1;var v=this.dom.createElement("span");v.style.width=p.config.characterWidth*2+"px",v.className="ace_cjk",v.textContent=E,$.appendChild(v)}}}if($.appendChild(this.dom.createTextNode(m?d.slice(m):d,this.element)),r(c.type))n.appendChild($);else{var _="ace_"+c.type.replace(/\./g," ace_"),v=this.dom.createElement("span");c.type=="fold"&&(v.style.width=c.value.length*this.config.characterWidth+"px",v.setAttribute("title",s("inline-fold.closed.title","Unfold code"))),v.className=_,v.appendChild($),n.appendChild(v)}return a+d.length},i.prototype.renderIndentGuide=function(n,a,c){var d=a.search(this.$indentGuideRe);if(d<=0||d>=c)return a;if(a[0]==" "){d-=d%this.tabSize;for(var p=d/this.tabSize,R=0;RR[$].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&n[a.row]!==""&&a.column===n[a.row].length){this.$highlightIndentGuideMarker.dir=1;for(var $=a.row+1;$0){for(var p=0;p=this.$highlightIndentGuideMarker.start+1){if(d.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(d,a)}}else for(var c=n.length-1;c>=0;c--){var d=n[c];if(this.$highlightIndentGuideMarker.end&&d.row=R;)$=this.$renderToken(y,$,M,O.substring(0,R-d)),O=O.substring(R-d),d=R,y=this.$createLineElement(),n.appendChild(y),y.appendChild(this.dom.createTextNode(S.stringRepeat(" ",c.indent),this.element)),p++,$=0,R=c[p]||Number.MAX_VALUE;O.length!=0&&(d+=O.length,$=this.$renderToken(y,$,M,O))}}c[c.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(y,$,null,"",!0)},i.prototype.$renderSimpleLine=function(n,a){for(var c=0,d=0;dthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(n,c,p,R);c=this.$renderToken(n,c,p,R)}}},i.prototype.$renderOverflowMessage=function(n,a,c,d,p){c&&this.$renderToken(n,a,c,d.slice(0,this.MAX_LINE_LENGTH-a));var R=this.dom.createElement("span");R.className="ace_inline_button ace_keyword ace_toggle_wrap",R.textContent=p?"":"",n.appendChild(R)},i.prototype.$renderLine=function(n,a,c){if(!c&&c!=!1&&(c=this.session.getFoldLine(a)),c)var d=this.$getFoldLineTokens(a,c);else var d=this.session.getTokens(a);var p=n;if(d.length){var R=this.session.getRowSplitData(a);if(R&&R.length){this.$renderWrappedLine(n,d,R);var p=n.lastChild}else{var p=n;this.$useLineGroups()&&(p=this.$createLineElement(),n.appendChild(p)),this.$renderSimpleLine(p,d)}}else this.$useLineGroups()&&(p=this.$createLineElement(),n.appendChild(p));if(this.showEOL&&p){c&&(a=c.end.row);var $=this.dom.createElement("span");$.className="ace_invisible ace_invisible_eol",$.textContent=a==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,p.appendChild($)}},i.prototype.$getFoldLineTokens=function(n,a){var c=this.session,d=[];function p($,y,m){for(var M=0,O=0;O+$[M].value.lengthm-y&&(L=L.substring(0,m-y)),d.push({type:$[M].type,value:L}),O=y+L.length,M+=1}for(;Om?d.push({type:$[M].type,value:L.substring(0,m-O)}):d.push($[M]),O+=L.length,M+=1}}var R=c.getTokens(n);return a.walk(function($,y,m,M,O){$!=null?d.push({type:"fold",value:$}):(O&&(R=c.getTokens(y)),R.length&&p(R,M,m))},a.end.row,this.session.getLine(a.end.row).length),d},i.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},i}();o.prototype.EOF_CHAR="¶",o.prototype.EOL_CHAR_LF="¬",o.prototype.EOL_CHAR_CRLF="¤",o.prototype.EOL_CHAR=o.prototype.EOL_CHAR_LF,o.prototype.TAB_CHAR="—",o.prototype.SPACE_CHAR="·",o.prototype.$padding=0,o.prototype.MAX_LINE_LENGTH=1e4,o.prototype.showInvisibles=!1,o.prototype.showSpaces=!1,o.prototype.showTabs=!1,o.prototype.showEOL=!1,o.prototype.displayIndentGuides=!0,o.prototype.$highlightIndentGuides=!0,o.prototype.$tabStrings=[],o.prototype.destroy={},o.prototype.onChangeTabSize=o.prototype.$computeTabString,k.implement(o.prototype,h),g.Text=o}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(u,g,N){var k=u("../lib/dom"),b=function(){function S(l){this.element=k.createElement("div"),this.element.className="ace_layer ace_cursor-layer",l.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),k.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return S.prototype.$updateOpacity=function(l){for(var h=this.cursors,s=h.length;s--;)k.setStyle(h[s].style,"opacity",l?"":"0")},S.prototype.$startCssAnimation=function(){for(var l=this.cursors,h=l.length;h--;)l[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&k.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},S.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,k.removeCssClass(this.element,"ace_animate-blinking")},S.prototype.setPadding=function(l){this.$padding=l},S.prototype.setSession=function(l){this.session=l},S.prototype.setBlinking=function(l){l!=this.isBlinking&&(this.isBlinking=l,this.restartTimer())},S.prototype.setBlinkInterval=function(l){l!=this.blinkInterval&&(this.blinkInterval=l,this.restartTimer())},S.prototype.setSmoothBlinking=function(l){l!=this.smoothBlinking&&(this.smoothBlinking=l,k.setCssClass(this.element,"ace_smooth-blinking",l),this.$updateCursors(!0),this.restartTimer())},S.prototype.addCursor=function(){var l=k.createElement("div");return l.className="ace_cursor",this.element.appendChild(l),this.cursors.push(l),l},S.prototype.removeCursor=function(){if(this.cursors.length>1){var l=this.cursors.pop();return l.parentNode.removeChild(l),l}},S.prototype.hideCursor=function(){this.isVisible=!1,k.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},S.prototype.showCursor=function(){this.isVisible=!0,k.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},S.prototype.restartTimer=function(){var l=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,k.removeCssClass(this.element,"ace_smooth-blinking")),l(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&k.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),k.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var h=(function(){this.timeoutId=setTimeout(function(){l(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){l(!0),h()},this.blinkInterval),h()}},S.prototype.getPixelPosition=function(l,h){if(!this.config||!this.session)return{left:0,top:0};l||(l=this.session.selection.getCursor());var s=this.session.documentToScreenPosition(l),r=this.$padding+(this.session.$bidiHandler.isBidiRow(s.row,l.row)?this.session.$bidiHandler.getPosLeft(s.column):s.column*this.config.characterWidth),o=(s.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:r,top:o}},S.prototype.isCursorInView=function(l,h){return l.top>=0&&l.topl.height+l.offset||i.top<0)&&s>1)){var n=this.cursors[r++]||this.addCursor(),a=n.style;this.drawCursor?this.drawCursor(n,i,l,h[s],this.session):this.isCursorInView(i,l)?(k.setStyle(a,"display","block"),k.translate(n,i.left,i.top),k.setStyle(a,"width",Math.round(l.characterWidth)+"px"),k.setStyle(a,"height",l.lineHeight+"px")):k.setStyle(a,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=i,this.restartTimer()},S.prototype.$setOverwrite=function(l){l!=this.overwrite&&(this.overwrite=l,l?k.addCssClass(this.element,"ace_overwrite-cursors"):k.removeCssClass(this.element,"ace_overwrite-cursors"))},S.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},S}();b.prototype.$padding=0,b.prototype.drawCursor=null,g.Cursor=b}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(u,g,N){var k=this&&this.__extends||function(){var n=function(a,c){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,p){d.__proto__=p}||function(d,p){for(var R in p)Object.prototype.hasOwnProperty.call(p,R)&&(d[R]=p[R])},n(a,c)};return function(a,c){if(typeof c!="function"&&c!==null)throw new TypeError("Class extends value "+String(c)+" is not a constructor or null");n(a,c);function d(){this.constructor=a}a.prototype=c===null?Object.create(c):(d.prototype=c.prototype,new d)}}(),b=u("./lib/oop"),S=u("./lib/dom"),l=u("./lib/event"),h=u("./lib/event_emitter").EventEmitter,s=32768,r=function(){function n(a,c){this.element=S.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+c,this.inner=S.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),a.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addListener(this.element,"scroll",this.onScroll.bind(this)),l.addListener(this.element,"mousedown",l.preventDefault)}return n.prototype.setVisible=function(a){this.element.style.display=a?"":"none",this.isVisible=a,this.coeff=1},n}();b.implement(r.prototype,h);var o=function(n){k(a,n);function a(c,d){var p=n.call(this,c,"-v")||this;return p.scrollTop=0,p.scrollHeight=0,d.$scrollbarWidth=p.width=S.scrollbarWidth(c.ownerDocument),p.inner.style.width=p.element.style.width=(p.width||15)+5+"px",p.$minWidth=0,p}return a.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var c=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-c)/(this.coeff-c)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},a.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},a.prototype.setHeight=function(c){this.element.style.height=c+"px"},a.prototype.setScrollHeight=function(c){this.scrollHeight=c,c>s?(this.coeff=s/c,c=s):this.coeff!=1&&(this.coeff=1),this.inner.style.height=c+"px"},a.prototype.setScrollTop=function(c){this.scrollTop!=c&&(this.skipEvent=!0,this.scrollTop=c,this.element.scrollTop=c*this.coeff)},a}(r);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var i=function(n){k(a,n);function a(c,d){var p=n.call(this,c,"-h")||this;return p.scrollLeft=0,p.height=d.$scrollbarWidth,p.inner.style.height=p.element.style.height=(p.height||15)+5+"px",p}return a.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},a.prototype.getHeight=function(){return this.isVisible?this.height:0},a.prototype.setWidth=function(c){this.element.style.width=c+"px"},a.prototype.setInnerWidth=function(c){this.inner.style.width=c+"px"},a.prototype.setScrollWidth=function(c){this.inner.style.width=c+"px"},a.prototype.setScrollLeft=function(c){this.scrollLeft!=c&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=c)},a}(r);g.ScrollBar=o,g.ScrollBarV=o,g.ScrollBarH=i,g.VScrollBar=o,g.HScrollBar=i}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(u,g,N){var k=this&&this.__extends||function(){var i=function(n,a){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,d){c.__proto__=d}||function(c,d){for(var p in d)Object.prototype.hasOwnProperty.call(d,p)&&(c[p]=d[p])},i(n,a)};return function(n,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");i(n,a);function c(){this.constructor=n}n.prototype=a===null?Object.create(a):(c.prototype=a.prototype,new c)}}(),b=u("./lib/oop"),S=u("./lib/dom"),l=u("./lib/event"),h=u("./lib/event_emitter").EventEmitter;S.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ + position: absolute; + background: rgba(128, 128, 128, 0.6); + -moz-box-sizing: border-box; + box-sizing: border-box; + border: 1px solid #bbb; + border-radius: 2px; + z-index: 8; +} +.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { + position: absolute; + z-index: 6; + background: none; + overflow: hidden!important; +} +.ace_editor>.ace_sb-v { + z-index: 6; + right: 0; + top: 0; + width: 12px; +} +.ace_editor>.ace_sb-v div { + z-index: 8; + right: 0; + width: 100%; +} +.ace_editor>.ace_sb-h { + bottom: 0; + left: 0; + height: 12px; +} +.ace_editor>.ace_sb-h div { + bottom: 0; + height: 100%; +} +.ace_editor>.ace_sb_grabbed { + z-index: 8; + background: #000; +}`,"ace_scrollbar.css",!1);var s=function(){function i(n,a){this.element=S.createElement("div"),this.element.className="ace_sb"+a,this.inner=S.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,l.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return i.prototype.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1},i}();b.implement(s.prototype,h);var r=function(i){k(n,i);function n(a,c){var d=i.call(this,a,"-v")||this;return d.scrollTop=0,d.scrollHeight=0,d.parent=a,d.width=d.VScrollWidth,d.renderer=c,d.inner.style.width=d.element.style.width=(d.width||15)+"px",d.$minWidth=0,d}return n.prototype.onMouseDown=function(a,c){if(a==="mousedown"&&!(l.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var d=this,p=c.clientY,R=function(F){p=F.clientY},$=function(){clearInterval(O)},y=c.clientY,m=this.thumbTop,M=function(){if(p!==void 0){var F=d.scrollTopFromThumbTop(m+p-y);F!==d.scrollTop&&d._emit("scroll",{data:F})}};l.capture(this.inner,R,$);var O=setInterval(M,20);return l.preventDefault(c)}var L=c.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(L)}),l.preventDefault(c)}},n.prototype.getHeight=function(){return this.height},n.prototype.scrollTopFromThumbTop=function(a){var c=a*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return c=c>>0,c<0?c=0:c>this.pageHeight-this.viewHeight&&(c=this.pageHeight-this.viewHeight),c},n.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},n.prototype.setHeight=function(a){this.height=Math.max(0,a),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},n.prototype.setScrollHeight=function(a,c){this.pageHeight===a&&!c||(this.pageHeight=a,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},n.prototype.setScrollTop=function(a){this.scrollTop=a,a<0&&(a=0),this.thumbTop=a*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},n}(s);r.prototype.setInnerHeight=r.prototype.setScrollHeight;var o=function(i){k(n,i);function n(a,c){var d=i.call(this,a,"-h")||this;return d.scrollLeft=0,d.scrollWidth=0,d.height=d.HScrollHeight,d.inner.style.height=d.element.style.height=(d.height||12)+"px",d.renderer=c,d}return n.prototype.onMouseDown=function(a,c){if(a==="mousedown"&&!(l.getButton(c)!==0||c.detail===2)){if(c.target===this.inner){var d=this,p=c.clientX,R=function(F){p=F.clientX},$=function(){clearInterval(O)},y=c.clientX,m=this.thumbLeft,M=function(){if(p!==void 0){var F=d.scrollLeftFromThumbLeft(m+p-y);F!==d.scrollLeft&&d._emit("scroll",{data:F})}};l.capture(this.inner,R,$);var O=setInterval(M,20);return l.preventDefault(c)}var L=c.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(L)}),l.preventDefault(c)}},n.prototype.getHeight=function(){return this.isVisible?this.height:0},n.prototype.scrollLeftFromThumbLeft=function(a){var c=a*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return c=c>>0,c<0?c=0:c>this.pageWidth-this.viewWidth&&(c=this.pageWidth-this.viewWidth),c},n.prototype.setWidth=function(a){this.width=Math.max(0,a),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},n.prototype.setScrollWidth=function(a,c){this.pageWidth===a&&!c||(this.pageWidth=a,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},n.prototype.setScrollLeft=function(a){this.scrollLeft=a,a<0&&(a=0),this.thumbLeft=a*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},n}(s);o.prototype.setInnerWidth=o.prototype.setScrollWidth,g.ScrollBar=r,g.ScrollBarV=r,g.ScrollBarH=o,g.VScrollBar=r,g.HScrollBar=o}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(u,g,N){var k=u("./lib/event"),b=function(){function S(l,h){this.onRender=l,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var s=this;this._flush=function(r){s.pending=!1;var o=s.changes;if(o&&(k.blockIdle(100),s.changes=0,s.onRender(o)),s.changes){if(s.$recursionLimit--<0)return;s.schedule()}else s.$recursionLimit=2}}return S.prototype.schedule=function(l){this.changes=this.changes|l,this.changes&&!this.pending&&(k.nextFrame(this._flush),this.pending=!0)},S.prototype.clear=function(l){var h=this.changes;return this.changes=0,h},S}();g.RenderLoop=b}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(u,g,N){var k=u("../lib/oop"),b=u("../lib/dom"),S=u("../lib/lang"),l=u("../lib/event"),h=u("../lib/useragent"),s=u("../lib/event_emitter").EventEmitter,r=512,o=typeof ResizeObserver=="function",i=200,n=function(){function a(c){this.el=b.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=b.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=b.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),c.appendChild(this.el),this.$measureNode.textContent=S.stringRepeat("X",r),this.$characterSize={width:0,height:0},o?this.$addObserver():this.checkForSizeChanges()}return a.prototype.$setMeasureNodeStyles=function(c,d){c.width=c.height="auto",c.left=c.top="0px",c.visibility="hidden",c.position="absolute",c.whiteSpace="pre",h.isIE<8?c["font-family"]="inherit":c.font="inherit",c.overflow=d?"hidden":"visible"},a.prototype.checkForSizeChanges=function(c){if(c===void 0&&(c=this.$measureSizes()),c&&(this.$characterSize.width!==c.width||this.$characterSize.height!==c.height)){this.$measureNode.style.fontWeight="bold";var d=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=c,this.charSizes=Object.create(null),this.allowBoldFonts=d&&d.width===c.width&&d.height===c.height,this._emit("changeCharacterSize",{data:c})}},a.prototype.$addObserver=function(){var c=this;this.$observer=new window.ResizeObserver(function(d){c.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},a.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var c=this;return this.$pollSizeChangesTimer=l.onIdle(function d(){c.checkForSizeChanges(),l.onIdle(d,500)},500)},a.prototype.setPolling=function(c){c?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},a.prototype.$measureSizes=function(c){var d={height:(c||this.$measureNode).clientHeight,width:(c||this.$measureNode).clientWidth/r};return d.width===0||d.height===0?null:d},a.prototype.$measureCharWidth=function(c){this.$main.textContent=S.stringRepeat(c,r);var d=this.$main.getBoundingClientRect();return d.width/r},a.prototype.getCharacterWidth=function(c){var d=this.charSizes[c];return d===void 0&&(d=this.charSizes[c]=this.$measureCharWidth(c)/this.$characterSize.width),d},a.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},a.prototype.$getZoom=function(c){return!c||!c.parentElement?1:(Number(window.getComputedStyle(c).zoom)||1)*this.$getZoom(c.parentElement)},a.prototype.$initTransformMeasureNodes=function(){var c=function(d,p){return["div",{style:"position: absolute;top:"+d+"px;left:"+p+"px;"}]};this.els=b.buildDom([c(0,0),c(i,0),c(0,i),c(i,i)],this.el)},a.prototype.transformCoordinates=function(c,d){if(c){var p=this.$getZoom(this.el);c=m(1/p,c)}function R(G,Y,J){var X=G[1]*Y[0]-G[0]*Y[1];return[(-Y[1]*J[0]+Y[0]*J[1])/X,(+G[1]*J[0]-G[0]*J[1])/X]}function $(G,Y){return[G[0]-Y[0],G[1]-Y[1]]}function y(G,Y){return[G[0]+Y[0],G[1]+Y[1]]}function m(G,Y){return[G*Y[0],G*Y[1]]}this.els||this.$initTransformMeasureNodes();function M(G){var Y=G.getBoundingClientRect();return[Y.left,Y.top]}var O=M(this.els[0]),L=M(this.els[1]),F=M(this.els[2]),E=M(this.els[3]),A=R($(E,L),$(E,F),$(y(L,F),y(E,O))),w=m(1+A[0],$(L,O)),v=m(1+A[1],$(F,O));if(d){var _=d,T=A[0]*_[0]/i+A[1]*_[1]/i+1,W=y(m(_[0],w),m(_[1],v));return y(m(1/T/i,W),O)}var P=$(c,O),z=R($(w,m(A[0],P)),$(v,m(A[1],P)),P);return m(i,z)},a}();n.prototype.$characterSize={width:0,height:0},k.implement(n.prototype,s),g.FontMetrics=n}),ace.define("ace/css/editor-css",["require","exports","module"],function(u,g,N){N.exports=` +.ace_br1 {border-top-left-radius : 3px;} +.ace_br2 {border-top-right-radius : 3px;} +.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} +.ace_br4 {border-bottom-right-radius: 3px;} +.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} +.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} +.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} +.ace_br8 {border-bottom-left-radius : 3px;} +.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} +.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} +.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} +.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} + + +.ace_editor { + position: relative; + overflow: hidden; + padding: 0; + font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; + direction: ltr; + text-align: left; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +.ace_scroller { + position: absolute; + overflow: hidden; + top: 0; + bottom: 0; + background-color: inherit; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + cursor: text; +} + +.ace_content { + position: absolute; + box-sizing: border-box; + min-width: 100%; + contain: style size layout; + font-variant-ligatures: no-common-ligatures; +} + +.ace_keyboard-focus:focus { + box-shadow: inset 0 0 0 2px #5E9ED6; + outline: none; +} + +.ace_dragging .ace_scroller:before{ + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + content: ''; + background: rgba(250, 250, 250, 0.01); + z-index: 1000; +} +.ace_dragging.ace_dark .ace_scroller:before{ + background: rgba(0, 0, 0, 0.01); +} + +.ace_gutter { + position: absolute; + overflow : hidden; + width: auto; + top: 0; + bottom: 0; + left: 0; + cursor: default; + z-index: 4; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + contain: style size layout; +} + +.ace_gutter-active-line { + position: absolute; + left: 0; + right: 0; +} + +.ace_scroller.ace_scroll-left:after { + content: ""; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; + pointer-events: none; +} + +.ace_gutter-cell, .ace_gutter-cell_svg-icons { + position: absolute; + top: 0; + left: 0; + right: 0; + padding-left: 19px; + padding-right: 6px; + background-repeat: no-repeat; +} + +.ace_gutter-cell_svg-icons .ace_gutter_annotation { + margin-left: -14px; + float: left; +} + +.ace_gutter-cell .ace_gutter_annotation { + margin-left: -19px; + float: left; +} + +.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: 2px center; +} + +.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: 2px center; +} + +.ace_gutter-cell.ace_info, .ace_icon.ace_info { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); + background-repeat: no-repeat; + background-position: 2px center; +} +.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); +} + +.ace_icon_svg.ace_error { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); + background-color: crimson; +} +.ace_icon_svg.ace_warning { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); + background-color: darkorange; +} +.ace_icon_svg.ace_info { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); + background-color: royalblue; +} + +.ace_icon_svg.ace_error_fold { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); + background-color: crimson; +} +.ace_icon_svg.ace_warning_fold { + -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); + background-color: darkorange; +} + +.ace_scrollbar { + contain: strict; + position: absolute; + right: 0; + bottom: 0; + z-index: 6; +} + +.ace_scrollbar-inner { + position: absolute; + cursor: text; + left: 0; + top: 0; +} + +.ace_scrollbar-v{ + overflow-x: hidden; + overflow-y: scroll; + top: 0; +} + +.ace_scrollbar-h { + overflow-x: scroll; + overflow-y: hidden; + left: 0; +} + +.ace_print-margin { + position: absolute; + height: 100%; +} + +.ace_text-input { + position: absolute; + z-index: 0; + width: 0.5em; + height: 1em; + opacity: 0; + background: transparent; + -moz-appearance: none; + appearance: none; + border: none; + resize: none; + outline: none; + overflow: hidden; + font: inherit; + padding: 0 1px; + margin: 0 -1px; + contain: strict; + -ms-user-select: text; + -moz-user-select: text; + -webkit-user-select: text; + user-select: text; + /*with \`pre-line\` chrome inserts   instead of space*/ + white-space: pre!important; +} +.ace_text-input.ace_composition { + background: transparent; + color: inherit; + z-index: 1000; + opacity: 1; +} +.ace_composition_placeholder { color: transparent } +.ace_composition_marker { + border-bottom: 1px solid; + position: absolute; + border-radius: 0; + margin-top: 1px; +} + +[ace_nocontext=true] { + transform: none!important; + filter: none!important; + clip-path: none!important; + mask : none!important; + contain: none!important; + perspective: none!important; + mix-blend-mode: initial!important; + z-index: auto; +} + +.ace_layer { + z-index: 1; + position: absolute; + overflow: hidden; + /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ + word-wrap: normal; + white-space: pre; + height: 100%; + width: 100%; + box-sizing: border-box; + /* setting pointer-events: auto; on node under the mouse, which changes + during scroll, will break mouse wheel scrolling in Safari */ + pointer-events: none; +} + +.ace_gutter-layer { + position: relative; + width: auto; + text-align: right; + pointer-events: auto; + height: 1000000px; + contain: style size layout; +} + +.ace_text-layer { + font: inherit !important; + position: absolute; + height: 1000000px; + width: 1000000px; + contain: style size layout; +} + +.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { + contain: style size layout; + position: absolute; + top: 0; + left: 0; + right: 0; +} + +.ace_hidpi .ace_text-layer, +.ace_hidpi .ace_gutter-layer, +.ace_hidpi .ace_content, +.ace_hidpi .ace_gutter { + contain: strict; +} +.ace_hidpi .ace_text-layer > .ace_line, +.ace_hidpi .ace_text-layer > .ace_line_group { + contain: strict; +} + +.ace_cjk { + display: inline-block; + text-align: center; +} + +.ace_cursor-layer { + z-index: 4; +} + +.ace_cursor { + z-index: 4; + position: absolute; + box-sizing: border-box; + border-left: 2px solid; + /* workaround for smooth cursor repaintng whole screen in chrome */ + transform: translatez(0); +} + +.ace_multiselect .ace_cursor { + border-left-width: 1px; +} + +.ace_slim-cursors .ace_cursor { + border-left-width: 1px; +} + +.ace_overwrite-cursors .ace_cursor { + border-left-width: 0; + border-bottom: 1px solid; +} + +.ace_hidden-cursors .ace_cursor { + opacity: 0.2; +} + +.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { + opacity: 0; +} + +.ace_smooth-blinking .ace_cursor { + transition: opacity 0.18s; +} + +.ace_animate-blinking .ace_cursor { + animation-duration: 1000ms; + animation-timing-function: step-end; + animation-name: blink-ace-animate; + animation-iteration-count: infinite; +} + +.ace_animate-blinking.ace_smooth-blinking .ace_cursor { + animation-duration: 1000ms; + animation-timing-function: ease-in-out; + animation-name: blink-ace-animate-smooth; +} + +@keyframes blink-ace-animate { + from, to { opacity: 1; } + 60% { opacity: 0; } +} + +@keyframes blink-ace-animate-smooth { + from, to { opacity: 1; } + 45% { opacity: 1; } + 60% { opacity: 0; } + 85% { opacity: 0; } +} + +.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { + position: absolute; + z-index: 3; +} + +.ace_marker-layer .ace_selection { + position: absolute; + z-index: 5; +} + +.ace_marker-layer .ace_bracket { + position: absolute; + z-index: 6; +} + +.ace_marker-layer .ace_error_bracket { + position: absolute; + border-bottom: 1px solid #DE5555; + border-radius: 0; +} + +.ace_marker-layer .ace_active-line { + position: absolute; + z-index: 2; +} + +.ace_marker-layer .ace_selected-word { + position: absolute; + z-index: 4; + box-sizing: border-box; +} + +.ace_line .ace_fold { + box-sizing: border-box; + + display: inline-block; + height: 11px; + margin-top: -2px; + vertical-align: middle; + + background-image: + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); + background-repeat: no-repeat, repeat-x; + background-position: center center, top left; + color: transparent; + + border: 1px solid black; + border-radius: 2px; + + cursor: pointer; + pointer-events: auto; +} + +.ace_dark .ace_fold { +} + +.ace_fold:hover{ + background-image: + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), + url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); +} + +.ace_tooltip { + background-color: #f5f5f5; + border: 1px solid gray; + border-radius: 1px; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); + color: black; + max-width: 100%; + padding: 3px 4px; + position: fixed; + z-index: 999999; + box-sizing: border-box; + cursor: default; + white-space: pre-wrap; + word-wrap: break-word; + line-height: normal; + font-style: normal; + font-weight: normal; + letter-spacing: normal; + pointer-events: none; + overflow: auto; + max-width: min(60em, 66vw); + overscroll-behavior: contain; +} +.ace_tooltip pre { + white-space: pre-wrap; +} + +.ace_tooltip.ace_dark { + background-color: #636363; + color: #fff; +} + +.ace_tooltip:focus { + outline: 1px solid #5E9ED6; +} + +.ace_icon { + display: inline-block; + width: 18px; + vertical-align: top; +} + +.ace_icon_svg { + display: inline-block; + width: 12px; + vertical-align: top; + -webkit-mask-repeat: no-repeat; + -webkit-mask-size: 12px; + -webkit-mask-position: center; +} + +.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { + padding-right: 13px; +} + +.ace_fold-widget { + box-sizing: border-box; + + margin: 0 -12px 0 1px; + display: none; + width: 11px; + vertical-align: top; + + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); + background-repeat: no-repeat; + background-position: center; + + border-radius: 3px; + + border: 1px solid transparent; + cursor: pointer; +} + +.ace_folding-enabled .ace_fold-widget { + display: inline-block; +} + +.ace_fold-widget.ace_end { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); +} + +.ace_fold-widget.ace_closed { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); +} + +.ace_fold-widget:hover { + border: 1px solid rgba(0, 0, 0, 0.3); + background-color: rgba(255, 255, 255, 0.2); + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); +} + +.ace_fold-widget:active { + border: 1px solid rgba(0, 0, 0, 0.4); + background-color: rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); +} +/** + * Dark version for fold widgets + */ +.ace_dark .ace_fold-widget { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); +} +.ace_dark .ace_fold-widget.ace_end { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); +} +.ace_dark .ace_fold-widget.ace_closed { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); +} +.ace_dark .ace_fold-widget:hover { + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); + background-color: rgba(255, 255, 255, 0.1); +} +.ace_dark .ace_fold-widget:active { + box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); +} + +.ace_inline_button { + border: 1px solid lightgray; + display: inline-block; + margin: -1px 8px; + padding: 0 5px; + pointer-events: auto; + cursor: pointer; +} +.ace_inline_button:hover { + border-color: gray; + background: rgba(200,200,200,0.2); + display: inline-block; + pointer-events: auto; +} + +.ace_fold-widget.ace_invalid { + background-color: #FFB4B4; + border-color: #DE5555; +} + +.ace_fade-fold-widgets .ace_fold-widget { + transition: opacity 0.4s ease 0.05s; + opacity: 0; +} + +.ace_fade-fold-widgets:hover .ace_fold-widget { + transition: opacity 0.05s ease 0.05s; + opacity:1; +} + +.ace_underline { + text-decoration: underline; +} + +.ace_bold { + font-weight: bold; +} + +.ace_nobold .ace_bold { + font-weight: normal; +} + +.ace_italic { + font-style: italic; +} + + +.ace_error-marker { + background-color: rgba(255, 0, 0,0.2); + position: absolute; + z-index: 9; +} + +.ace_highlight-marker { + background-color: rgba(255, 255, 0,0.2); + position: absolute; + z-index: 8; +} + +.ace_mobile-menu { + position: absolute; + line-height: 1.5; + border-radius: 4px; + -ms-user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + user-select: none; + background: white; + box-shadow: 1px 3px 2px grey; + border: 1px solid #dcdcdc; + color: black; +} +.ace_dark > .ace_mobile-menu { + background: #333; + color: #ccc; + box-shadow: 1px 3px 2px grey; + border: 1px solid #444; + +} +.ace_mobile-button { + padding: 2px; + cursor: pointer; + overflow: hidden; +} +.ace_mobile-button:hover { + background-color: #eee; + opacity:1; +} +.ace_mobile-button:active { + background-color: #ddd; +} + +.ace_placeholder { + font-family: arial; + transform: scale(0.9); + transform-origin: left; + white-space: pre; + opacity: 0.7; + margin: 0 10px; +} + +.ace_ghost_text { + opacity: 0.5; + font-style: italic; +} + +.ace_ghost_text > div { + white-space: pre; +} + +.ghost_text_line_wrapped::after { + content: "↩"; + position: absolute; +} + +.ace_lineWidgetContainer.ace_ghost_text { + margin: 0px 4px +} + +.ace_screenreader-only { + position:absolute; + left:-10000px; + top:auto; + width:1px; + height:1px; + overflow:hidden; +}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(u,g,N){var k=u("../lib/dom"),b=u("../lib/oop"),S=u("../lib/event_emitter").EventEmitter,l=function(){function h(s,r){this.canvas=k.createElement("canvas"),this.renderer=r,this.pixelRatio=1,this.maxHeight=r.layerConfig.maxHeight,this.lineHeight=r.layerConfig.lineHeight,this.canvasHeight=s.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=s.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},s.element.appendChild(this.canvas)}return h.prototype.$updateDecorators=function(s){var r=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(s){this.maxHeight=s.maxHeight,this.lineHeight=s.lineHeight,this.canvasHeight=s.height;var o=(s.lastRow+1)*this.lineHeight;oA.priority?1:0}var a=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),a){var c={info:1,warning:2,error:3};a.forEach(function(E){E.priority=c[E.type]||null}),a=a.sort(n);for(var d=this.renderer.session.$foldData,p=0;pthis.canvasHeight&&(L=this.canvasHeight-this.halfMinDecorationHeight),m=Math.round(L-this.halfMinDecorationHeight),M=Math.round(L+this.halfMinDecorationHeight)}i.fillStyle=r[a[p].type]||null,i.fillRect(0,y,this.canvasWidth,M-m)}}var F=this.renderer.session.selection.getCursor();if(F){var $=this.compensateFoldRows(F.row,d),y=Math.round((F.row-$)*this.lineHeight*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,y,this.canvasWidth,2)}},h.prototype.compensateFoldRows=function(s,r){var o=0;if(r&&r.length>0)for(var i=0;ir[i].start.row&&s=r[i].end.row&&(o+=r[i].end.row-r[i].start.row);return o},h}();b.implement(l.prototype,S),g.Decorator=l}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],function(u,g,N){var k=u("./lib/oop"),b=u("./lib/dom"),S=u("./lib/lang"),l=u("./config"),h=u("./layer/gutter").Gutter,s=u("./layer/marker").Marker,r=u("./layer/text").Text,o=u("./layer/cursor").Cursor,i=u("./scrollbar").HScrollBar,n=u("./scrollbar").VScrollBar,a=u("./scrollbar_custom").HScrollBar,c=u("./scrollbar_custom").VScrollBar,d=u("./renderloop").RenderLoop,p=u("./layer/font_metrics").FontMetrics,R=u("./lib/event_emitter").EventEmitter,$=u("./css/editor-css"),y=u("./layer/decorators").Decorator,m=u("./lib/useragent");b.importCssString($,"ace_editor.css",!1);var M=function(){function O(L,F){var E=this;this.container=L||b.createElement("div"),b.addCssClass(this.container,"ace_editor"),b.HI_DPI&&b.addCssClass(this.container,"ace_hidpi"),this.setTheme(F),l.get("useStrictCSP")==null&&l.set("useStrictCSP",!1),this.$gutter=b.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=b.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=b.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new s(this.content);var A=this.$textLayer=new r(this.content);this.canvas=A.element,this.$markerFront=new s(this.content),this.$cursorLayer=new o(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new n(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(w){E.$scrollAnimation||E.session.setScrollTop(w.data-E.scrollMargin.top)}),this.scrollBarH.on("scroll",function(w){E.$scrollAnimation||E.session.setScrollLeft(w.data-E.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new p(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(w){E.updateCharacterSize(),E.onResize(!0,E.gutterWidth,E.$size.width,E.$size.height),E._signal("changeCharacterSize",w)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!m.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}return O.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),b.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},O.prototype.setSession=function(L){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=L,L&&this.scrollMargin.top&&L.getScrollTop()<=0&&L.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(L),this.$markerBack.setSession(L),this.$markerFront.setSession(L),this.$gutterLayer.setSession(L),this.$textLayer.setSession(L),L&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},O.prototype.updateLines=function(L,F,E){if(F===void 0&&(F=1/0),this.$changedLines?(this.$changedLines.firstRow>L&&(this.$changedLines.firstRow=L),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},O.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},O.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},O.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},O.prototype.updateFull=function(L){L?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},O.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},O.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},O.prototype.onResize=function(L,F,E,A){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=L?1:0;var w=this.container;A||(A=w.clientHeight||w.scrollHeight),!A&&this.$maxLines&&this.lineHeight>1&&(!w.style.height||w.style.height=="0px")&&(w.style.height="1px",A=w.clientHeight||w.scrollHeight),E||(E=w.clientWidth||w.scrollWidth);var v=this.$updateCachedSize(L,F,E,A);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!E&&!A)return this.resizing=0;L&&(this.$gutterLayer.$padding=null),L?this.$renderChanges(v|this.$changes,!0):this.$loop.schedule(v|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},O.prototype.$updateCachedSize=function(L,F,E,A){A-=this.$extraHeight||0;var w=0,v=this.$size,_={width:v.width,height:v.height,scrollerHeight:v.scrollerHeight,scrollerWidth:v.scrollerWidth};if(A&&(L||v.height!=A)&&(v.height=A,w|=this.CHANGE_SIZE,v.scrollerHeight=v.height,this.$horizScroll&&(v.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(v.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",w=w|this.CHANGE_SCROLL),E&&(L||v.width!=E)){w|=this.CHANGE_SIZE,v.width=E,F==null&&(F=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=F,b.setStyle(this.scrollBarH.element.style,"left",F+"px"),b.setStyle(this.scroller.style,"left",F+this.margin.left+"px"),v.scrollerWidth=Math.max(0,E-F-this.scrollBarV.getWidth()-this.margin.h),b.setStyle(this.$gutter.style,"left",this.margin.left+"px");var T=this.scrollBarV.getWidth()+"px";b.setStyle(this.scrollBarH.element.style,"right",T),b.setStyle(this.scroller.style,"right",T),b.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(v.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||L)&&(w|=this.CHANGE_FULL)}return v.$dirty=!E||!A,w&&this._signal("resize",_),w},O.prototype.onGutterResize=function(L){var F=this.$showGutter?L:0;F!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,F,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},O.prototype.adjustWrapLimit=function(){var L=this.$size.scrollerWidth-this.$padding*2,F=Math.floor(L/this.characterWidth);return this.session.adjustWrapLimit(F,this.$showPrintMargin&&this.$printMarginColumn)},O.prototype.setAnimatedScroll=function(L){this.setOption("animatedScroll",L)},O.prototype.getAnimatedScroll=function(){return this.$animatedScroll},O.prototype.setShowInvisibles=function(L){this.setOption("showInvisibles",L),this.session.$bidiHandler.setShowInvisibles(L)},O.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},O.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},O.prototype.setDisplayIndentGuides=function(L){this.setOption("displayIndentGuides",L)},O.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},O.prototype.setHighlightIndentGuides=function(L){this.setOption("highlightIndentGuides",L)},O.prototype.setShowPrintMargin=function(L){this.setOption("showPrintMargin",L)},O.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},O.prototype.setPrintMarginColumn=function(L){this.setOption("printMarginColumn",L)},O.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},O.prototype.getShowGutter=function(){return this.getOption("showGutter")},O.prototype.setShowGutter=function(L){return this.setOption("showGutter",L)},O.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},O.prototype.setFadeFoldWidgets=function(L){this.setOption("fadeFoldWidgets",L)},O.prototype.setHighlightGutterLine=function(L){this.setOption("highlightGutterLine",L)},O.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},O.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var L=b.createElement("div");L.className="ace_layer ace_print-margin-layer",this.$printMarginEl=b.createElement("div"),this.$printMarginEl.className="ace_print-margin",L.appendChild(this.$printMarginEl),this.content.insertBefore(L,this.content.firstChild)}var F=this.$printMarginEl.style;F.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",F.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},O.prototype.getContainerElement=function(){return this.container},O.prototype.getMouseEventTarget=function(){return this.scroller},O.prototype.getTextAreaContainer=function(){return this.container},O.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var L=this.textarea.style,F=this.$composition;if(!this.$keepTextAreaAtCursor&&!F){b.translate(this.textarea,-100,0);return}var E=this.$cursorLayer.$pixelPos;if(E){F&&F.markerRange&&(E=this.$cursorLayer.getPixelPosition(F.markerRange.start,!0));var A=this.layerConfig,w=E.top,v=E.left;w-=A.offset;var _=F&&F.useTextareaForIME||m.isMobile?this.lineHeight:1;if(w<0||w>A.height-_){b.translate(this.textarea,0,0);return}var T=1,W=this.$size.height-_;if(!F)w+=this.lineHeight;else if(F.useTextareaForIME){var P=this.textarea.value;T=this.characterWidth*this.session.$getStringScreenWidth(P)[0]}else w+=this.lineHeight+2;v-=this.scrollLeft,v>this.$size.scrollerWidth-T&&(v=this.$size.scrollerWidth-T),v+=this.gutterWidth+this.margin.left,b.setStyle(L,"height",_+"px"),b.setStyle(L,"width",T+"px"),b.translate(this.textarea,Math.min(v,this.$size.scrollerWidth-T),Math.min(w,W))}}},O.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},O.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},O.prototype.getLastFullyVisibleRow=function(){var L=this.layerConfig,F=L.lastRow,E=this.session.documentToScreenRow(F,0)*L.lineHeight;return E-this.session.getScrollTop()>L.height-L.lineHeight?F-1:F},O.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},O.prototype.setPadding=function(L){this.$padding=L,this.$textLayer.setPadding(L),this.$cursorLayer.setPadding(L),this.$markerFront.setPadding(L),this.$markerBack.setPadding(L),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},O.prototype.setScrollMargin=function(L,F,E,A){var w=this.scrollMargin;w.top=L|0,w.bottom=F|0,w.right=A|0,w.left=E|0,w.v=w.top+w.bottom,w.h=w.left+w.right,w.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-w.top),this.updateFull()},O.prototype.setMargin=function(L,F,E,A){var w=this.margin;w.top=L|0,w.bottom=F|0,w.right=A|0,w.left=E|0,w.v=w.top+w.bottom,w.h=w.left+w.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},O.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},O.prototype.setHScrollBarAlwaysVisible=function(L){this.setOption("hScrollBarAlwaysVisible",L)},O.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},O.prototype.setVScrollBarAlwaysVisible=function(L){this.setOption("vScrollBarAlwaysVisible",L)},O.prototype.$updateScrollBarV=function(){var L=this.layerConfig.maxHeight,F=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(L-=(F-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>L-F&&(L=this.scrollTop+F,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(L+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},O.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},O.prototype.freeze=function(){this.$frozen=!0},O.prototype.unfreeze=function(){this.$frozen=!1},O.prototype.$renderChanges=function(L,F){if(this.$changes&&(L|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!L&&!F){this.$changes|=L;return}if(this.$size.$dirty)return this.$changes|=L,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",L),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var E=this.layerConfig;if(L&this.CHANGE_FULL||L&this.CHANGE_SIZE||L&this.CHANGE_TEXT||L&this.CHANGE_LINES||L&this.CHANGE_SCROLL||L&this.CHANGE_H_SCROLL){if(L|=this.$computeLayerConfig()|this.$loop.clear(),E.firstRow!=this.layerConfig.firstRow&&E.firstRowScreen==this.layerConfig.firstRowScreen){var A=this.scrollTop+(E.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;A>0&&(this.scrollTop=A,L=L|this.CHANGE_SCROLL,L|=this.$computeLayerConfig()|this.$loop.clear())}E=this.layerConfig,this.$updateScrollBarV(),L&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),b.translate(this.content,-this.scrollLeft,-E.offset);var w=E.width+2*this.$padding+"px",v=E.minHeight+"px";b.setStyle(this.content.style,"width",w),b.setStyle(this.content.style,"height",v)}if(L&this.CHANGE_H_SCROLL&&(b.translate(this.content,-this.scrollLeft,-E.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),L&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(E),this.$showGutter&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E),this.$markerBack.update(E),this.$markerFront.update(E),this.$cursorLayer.update(E),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}if(L&this.CHANGE_SCROLL){this.$changedLines=null,L&this.CHANGE_TEXT||L&this.CHANGE_LINES?this.$textLayer.update(E):this.$textLayer.scrollLines(E),this.$showGutter&&(L&this.CHANGE_GUTTER||L&this.CHANGE_LINES?this.$gutterLayer.update(E):this.$gutterLayer.scrollLines(E)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E),this.$markerBack.update(E),this.$markerFront.update(E),this.$cursorLayer.update(E),this.$moveTextAreaToCursor(),this._signal("afterRender",L);return}L&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(E),this.$showGutter&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E)):L&this.CHANGE_LINES?((this.$updateLines()||L&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E)):L&this.CHANGE_TEXT||L&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E)):L&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(E),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(E)),L&this.CHANGE_CURSOR&&(this.$cursorLayer.update(E),this.$moveTextAreaToCursor()),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(E),L&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(E),this._signal("afterRender",L)},O.prototype.$autosize=function(){var L=this.session.getScreenLength()*this.lineHeight,F=this.$maxLines*this.lineHeight,E=Math.min(F,Math.max((this.$minLines||1)*this.lineHeight,L))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(E+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&E>this.$maxPixelHeight&&(E=this.$maxPixelHeight);var A=E<=2*this.lineHeight,w=!A&&L>F;if(E!=this.desiredHeight||this.$size.height!=this.desiredHeight||w!=this.$vScroll){w!=this.$vScroll&&(this.$vScroll=w,this.scrollBarV.setVisible(w));var v=this.container.clientWidth;this.container.style.height=E+"px",this.$updateCachedSize(!0,this.$gutterWidth,v,E),this.desiredHeight=E,this._signal("autosize")}},O.prototype.$computeLayerConfig=function(){var L=this.session,F=this.$size,E=F.height<=2*this.lineHeight,A=this.session.getScreenLength(),w=A*this.lineHeight,v=this.$getLongestLine(),_=!E&&(this.$hScrollBarAlwaysVisible||F.scrollerWidth-v-2*this.$padding<0),T=this.$horizScroll!==_;T&&(this.$horizScroll=_,this.scrollBarH.setVisible(_));var W=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var P=F.scrollerHeight+this.lineHeight,z=!this.$maxLines&&this.$scrollPastEnd?(F.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;w+=z;var G=this.scrollMargin;this.session.setScrollTop(Math.max(-G.top,Math.min(this.scrollTop,w-F.scrollerHeight+G.bottom))),this.session.setScrollLeft(Math.max(-G.left,Math.min(this.scrollLeft,v+2*this.$padding-F.scrollerWidth+G.right)));var Y=!E&&(this.$vScrollBarAlwaysVisible||F.scrollerHeight-w+z<0||this.scrollTop>G.top),J=W!==Y;J&&(this.$vScroll=Y,this.scrollBarV.setVisible(Y));var X=this.scrollTop%this.lineHeight,K=Math.ceil(P/this.lineHeight)-1,Z=Math.max(0,Math.round((this.scrollTop-X)/this.lineHeight)),ee=Z+K,se,ae,le=this.lineHeight;Z=L.screenToDocumentRow(Z,0);var he=L.getFoldLine(Z);he&&(Z=he.start.row),se=L.documentToScreenRow(Z,0),ae=L.getRowLength(Z)*le,ee=Math.min(L.screenToDocumentRow(ee,0),L.getLength()-1),P=F.scrollerHeight+L.getRowLength(ee)*le+ae,X=this.scrollTop-se*le;var be=0;return(this.layerConfig.width!=v||T)&&(be=this.CHANGE_H_SCROLL),(T||J)&&(be|=this.$updateCachedSize(!0,this.gutterWidth,F.width,F.height),this._signal("scrollbarVisibilityChanged"),J&&(v=this.$getLongestLine())),this.layerConfig={width:v,padding:this.$padding,firstRow:Z,firstRowScreen:se,lastRow:ee,lineHeight:le,characterWidth:this.characterWidth,minHeight:P,maxHeight:w,offset:X,gutterOffset:le?Math.max(0,Math.ceil((X+F.height-F.scrollerHeight)/le)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(v-this.$padding),be},O.prototype.$updateLines=function(){if(this.$changedLines){var L=this.$changedLines.firstRow,F=this.$changedLines.lastRow;this.$changedLines=null;var E=this.layerConfig;if(!(L>E.lastRow+1)&&!(Fthis.$textLayer.MAX_LINE_LENGTH&&(L=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(L*this.characterWidth))},O.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},O.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},O.prototype.addGutterDecoration=function(L,F){this.$gutterLayer.addGutterDecoration(L,F)},O.prototype.removeGutterDecoration=function(L,F){this.$gutterLayer.removeGutterDecoration(L,F)},O.prototype.updateBreakpoints=function(L){this._rows=L,this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.setAnnotations=function(L){this.$gutterLayer.setAnnotations(L),this.$loop.schedule(this.CHANGE_GUTTER)},O.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},O.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},O.prototype.showCursor=function(){this.$cursorLayer.showCursor()},O.prototype.scrollSelectionIntoView=function(L,F,E){this.scrollCursorIntoView(L,E),this.scrollCursorIntoView(F,E)},O.prototype.scrollCursorIntoView=function(L,F,E){if(this.$size.scrollerHeight!==0){var A=this.$cursorLayer.getPixelPosition(L),w=A.left,v=A.top,_=E&&E.top||0,T=E&&E.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var W=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;W+_>v?(F&&W+_>v+this.lineHeight&&(v-=F*this.$size.scrollerHeight),v===0&&(v=-this.scrollMargin.top),this.session.setScrollTop(v)):W+this.$size.scrollerHeight-T=1-this.scrollMargin.top||F>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||L<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||L>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},O.prototype.pixelToScreenCoordinates=function(L,F){var E;if(this.$hasCssTransforms){E={top:0,left:0};var A=this.$fontMetrics.transformCoordinates([L,F]);L=A[1]-this.gutterWidth-this.margin.left,F=A[0]}else E=this.scroller.getBoundingClientRect();var w=L+this.scrollLeft-E.left-this.$padding,v=w/this.characterWidth,_=Math.floor((F+this.scrollTop-E.top)/this.lineHeight),T=this.$blockCursor?Math.floor(v):Math.round(v);return{row:_,column:T,side:v-T>0?1:-1,offsetX:w}},O.prototype.screenToTextCoordinates=function(L,F){var E;if(this.$hasCssTransforms){E={top:0,left:0};var A=this.$fontMetrics.transformCoordinates([L,F]);L=A[1]-this.gutterWidth-this.margin.left,F=A[0]}else E=this.scroller.getBoundingClientRect();var w=L+this.scrollLeft-E.left-this.$padding,v=w/this.characterWidth,_=this.$blockCursor?Math.floor(v):Math.round(v),T=Math.floor((F+this.scrollTop-E.top)/this.lineHeight);return this.session.screenToDocumentPosition(T,Math.max(_,0),w)},O.prototype.textToScreenCoordinates=function(L,F){var E=this.scroller.getBoundingClientRect(),A=this.session.documentToScreenPosition(L,F),w=this.$padding+(this.session.$bidiHandler.isBidiRow(A.row,L)?this.session.$bidiHandler.getPosLeft(A.column):Math.round(A.column*this.characterWidth)),v=A.row*this.lineHeight;return{pageX:E.left+w-this.scrollLeft,pageY:E.top+v-this.scrollTop}},O.prototype.visualizeFocus=function(){b.addCssClass(this.container,"ace_focus")},O.prototype.visualizeBlur=function(){b.removeCssClass(this.container,"ace_focus")},O.prototype.showComposition=function(L){this.$composition=L,L.cssText||(L.cssText=this.textarea.style.cssText),L.useTextareaForIME==null&&(L.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(b.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):L.markerId=this.session.addMarker(L.markerRange,"ace_composition_marker","text")},O.prototype.setCompositionText=function(L){var F=this.session.selection.cursor;this.addToken(L,"composition_placeholder",F.row,F.column),this.$moveTextAreaToCursor()},O.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),b.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var L=this.session.selection.cursor;this.removeExtraToken(L.row,L.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},O.prototype.setGhostText=function(L,F){var E=this.session.selection.cursor,A=F||{row:E.row,column:E.column};this.removeGhostText();var w=this.$calculateWrappedTextChunks(L,A);this.addToken(w[0].text,"ghost_text",A.row,A.column),this.$ghostText={text:L,position:{row:A.row,column:A.column}};var v=b.createElement("div");if(w.length>1){w.slice(1).forEach(function(G){var Y=b.createElement("div");G.wrapped&&(Y.className="ghost_text_line_wrapped"),Y.appendChild(b.createTextNode(G.text)),v.appendChild(Y)}),this.$ghostTextWidget={el:v,row:A.row,column:A.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var _=this.$cursorLayer.getPixelPosition(A,!0),T=this.container,W=T.getBoundingClientRect().height,P=w.length*this.lineHeight,z=P0){var P=0;W.push(w[_].length);for(var z=0;z1||Math.abs(L.$size.height-A)>1?L.$resizeTimer.delay():L.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},O}();M.prototype.CHANGE_CURSOR=1,M.prototype.CHANGE_MARKER=2,M.prototype.CHANGE_GUTTER=4,M.prototype.CHANGE_SCROLL=8,M.prototype.CHANGE_LINES=16,M.prototype.CHANGE_TEXT=32,M.prototype.CHANGE_SIZE=64,M.prototype.CHANGE_MARKER_BACK=128,M.prototype.CHANGE_MARKER_FRONT=256,M.prototype.CHANGE_FULL=512,M.prototype.CHANGE_H_SCROLL=1024,M.prototype.$changes=0,M.prototype.$padding=null,M.prototype.$frozen=!1,M.prototype.STEPS=8,k.implement(M.prototype,R),l.defineOptions(M.prototype,"renderer",{useResizeObserver:{set:function(O){!O&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):O&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(O){this.$textLayer.setShowInvisibles(O)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(O){typeof O=="number"&&(this.$printMarginColumn=O),this.$showPrintMargin=!!O,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(O){this.$gutter.style.display=O?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(O){this.$gutterLayer.$useSvgGutterIcons=O},initialValue:!1},showFoldedAnnotations:{set:function(O){this.$gutterLayer.$showFoldedAnnotations=O},initialValue:!1},fadeFoldWidgets:{set:function(O){b.setCssClass(this.$gutter,"ace_fade-fold-widgets",O)},initialValue:!1},showFoldWidgets:{set:function(O){this.$gutterLayer.setShowFoldWidgets(O),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(O){this.$textLayer.setDisplayIndentGuides(O)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(O){this.$textLayer.setHighlightIndentGuides(O)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(O){this.$gutterLayer.setHighlightGutterLine(O),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(O){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(O){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(O){typeof O=="number"&&(O=O+"px"),this.container.style.fontSize=O,this.updateFontSize()},initialValue:12},fontFamily:{set:function(O){this.container.style.fontFamily=O,this.updateFontSize()}},maxLines:{set:function(O){this.updateFull()}},minLines:{set:function(O){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(O){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(O){O=+O||0,this.$scrollPastEnd!=O&&(this.$scrollPastEnd=O,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(O){this.$gutterLayer.$fixedWidth=!!O,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(O){this.$updateCustomScrollbar(O)},initialValue:!1},theme:{set:function(O){this.setTheme(O)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!m.isMobile&&!m.isIE}}),g.VirtualRenderer=M}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(u,g,N){var k=u("../lib/oop"),b=u("../lib/net"),S=u("../lib/event_emitter").EventEmitter,l=u("../config");function h(i){var n="importScripts('"+b.qualifyURL(i)+"');";try{return new Blob([n],{type:"application/javascript"})}catch{var a=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,c=new a;return c.append(n),c.getBlob("application/javascript")}}function s(i){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var n=h(i),a=window.URL||window.webkitURL,c=a.createObjectURL(n);return new Worker(c)}return new Worker(i)}var r=function(i){i.postMessage||(i=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=i,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){k.implement(this,S),this.$createWorkerFromOldConfig=function(i,n,a,c,d){if(u.nameToUrl&&!u.toUrl&&(u.toUrl=u.nameToUrl),l.get("packaged")||!u.toUrl)c=c||l.moduleUrl(n,"worker");else{var p=this.$normalizePath;c=c||p(u.toUrl("ace/worker/worker.js",null,"_"));var R={};i.forEach(function($){R[$]=p(u.toUrl($,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=s(c),d&&this.send("importScripts",d),this.$worker.postMessage({init:!0,tlns:R,module:n,classname:a}),this.$worker},this.onMessage=function(i){var n=i.data;switch(n.type){case"event":this._signal(n.name,{data:n.data});break;case"call":var a=this.callbacks[n.id];a&&(a(n.data),delete this.callbacks[n.id]);break;case"error":this.reportError(n.data);break;case"log":window.console&&console.log&&console.log.apply(console,n.data);break}},this.reportError=function(i){window.console&&console.error&&console.error(i)},this.$normalizePath=function(i){return b.qualifyURL(i)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(i){i.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(i,n){this.$worker.postMessage({command:i,args:n})},this.call=function(i,n,a){if(a){var c=this.callbackId++;this.callbacks[c]=a,n.push(c)}this.send(i,n)},this.emit=function(i,n){try{n.data&&n.data.err&&(n.data.err={message:n.data.err.message,stack:n.data.err.stack,code:n.data.err.code}),this.$worker&&this.$worker.postMessage({event:i,data:{data:n.data}})}catch(a){console.error(a.stack)}},this.attachToDocument=function(i){this.$doc&&this.terminate(),this.$doc=i,this.call("setValue",[i.getValue()]),i.on("change",this.changeListener,!0)},this.changeListener=function(i){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),i.action=="insert"?this.deltaQueue.push(i.start,i.lines):this.deltaQueue.push(i.start,i.end)},this.$sendDeltaQueue=function(){var i=this.deltaQueue;i&&(this.deltaQueue=null,i.length>50&&i.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:i}))}}).call(r.prototype);var o=function(i,n,a){var c=null,d=!1,p=Object.create(S),R=[],$=new r({messageBuffer:R,terminate:function(){},postMessage:function(m){R.push(m),c&&(d?setTimeout(y):y())}});$.setEmitSync=function(m){d=m};var y=function(){var m=R.shift();m.command?c[m.command].apply(c,m.args):m.event&&p._signal(m.event,m.data)};return p.postMessage=function(m){$.onMessage({data:m})},p.callback=function(m,M){this.postMessage({type:"call",id:M,data:m})},p.emit=function(m,M){this.postMessage({type:"event",name:m,data:M})},l.loadModule(["worker",n],function(m){for(c=new m[a](p);R.length;)y()}),$};g.UIWorkerClient=o,g.WorkerClient=r,g.createWorker=s}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(u,g,N){var k=u("./range").Range,b=u("./lib/event_emitter").EventEmitter,S=u("./lib/oop"),l=function(){function h(s,r,o,i,n,a){var c=this;this.length=r,this.session=s,this.doc=s.getDocument(),this.mainClass=n,this.othersClass=a,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){c.onCursorChange()})},this.$pos=o;var d=s.getUndoManager().$undoStack||s.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=d.length,this.setup(),s.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var s=this,r=this.doc,o=this.session;this.selectionBefore=o.selection.toJSON(),o.selection.inMultiSelectMode&&o.selection.toSingleRange(),this.pos=r.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=o.addMarker(new k(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var a=r.createAnchor(n.row,n.column);a.$insertRight=!0,a.detach(),s.others.push(a)}),o.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var s=this.session,r=this;this.othersActive=!0,this.others.forEach(function(o){o.markerId=s.addMarker(new k(o.row,o.column,o.row,o.column+r.length),r.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var s=0;s=this.pos.column&&r.start.column<=this.pos.column+this.length+1,n=r.start.column-this.pos.column;if(this.updateAnchors(s),i&&(this.length+=o),i&&!this.session.$fromUndo){if(s.action==="insert")for(var a=this.others.length-1;a>=0;a--){var c=this.others[a],d={row:c.row,column:c.column+n};this.doc.insertMergedLines(d,s.lines)}else if(s.action==="remove")for(var a=this.others.length-1;a>=0;a--){var c=this.others[a],d={row:c.row,column:c.column+n};this.doc.remove(new k(d.row,d.column,d.row,d.column-o))}}this.$updating=!1,this.updateMarkers()}},h.prototype.updateAnchors=function(s){this.pos.onChange(s);for(var r=this.others.length;r--;)this.others[r].onChange(s);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var s=this,r=this.session,o=function(n,a){r.removeMarker(n.markerId),n.markerId=r.addMarker(new k(n.row,n.column,n.row,n.column+s.length),a,null,!1)};o(this.pos,this.mainClass);for(var i=this.others.length;i--;)o(this.others[i],this.othersClass)}},h.prototype.onCursorChange=function(s){if(!(this.$updating||!this.session)){var r=this.session.selection.getCursor();r.row===this.pos.row&&r.column>=this.pos.column&&r.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",s)):(this.hideOtherMarkers(),this._emit("cursorLeave",s))}},h.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var s=this.session.getUndoManager(),r=(s.$undoStack||s.$undostack).length-this.$undoStackDepth,o=0;o1?b.multiSelect.joinSelections():b.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(b){b.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(b){b.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(b){b.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],g.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(b){b.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(b){return b&&b.inMultiSelectMode}}];var k=u("../keyboard/hash_handler").HashHandler;g.keyboardHandler=new k(g.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(u,g,N){var k=u("./range_list").RangeList,b=u("./range").Range,S=u("./selection").Selection,l=u("./mouse/multi_select_handler").onMouseDown,h=u("./lib/event"),s=u("./lib/lang"),r=u("./commands/multi_select_commands");g.commands=r.defaultCommands.concat(r.multiSelectCommands);var o=u("./search").Search,i=new o;function n($,y,m){return i.$options.wrap=!0,i.$options.needle=y,i.$options.backwards=m==-1,i.find($)}var a=u("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(a.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function($,y){if($){if(!this.inMultiSelectMode&&this.rangeCount===0){var m=this.toOrientedRange();if(this.rangeList.add(m),this.rangeList.add($),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),y||this.fromOrientedRange($);this.rangeList.removeAll(),this.rangeList.add(m),this.$onAddRange(m)}$.cursor||($.cursor=$.end);var M=this.rangeList.add($);return this.$onAddRange($),M.length&&this.$onRemoveRange(M),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),y||this.fromOrientedRange($)}},this.toSingleRange=function($){$=$||this.ranges[0];var y=this.rangeList.removeAll();y.length&&this.$onRemoveRange(y),$&&this.fromOrientedRange($)},this.substractPoint=function($){var y=this.rangeList.substractPoint($);if(y)return this.$onRemoveRange(y),y[0]},this.mergeOverlappingRanges=function(){var $=this.rangeList.merge();$.length&&this.$onRemoveRange($)},this.$onAddRange=function($){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift($),this._signal("addRange",{range:$})},this.$onRemoveRange=function($){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var y=this.rangeList.ranges.pop();$.push(y),this.rangeCount=0}for(var m=$.length;m--;){var M=this.ranges.indexOf($[m]);this.ranges.splice(M,1)}this._signal("removeRange",{ranges:$}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),y=y||this.ranges[0],y&&!y.isEqual(this.getRange())&&this.fromOrientedRange(y)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new k,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var $=this.ranges.length?this.ranges:[this.getRange()],y=[],m=0;m<$.length;m++){var M=$[m],O=M.start.row,L=M.end.row;if(O===L)y.push(M.clone());else{for(y.push(new b(O,M.start.column,O,this.session.getLine(O).length));++O1){var $=this.rangeList.ranges,y=$[$.length-1],m=b.fromPoints($[0].start,y.end);this.toSingleRange(),this.setSelectionRange(m,y.cursor==y.start)}else{var M=this.session.documentToScreenPosition(this.cursor),O=this.session.documentToScreenPosition(this.anchor),L=this.rectangularRangeBlock(M,O);L.forEach(this.addRange,this)}},this.rectangularRangeBlock=function($,y,m){var M=[],O=$.column0;)z--;if(z>0)for(var G=0;M[G].isEmpty();)G++;for(var Y=z;Y>=G;Y--)M[Y].isEmpty()&&M.splice(Y,1)}return M}}).call(S.prototype);var c=u("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function($){$.cursor||($.cursor=$.end);var y=this.getSelectionStyle();return $.marker=this.session.addMarker($,"ace_selection",y),this.session.$selectionMarkers.push($),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,$},this.removeSelectionMarker=function($){if($.marker){this.session.removeMarker($.marker);var y=this.session.$selectionMarkers.indexOf($);y!=-1&&this.session.$selectionMarkers.splice(y,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function($){for(var y=this.session.$selectionMarkers,m=$.length;m--;){var M=$[m];if(M.marker){this.session.removeMarker(M.marker);var O=y.indexOf(M);O!=-1&&y.splice(O,1)}}this.session.selectionMarkerCount=y.length},this.$onAddRange=function($){this.addSelectionMarker($.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function($){this.removeSelectionMarkers($.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function($){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(r.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function($){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(r.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function($){var y=$.command,m=$.editor;if(m.multiSelect){if(y.multiSelectAction)y.multiSelectAction=="forEach"?M=m.forEachSelection(y,$.args):y.multiSelectAction=="forEachLine"?M=m.forEachSelection(y,$.args,!0):y.multiSelectAction=="single"?(m.exitMultiSelectMode(),M=y.exec(m,$.args||{})):M=y.multiSelectAction(m,$.args||{});else{var M=y.exec(m,$.args||{});m.multiSelect.addRange(m.multiSelect.toOrientedRange()),m.multiSelect.mergeOverlappingRanges()}return M}},this.forEachSelection=function($,y,m){if(!this.inVirtualSelectionMode){var M=m&&m.keepOrder,O=m==!0||m&&m.$byLines,L=this.session,F=this.selection,E=F.rangeList,A=(M?F:E).ranges,w;if(!A.length)return $.exec?$.exec(this,y||{}):$(this,y||{});var v=F._eventRegistry;F._eventRegistry={};var _=new S(L);this.inVirtualSelectionMode=!0;for(var T=A.length;T--;){if(O)for(;T>0&&A[T].start.row==A[T-1].end.row;)T--;_.fromOrientedRange(A[T]),_.index=T,this.selection=L.selection=_;var W=$.exec?$.exec(this,y||{}):$(this,y||{});!w&&W!==void 0&&(w=W),_.toOrientedRange(A[T])}_.detach(),this.selection=L.selection=F,this.inVirtualSelectionMode=!1,F._eventRegistry=v,F.mergeOverlappingRanges(),F.ranges[0]&&F.fromOrientedRange(F.ranges[0]);var P=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),P&&P.from==P.to&&this.renderer.animateScrolling(P.from),w}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var $="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var y=this.multiSelect.rangeList.ranges,m=[],M=0;M0);F<0&&(F=0),E>=w&&(E=w-1)}var _=this.session.removeFullLines(F,E);_=this.$reAlignText(_,A),this.session.insert({row:F,column:0},_.join(` +`)+` +`),A||(L.start.column=0,L.end.column=_[_.length-1].length),this.selection.setRange(L)}else{O.forEach(function(z){y.substractPoint(z.cursor)});var T=0,W=1/0,P=m.map(function(z){var G=z.cursor,Y=$.getLine(G.row),J=Y.substr(G.column).search(/\S/g);return J==-1&&(J=0),G.column>T&&(T=G.column),JX?$.insert(Y,s.stringRepeat(" ",J-X)):$.remove(new b(Y.row,Y.column,Y.row,Y.column-J+X)),z.start.column=z.end.column=T,z.start.row=z.end.row=Y.row,z.cursor=z.end}),y.fromOrientedRange(m[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function($,y){var m=!0,M=!0,O,L,F;return $.map(function(_){var T=_.match(/(\s*)(.*?)(\s*)([=:].*)/);return T?O==null?(O=T[1].length,L=T[2].length,F=T[3].length,T):(O+L+F!=T[1].length+T[2].length+T[3].length&&(M=!1),O!=T[1].length&&(m=!1),O>T[1].length&&(O=T[1].length),LT[3].length&&(F=T[3].length),T):[_]}).map(y?A:m?M?w:A:v);function E(_){return s.stringRepeat(" ",_)}function A(_){return _[2]?E(O)+_[2]+E(L-_[2].length+F)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function w(_){return _[2]?E(O+L-_[2].length)+_[2]+E(F)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}function v(_){return _[2]?E(O)+_[2]+E(F)+_[4].replace(/^([=:])\s+/,"$1 "):_[0]}}}).call(c.prototype);function d($,y){return $.row==y.row&&$.column==y.column}g.onSessionChange=function($){var y=$.session;y&&!y.multiSelect&&(y.$selectionMarkers=[],y.selection.$initRangeList(),y.multiSelect=y.selection),this.multiSelect=y&&y.multiSelect;var m=$.oldSession;m&&(m.multiSelect.off("addRange",this.$onAddRange),m.multiSelect.off("removeRange",this.$onRemoveRange),m.multiSelect.off("multiSelect",this.$onMultiSelect),m.multiSelect.off("singleSelect",this.$onSingleSelect),m.multiSelect.lead.off("change",this.$checkMultiselectChange),m.multiSelect.anchor.off("change",this.$checkMultiselectChange)),y&&(y.multiSelect.on("addRange",this.$onAddRange),y.multiSelect.on("removeRange",this.$onRemoveRange),y.multiSelect.on("multiSelect",this.$onMultiSelect),y.multiSelect.on("singleSelect",this.$onSingleSelect),y.multiSelect.lead.on("change",this.$checkMultiselectChange),y.multiSelect.anchor.on("change",this.$checkMultiselectChange)),y&&this.inMultiSelectMode!=y.selection.inMultiSelectMode&&(y.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function p($){$.$multiselectOnSessionChange||($.$onAddRange=$.$onAddRange.bind($),$.$onRemoveRange=$.$onRemoveRange.bind($),$.$onMultiSelect=$.$onMultiSelect.bind($),$.$onSingleSelect=$.$onSingleSelect.bind($),$.$multiselectOnSessionChange=g.onSessionChange.bind($),$.$checkMultiselectChange=$.$checkMultiselectChange.bind($),$.$multiselectOnSessionChange($),$.on("changeSession",$.$multiselectOnSessionChange),$.on("mousedown",l),$.commands.addCommands(r.defaultCommands),R($))}function R($){if(!$.textInput)return;var y=$.textInput.getElement(),m=!1;h.addListener(y,"keydown",function(O){var L=O.keyCode==18&&!(O.ctrlKey||O.shiftKey||O.metaKey);$.$blockSelectEnabled&&L?m||($.renderer.setMouseCursor("crosshair"),m=!0):m&&M()},$),h.addListener(y,"keyup",M,$),h.addListener(y,"blur",M,$);function M(O){m&&($.renderer.setMouseCursor(""),m=!1)}}g.MultiSelect=p,u("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function($){p(this),$?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function($){this.$blockSelectEnabled=$},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(u,g,N){var k=u("../../range").Range,b=g.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(S,l,h){var s=S.getLine(h);return this.foldingStartMarker.test(s)?"start":l=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(s)?"end":""},this.getFoldWidgetRange=function(S,l,h){return null},this.indentationBlock=function(S,l,h){var s=/\S/,r=S.getLine(l),o=r.search(s);if(o!=-1){for(var i=h||r.length,n=S.getLength(),a=l,c=l;++la){var R=S.getLine(c).length;return new k(a,i,c,R)}}},this.openingBracketBlock=function(S,l,h,s,r){var o={row:h,column:s+1},i=S.$findClosingBracket(l,o,r);if(i){var n=S.foldWidgets[i.row];return n==null&&(n=S.getFoldWidget(i.row)),n=="start"&&i.row>o.row&&(i.row--,i.column=S.getLine(i.row).length),k.fromPoints(o,i)}},this.closingBracketBlock=function(S,l,h,s,r){var o={row:h,column:s},i=S.$findOpeningBracket(l,o);if(i)return i.column++,o.column--,k.fromPoints(i,o)}}).call(b.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(u,g,N){var k=u("../line_widgets").LineWidgets,b=u("../lib/dom"),S=u("../range").Range,l=u("../config").nls;function h(r,o,i){for(var n=0,a=r.length-1;n<=a;){var c=n+a>>1,d=i(o,r[c]);if(d>0)n=c+1;else if(d<0)a=c-1;else return c}return-(n+1)}function s(r,o,i){var n=r.getAnnotations().sort(S.comparePoints);if(n.length){var a=h(n,{row:o,column:-1},S.comparePoints);a<0&&(a=-a-1),a>=n.length?a=i>0?0:n.length-1:a===0&&i<0&&(a=n.length-1);var c=n[a];if(!(!c||!i)){if(c.row===o){do c=n[a+=i];while(c&&c.row===o);if(!c)return n.slice()}var d=[];o=c.row;do d[i<0?"unshift":"push"](c),c=n[a+=i];while(c&&c.row==o);return d.length&&d}}}g.showErrorMarker=function(r,o){var i=r.session;i.widgetManager||(i.widgetManager=new k(i),i.widgetManager.attach(r));var n=r.getCursorPosition(),a=n.row,c=i.widgetManager.getWidgetsAtRow(a).filter(function(L){return L.type=="errorMarker"})[0];c?c.destroy():a-=o;var d=s(i,a,o),p;if(d){var R=d[0];n.column=(R.pos&&typeof R.column!="number"?R.pos.sc:R.column)||0,n.row=R.row,p=r.renderer.$gutterLayer.$annotations[n.row]}else{if(c)return;p={text:[l("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(n.row),r.selection.moveToPosition(n);var $={row:n.row,fixedWidth:!0,coverGutter:!0,el:b.createElement("div"),type:"errorMarker"},y=$.el.appendChild(b.createElement("div")),m=$.el.appendChild(b.createElement("div"));m.className="error_widget_arrow "+p.className;var M=r.renderer.$cursorLayer.getPixelPosition(n).left;m.style.left=M+r.renderer.gutterWidth-5+"px",$.el.className="error_widget_wrapper",y.className="error_widget "+p.className,y.innerHTML=p.text.join("
"),y.appendChild(b.createElement("div"));var O=function(L,F,E){if(F===0&&(E==="esc"||E==="return"))return $.destroy(),{command:"null"}};$.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(O),i.widgetManager.removeLineWidget($),r.off("changeSelection",$.destroy),r.off("changeSession",$.destroy),r.off("mouseup",$.destroy),r.off("change",$.destroy))},r.keyBinding.addKeyboardHandler(O),r.on("changeSelection",$.destroy),r.on("changeSession",$.destroy),r.on("mouseup",$.destroy),r.on("change",$.destroy),r.session.widgetManager.addLineWidget($),$.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:$.el.offsetHeight})},b.importCssString(` + .error_widget_wrapper { + background: inherit; + color: inherit; + border:none + } + .error_widget { + border-top: solid 2px; + border-bottom: solid 2px; + margin: 5px 0; + padding: 10px 40px; + white-space: pre-wrap; + } + .error_widget.ace_error, .error_widget_arrow.ace_error{ + border-color: #ff5a5a + } + .error_widget.ace_warning, .error_widget_arrow.ace_warning{ + border-color: #F1D817 + } + .error_widget.ace_info, .error_widget_arrow.ace_info{ + border-color: #5a5a5a + } + .error_widget.ace_ok, .error_widget_arrow.ace_ok{ + border-color: #5aaa5a + } + .error_widget_arrow { + position: absolute; + border: solid 5px; + border-top-color: transparent!important; + border-right-color: transparent!important; + border-left-color: transparent!important; + top: -5px; + } +`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(u,g,N){u("./loader_build")(g);var k=u("./lib/dom"),b=u("./range").Range,S=u("./editor").Editor,l=u("./edit_session").EditSession,h=u("./undomanager").UndoManager,s=u("./virtual_renderer").VirtualRenderer;u("./worker/worker_client"),u("./keyboard/hash_handler"),u("./placeholder"),u("./multi_select"),u("./mode/folding/fold_mode"),u("./theme/textmate"),u("./ext/error_marker"),g.config=u("./config"),g.edit=function(r,o){if(typeof r=="string"){var i=r;if(r=document.getElementById(i),!r)throw new Error("ace.edit can't find div #"+i)}if(r&&r.env&&r.env.editor instanceof S)return r.env.editor;var n="";if(r&&/input|textarea/i.test(r.tagName)){var a=r;n=a.value,r=k.createElement("pre"),a.parentNode.replaceChild(r,a)}else r&&(n=r.textContent,r.innerHTML="");var c=g.createEditSession(n),d=new S(new s(r),c,o),p={document:c,editor:d,onResize:d.resize.bind(d,null)};return a&&(p.textarea=a),d.on("destroy",function(){p.editor.container.env=null}),d.container.env=d.env=p,d},g.createEditSession=function(r,o){var i=new l(r,o);return i.setUndoManager(new h),i},g.Range=b,g.Editor=S,g.EditSession=l,g.UndoManager=h,g.VirtualRenderer=s,g.version=g.config.version}),function(){ace.require(["ace/ace"],function(u){u&&(u.config.init(!0),u.define=ace.define);var g=function(){return this}();!g&&typeof window<"u"&&(g=window),!g&&typeof self<"u"&&(g=self),g.ace||(g.ace=u);for(var N in u)u.hasOwnProperty(N)&&(g.ace[N]=u[N]);g.ace.default=g.ace,I&&(I.exports=g.ace)})}()})(Jc);var zw=Jc.exports;const Uw=Dc(zw);var qc=function(){if(typeof Map<"u")return Map;function I(C,u){var g=-1;return C.some(function(N,k){return N[0]===u?(g=k,!0):!1}),g}return function(){function C(){this.__entries__=[]}return Object.defineProperty(C.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),C.prototype.get=function(u){var g=I(this.__entries__,u),N=this.__entries__[g];return N&&N[1]},C.prototype.set=function(u,g){var N=I(this.__entries__,u);~N?this.__entries__[N][1]=g:this.__entries__.push([u,g])},C.prototype.delete=function(u){var g=this.__entries__,N=I(g,u);~N&&g.splice(N,1)},C.prototype.has=function(u){return!!~I(this.__entries__,u)},C.prototype.clear=function(){this.__entries__.splice(0)},C.prototype.forEach=function(u,g){g===void 0&&(g=null);for(var N=0,k=this.__entries__;N0},I.prototype.connect_=function(){!Ps||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),jw?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},I.prototype.disconnect_=function(){!Ps||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},I.prototype.onTransitionEnd_=function(C){var u=C.propertyName,g=u===void 0?"":u,N=Xw.some(function(k){return!!~g.indexOf(k)});N&&this.refresh()},I.getInstance=function(){return this.instance_||(this.instance_=new I),this.instance_},I.instance_=null,I}(),eu=function(I,C){for(var u=0,g=Object.keys(C);u"u"||!(Element instanceof Object))){if(!(C instanceof Si(C).Element))throw new TypeError('parameter 1 is not of type "Element".');var u=this.observations_;u.has(C)||(u.set(C,new ry(C)),this.controller_.addObserver(this),this.controller_.refresh())}},I.prototype.unobserve=function(C){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(C instanceof Si(C).Element))throw new TypeError('parameter 1 is not of type "Element".');var u=this.observations_;u.has(C)&&(u.delete(C),u.size||this.controller_.removeObserver(this))}},I.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},I.prototype.gatherActive=function(){var C=this;this.clearActive(),this.observations_.forEach(function(u){u.isActive()&&C.activeObservations_.push(u)})},I.prototype.broadcastActive=function(){if(this.hasActive()){var C=this.callbackCtx_,u=this.activeObservations_.map(function(g){return new oy(g.target,g.broadcastRect())});this.callback_.call(C,u,C),this.clearActive()}},I.prototype.clearActive=function(){this.activeObservations_.splice(0)},I.prototype.hasActive=function(){return this.activeObservations_.length>0},I}(),nu=typeof WeakMap<"u"?new WeakMap:new qc,iu=function(){function I(C){if(!(this instanceof I))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var u=Zw.getInstance(),g=new sy(C,u,this);nu.set(this,g)}return I}();["observe","unobserve","disconnect"].forEach(function(I){iu.prototype[I]=function(){var C;return(C=nu.get(this))[I].apply(C,arguments)}});var ay=function(){return typeof no.ResizeObserver<"u"?no.ResizeObserver:iu}();const Oc=["blur","input","change","changeSelectionStyle","changeSession","copy","focus","paste"],ly=zn({name:"VAceEditor",props:{value:{type:String,required:!0},lang:{type:String,default:"text"},theme:{type:String,default:"chrome"},options:Object,placeholder:String,readonly:Boolean,wrap:Boolean,printMargin:{type:[Boolean,Number],default:!0},minLines:Number,maxLines:Number},emits:["update:value","init",...Oc],render(){return Is("div")},mounted(){const I=this._editor=Wm(Uw.edit(this.$el,{placeholder:this.placeholder,readOnly:this.readonly,value:this.value,mode:"ace/mode/"+this.lang,theme:"ace/theme/"+this.theme,wrap:this.wrap,printMargin:this.printMargin,useWorker:!1,minLines:this.minLines,maxLines:this.maxLines,...this.options}));this._contentBackup=this.value,this._isSettingContent=!1,I.on("change",()=>{if(this._isSettingContent)return;const C=I.getValue();this._contentBackup=C,this.$emit("update:value",C)}),Oc.forEach(C=>{const u="on"+Nm(C);typeof this.$.vnode.props[u]=="function"&&I.on(C,this.$emit.bind(this,C))}),this._ro=new ay(()=>I.resize()),this._ro.observe(this.$el),this.$emit("init",I)},beforeUnmount(){var I,C;(I=this._ro)===null||I===void 0||I.disconnect(),(C=this._editor)===null||C===void 0||C.destroy()},methods:{focus(){this._editor.focus()},blur(){this._editor.blur()},selectAll(){this._editor.selectAll()},getAceInstance(){return this._editor}},watch:{value(I){if(this._contentBackup!==I){try{this._isSettingContent=!0,this._editor.setValue(I,1)}finally{this._isSettingContent=!1}this._contentBackup=I}},theme(I){this._editor.setTheme("ace/theme/"+I)},options(I){this._editor.setOptions(I)},readonly(I){this._editor.setReadOnly(I)},placeholder(I){this._editor.setOption("placeholder",I)},wrap(I){this._editor.setWrapBehavioursEnabled(I)},printMargin(I){this._editor.setOption("printMargin",I)},lang(I){this._editor.setOption("mode","ace/mode/"+I)},minLines(I){this._editor.setOption("minLines",I)},maxLines(I){this._editor.setOption("maxLines",I)}}});var cy={exports:{}};(function(I,C){(function(){ace.require(["ace/mode/text"],function(u){I&&(I.exports=u)})})()})(cy);var uy={exports:{}};(function(I,C){ace.define("ace/theme/chrome-css",["require","exports","module"],function(u,g,N){N.exports=`.ace-chrome .ace_gutter { + background: #ebebeb; + color: #333; + overflow : hidden; +} + +.ace-chrome .ace_print-margin { + width: 1px; + background: #e8e8e8; +} + +.ace-chrome { + background-color: #FFFFFF; + color: black; +} + +.ace-chrome .ace_cursor { + color: black; +} + +.ace-chrome .ace_invisible { + color: rgb(191, 191, 191); +} + +.ace-chrome .ace_constant.ace_buildin { + color: rgb(88, 72, 246); +} + +.ace-chrome .ace_constant.ace_language { + color: rgb(88, 92, 246); +} + +.ace-chrome .ace_constant.ace_library { + color: rgb(6, 150, 14); +} + +.ace-chrome .ace_invalid { + background-color: rgb(153, 0, 0); + color: white; +} + +.ace-chrome .ace_fold { +} + +.ace-chrome .ace_support.ace_function { + color: rgb(60, 76, 114); +} + +.ace-chrome .ace_support.ace_constant { + color: rgb(6, 150, 14); +} + +.ace-chrome .ace_support.ace_type, +.ace-chrome .ace_support.ace_class +.ace-chrome .ace_support.ace_other { + color: rgb(109, 121, 222); +} + +.ace-chrome .ace_variable.ace_parameter { + font-style:italic; + color:#FD971F; +} +.ace-chrome .ace_keyword.ace_operator { + color: rgb(104, 118, 135); +} + +.ace-chrome .ace_comment { + color: #236e24; +} + +.ace-chrome .ace_comment.ace_doc { + color: #236e24; +} + +.ace-chrome .ace_comment.ace_doc.ace_tag { + color: #236e24; +} + +.ace-chrome .ace_constant.ace_numeric { + color: rgb(0, 0, 205); +} + +.ace-chrome .ace_variable { + color: rgb(49, 132, 149); +} + +.ace-chrome .ace_xml-pe { + color: rgb(104, 104, 91); +} + +.ace-chrome .ace_entity.ace_name.ace_function { + color: #0000A2; +} + + +.ace-chrome .ace_heading { + color: rgb(12, 7, 255); +} + +.ace-chrome .ace_list { + color:rgb(185, 6, 144); +} + +.ace-chrome .ace_marker-layer .ace_selection { + background: rgb(181, 213, 255); +} + +.ace-chrome .ace_marker-layer .ace_step { + background: rgb(252, 255, 0); +} + +.ace-chrome .ace_marker-layer .ace_stack { + background: rgb(164, 229, 101); +} + +.ace-chrome .ace_marker-layer .ace_bracket { + margin: -1px 0 0 -1px; + border: 1px solid rgb(192, 192, 192); +} + +.ace-chrome .ace_marker-layer .ace_active-line { + background: rgba(0, 0, 0, 0.07); +} + +.ace-chrome .ace_gutter-active-line { + background-color : #dcdcdc; +} + +.ace-chrome .ace_marker-layer .ace_selected-word { + background: rgb(250, 250, 255); + border: 1px solid rgb(200, 200, 250); +} + +.ace-chrome .ace_storage, +.ace-chrome .ace_keyword, +.ace-chrome .ace_meta.ace_tag { + color: rgb(147, 15, 128); +} + +.ace-chrome .ace_string.ace_regex { + color: rgb(255, 0, 0) +} + +.ace-chrome .ace_string { + color: #1A1AA6; +} + +.ace-chrome .ace_entity.ace_other.ace_attribute-name { + color: #994409; +} + +.ace-chrome .ace_indent-guide { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; +} + +.ace-chrome .ace_indent-guide-active { + background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; +} +`}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome-css","ace/lib/dom"],function(u,g,N){g.isDark=!1,g.cssClass="ace-chrome",g.cssText=u("./chrome-css");var k=u("../lib/dom");k.importCssString(g.cssText,g.cssClass,!1)}),function(){ace.require(["ace/theme/chrome"],function(u){I&&(I.exports=u)})}()})(uy);const hy={"v-slot":"label",class:"col-10",style:{"margin-top":"10px !important"}},fy={key:0,style:{"margin-bottom":"0px !important"}},dy={class:"col-2"},py=zn({__name:"PipelineList",props:{idx:{},pipelineInfo:{},pipelineScriptList:{},dragFlag:{type:Boolean}},emits:["on-delete-pipeline"],setup(I,{emit:C}){const u=Bm(),g=()=>{k.value.stageContent=(u==null?void 0:u.refs.pipeline)._contentBackup},N=I,{pipelineInfo:k}=Fc(N),b=C,S=h=>{b("on-delete-pipeline",h)},l=$t("");return Zr(()=>l.value,()=>{console.log("preSrcipt",l.value)}),oo(()=>{}),(h,s)=>(We(),Ne("div",{class:Wc(["row",{draggable:!rt(k).isDefaultScript}])},[ve("span",hy,[(We(!0),Ne(An,null,Hn(h.pipelineScriptList,(r,o)=>(We(),Ne("div",{key:o},[(We(!0),Ne(An,null,Hn(r.list,(i,n)=>(We(),Ne("div",{key:n},[rt(k).workflowStageIdx>0&&rt(k).workflowStageIdx===i.workflowStageIdx?(We(),Ne("p",fy,Qt(i.workflowStageTypeName)+" ("+Qt(i.workflowStageName)+") ",1)):ji("",!0)]))),128))]))),128))]),ve("span",dy,[rt(k).workflowStageIdx!==null?(We(),Ne("button",{key:0,class:"btn btn-danger btn",onClick:s[0]||(s[0]=r=>S(N.idx))}," delete ")):ji("",!0)]),rn(rt(ly),{ref:"pipeline",modelValue:rt(k).stageContent,"onUpdate:modelValue":s[1]||(s[1]=r=>rt(k).stageContent=r),value:rt(k).stageContent,id:rt(k).mappingIdx,options:{readOnly:h.dragFlag,maxLines:9999,minLines:10,selectionStyle:"text",highlightActiveLine:!1,cursorStyle:"smooth",hasCssTransforms:!0},onInput:g},null,8,["modelValue","value","id","options"])],2))}}),gy=so(py,[["__scopeId","data-v-f45dea45"]]);var ro={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ro.exports;(function(I,C){(function(){var u,g="4.17.21",N=200,k="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",b="Expected a function",S="Invalid `variable` option passed into `_.template`",l="__lodash_hash_undefined__",h=500,s="__lodash_placeholder__",r=1,o=2,i=4,n=1,a=2,c=1,d=2,p=4,R=8,$=16,y=32,m=64,M=128,O=256,L=512,F=30,E="...",A=800,w=16,v=1,_=2,T=3,W=1/0,P=9007199254740991,z=17976931348623157e292,G=NaN,Y=4294967295,J=Y-1,X=Y>>>1,K=[["ary",M],["bind",c],["bindKey",d],["curry",R],["curryRight",$],["flip",L],["partial",y],["partialRight",m],["rearg",O]],Z="[object Arguments]",ee="[object Array]",se="[object AsyncFunction]",ae="[object Boolean]",le="[object Date]",he="[object DOMException]",be="[object Error]",Ie="[object Function]",dt="[object GeneratorFunction]",He="[object Map]",ze="[object Number]",St="[object Null]",pt="[object Object]",on="[object Promise]",_i="[object Proxy]",Ln="[object RegExp]",Rt="[object Set]",fn="[object String]",dn="[object Symbol]",Ci="[object Undefined]",Un="[object WeakMap]",ne="[object WeakSet]",fe="[object ArrayBuffer]",pe="[object DataView]",Le="[object Float32Array]",Oe="[object Float64Array]",Ye="[object Int8Array]",Qe="[object Int16Array]",Xe="[object Int32Array]",Ve="[object Uint8Array]",De="[object Uint8ClampedArray]",ht="[object Uint16Array]",pn="[object Uint32Array]",Ji=/\b__p \+= '';/g,ru=/\b(__p \+=) '' \+/g,ou=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ks=/&(?:amp|lt|gt|quot|#39);/g,Ys=/[&<>"']/g,su=RegExp(Ks.source),au=RegExp(Ys.source),lu=/<%-([\s\S]+?)%>/g,cu=/<%([\s\S]+?)%>/g,Xs=/<%=([\s\S]+?)%>/g,uu=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hu=/^\w*$/,fu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,co=/[\\^$.*+?()[\]{}|]/g,du=RegExp(co.source),uo=/^\s+/,pu=/\s/,gu=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,vu=/\{\n\/\* \[wrapped with (.+)\] \*/,mu=/,? & /,wu=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yu=/[()=,{}\[\]\/\s]/,bu=/\\(\\)?/g,$u=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,js=/\w*$/,Su=/^[-+]0x[0-9a-f]+$/i,_u=/^0b[01]+$/i,Cu=/^\[object .+?Constructor\]$/,Au=/^0o[0-7]+$/i,xu=/^(?:0|[1-9]\d*)$/,Eu=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,qi=/($^)/,Lu=/['\n\r\u2028\u2029\\]/g,er="\\ud800-\\udfff",Tu="\\u0300-\\u036f",ku="\\ufe20-\\ufe2f",Mu="\\u20d0-\\u20ff",Zs=Tu+ku+Mu,Qs="\\u2700-\\u27bf",Js="a-z\\xdf-\\xf6\\xf8-\\xff",Ru="\\xac\\xb1\\xd7\\xf7",Iu="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ou="\\u2000-\\u206f",Du=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qs="A-Z\\xc0-\\xd6\\xd8-\\xde",ea="\\ufe0e\\ufe0f",ta=Ru+Iu+Ou+Du,ho="['’]",Fu="["+er+"]",na="["+ta+"]",tr="["+Zs+"]",ia="\\d+",Wu="["+Qs+"]",ra="["+Js+"]",oa="[^"+er+ta+ia+Qs+Js+qs+"]",fo="\\ud83c[\\udffb-\\udfff]",Nu="(?:"+tr+"|"+fo+")",sa="[^"+er+"]",po="(?:\\ud83c[\\udde6-\\uddff]){2}",go="[\\ud800-\\udbff][\\udc00-\\udfff]",ni="["+qs+"]",aa="\\u200d",la="(?:"+ra+"|"+oa+")",Bu="(?:"+ni+"|"+oa+")",ca="(?:"+ho+"(?:d|ll|m|re|s|t|ve))?",ua="(?:"+ho+"(?:D|LL|M|RE|S|T|VE))?",ha=Nu+"?",fa="["+ea+"]?",Pu="(?:"+aa+"(?:"+[sa,po,go].join("|")+")"+fa+ha+")*",Hu="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zu="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",da=fa+ha+Pu,Uu="(?:"+[Wu,po,go].join("|")+")"+da,Gu="(?:"+[sa+tr+"?",tr,po,go,Fu].join("|")+")",Vu=RegExp(ho,"g"),Ku=RegExp(tr,"g"),vo=RegExp(fo+"(?="+fo+")|"+Gu+da,"g"),Yu=RegExp([ni+"?"+ra+"+"+ca+"(?="+[na,ni,"$"].join("|")+")",Bu+"+"+ua+"(?="+[na,ni+la,"$"].join("|")+")",ni+"?"+la+"+"+ca,ni+"+"+ua,zu,Hu,ia,Uu].join("|"),"g"),Xu=RegExp("["+aa+er+Zs+ea+"]"),ju=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zu=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Qu=-1,Ze={};Ze[Le]=Ze[Oe]=Ze[Ye]=Ze[Qe]=Ze[Xe]=Ze[Ve]=Ze[De]=Ze[ht]=Ze[pn]=!0,Ze[Z]=Ze[ee]=Ze[fe]=Ze[ae]=Ze[pe]=Ze[le]=Ze[be]=Ze[Ie]=Ze[He]=Ze[ze]=Ze[pt]=Ze[Ln]=Ze[Rt]=Ze[fn]=Ze[Un]=!1;var je={};je[Z]=je[ee]=je[fe]=je[pe]=je[ae]=je[le]=je[Le]=je[Oe]=je[Ye]=je[Qe]=je[Xe]=je[He]=je[ze]=je[pt]=je[Ln]=je[Rt]=je[fn]=je[dn]=je[Ve]=je[De]=je[ht]=je[pn]=!0,je[be]=je[Ie]=je[Un]=!1;var Ju={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},qu={"&":"&","<":"<",">":">",'"':""","'":"'"},eh={"&":"&","<":"<",">":">",""":'"',"'":"'"},th={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nh=parseFloat,ih=parseInt,pa=typeof Pi=="object"&&Pi&&Pi.Object===Object&&Pi,rh=typeof self=="object"&&self&&self.Object===Object&&self,gt=pa||rh||Function("return this")(),mo=C&&!C.nodeType&&C,Gn=mo&&!0&&I&&!I.nodeType&&I,ga=Gn&&Gn.exports===mo,wo=ga&&pa.process,zt=function(){try{var j=Gn&&Gn.require&&Gn.require("util").types;return j||wo&&wo.binding&&wo.binding("util")}catch{}}(),va=zt&&zt.isArrayBuffer,ma=zt&&zt.isDate,wa=zt&&zt.isMap,ya=zt&&zt.isRegExp,ba=zt&&zt.isSet,$a=zt&&zt.isTypedArray;function It(j,te,q){switch(q.length){case 0:return j.call(te);case 1:return j.call(te,q[0]);case 2:return j.call(te,q[0],q[1]);case 3:return j.call(te,q[0],q[1],q[2])}return j.apply(te,q)}function oh(j,te,q,de){for(var _e=-1,Be=j==null?0:j.length;++_e-1}function yo(j,te,q){for(var de=-1,_e=j==null?0:j.length;++de<_e;)if(q(te,j[de]))return!0;return!1}function Je(j,te){for(var q=-1,de=j==null?0:j.length,_e=Array(de);++q-1;);return q}function Ta(j,te){for(var q=j.length;q--&&ii(te,j[q],0)>-1;);return q}function ph(j,te){for(var q=j.length,de=0;q--;)j[q]===te&&++de;return de}var gh=_o(Ju),vh=_o(qu);function mh(j){return"\\"+th[j]}function wh(j,te){return j==null?u:j[te]}function ri(j){return Xu.test(j)}function yh(j){return ju.test(j)}function bh(j){for(var te,q=[];!(te=j.next()).done;)q.push(te.value);return q}function Eo(j){var te=-1,q=Array(j.size);return j.forEach(function(de,_e){q[++te]=[_e,de]}),q}function ka(j,te){return function(q){return j(te(q))}}function Mn(j,te){for(var q=-1,de=j.length,_e=0,Be=[];++q-1}function lf(e,t){var f=this.__data__,x=yr(f,e);return x<0?(++this.size,f.push([e,t])):f[x][1]=t,this}gn.prototype.clear=rf,gn.prototype.delete=of,gn.prototype.get=sf,gn.prototype.has=af,gn.prototype.set=lf;function vn(e){var t=-1,f=e==null?0:e.length;for(this.clear();++t=t?e:t)),e}function Kt(e,t,f,x,D,H){var U,V=t&r,Q=t&o,ie=t&i;if(f&&(U=D?f(e,x,D,H):f(e)),U!==u)return U;if(!et(e))return e;var re=Ce(e);if(re){if(U=fd(e),!V)return Et(e,U)}else{var oe=yt(e),ue=oe==Ie||oe==dt;if(Wn(e))return fl(e,V);if(oe==pt||oe==Z||ue&&!D){if(U=Q||ue?{}:Ml(e),!V)return Q?td(e,Cf(U,e)):ed(e,za(U,e))}else{if(!je[oe])return D?e:{};U=dd(e,oe,V)}}H||(H=new qt);var ge=H.get(e);if(ge)return ge;H.set(e,U),sc(e)?e.forEach(function(ye){U.add(Kt(ye,t,f,ye,e,H))}):rc(e)&&e.forEach(function(ye,ke){U.set(ke,Kt(ye,t,f,ke,e,H))});var we=ie?Q?qo:Jo:Q?Tt:ft,Ee=re?u:we(e);return Ut(Ee||e,function(ye,ke){Ee&&(ke=ye,ye=e[ke]),Mi(U,ke,Kt(ye,t,f,ke,e,H))}),U}function Af(e){var t=ft(e);return function(f){return Ua(f,e,t)}}function Ua(e,t,f){var x=f.length;if(e==null)return!x;for(e=Ke(e);x--;){var D=f[x],H=t[D],U=e[D];if(U===u&&!(D in e)||!H(U))return!1}return!0}function Ga(e,t,f){if(typeof e!="function")throw new Gt(b);return Ni(function(){e.apply(u,f)},t)}function Ri(e,t,f,x){var D=-1,H=nr,U=!0,V=e.length,Q=[],ie=t.length;if(!V)return Q;f&&(t=Je(t,Ot(f))),x?(H=yo,U=!1):t.length>=N&&(H=Ai,U=!1,t=new Yn(t));e:for(;++DD?0:D+f),x=x===u||x>D?D:xe(x),x<0&&(x+=D),x=f>x?0:lc(x);f0&&f(V)?t>1?vt(V,t-1,f,x,D):kn(D,V):x||(D[D.length]=V)}return D}var Oo=wl(),Ya=wl(!0);function sn(e,t){return e&&Oo(e,t,ft)}function Do(e,t){return e&&Ya(e,t,ft)}function $r(e,t){return Tn(t,function(f){return $n(e[f])})}function jn(e,t){t=Dn(t,e);for(var f=0,x=t.length;e!=null&&ft}function Lf(e,t){return e!=null&&Ge.call(e,t)}function Tf(e,t){return e!=null&&t in Ke(e)}function kf(e,t,f){return e>=wt(t,f)&&e=120&&re.length>=120)?new Yn(U&&re):u}re=e[0];var oe=-1,ue=V[0];e:for(;++oe-1;)V!==e&&fr.call(V,Q,1),fr.call(e,Q,1);return e}function rl(e,t){for(var f=e?t.length:0,x=f-1;f--;){var D=t[f];if(f==x||D!==H){var H=D;bn(D)?fr.call(e,D,1):Vo(e,D)}}return e}function zo(e,t){return e+gr(Na()*(t-e+1))}function Uf(e,t,f,x){for(var D=-1,H=ct(pr((t-e)/(f||1)),0),U=q(H);H--;)U[x?H:++D]=e,e+=f;return U}function Uo(e,t){var f="";if(!e||t<1||t>P)return f;do t%2&&(f+=e),t=gr(t/2),t&&(e+=e);while(t);return f}function Te(e,t){return ss(Ol(e,t,kt),e+"")}function Gf(e){return Ha(gi(e))}function Vf(e,t){var f=gi(e);return Rr(f,Xn(t,0,f.length))}function Di(e,t,f,x){if(!et(e))return e;t=Dn(t,e);for(var D=-1,H=t.length,U=H-1,V=e;V!=null&&++DD?0:D+t),f=f>D?D:f,f<0&&(f+=D),D=t>f?0:f-t>>>0,t>>>=0;for(var H=q(D);++x>>1,U=e[H];U!==null&&!Ft(U)&&(f?U<=t:U=N){var ie=t?null:od(e);if(ie)return rr(ie);U=!1,D=Ai,Q=new Yn}else Q=t?[]:V;e:for(;++x=x?e:Yt(e,t,f)}var hl=Dh||function(e){return gt.clearTimeout(e)};function fl(e,t){if(t)return e.slice();var f=e.length,x=Ia?Ia(f):new e.constructor(f);return e.copy(x),x}function jo(e){var t=new e.constructor(e.byteLength);return new ur(t).set(new ur(e)),t}function Zf(e,t){var f=t?jo(e.buffer):e.buffer;return new e.constructor(f,e.byteOffset,e.byteLength)}function Qf(e){var t=new e.constructor(e.source,js.exec(e));return t.lastIndex=e.lastIndex,t}function Jf(e){return ki?Ke(ki.call(e)):{}}function dl(e,t){var f=t?jo(e.buffer):e.buffer;return new e.constructor(f,e.byteOffset,e.length)}function pl(e,t){if(e!==t){var f=e!==u,x=e===null,D=e===e,H=Ft(e),U=t!==u,V=t===null,Q=t===t,ie=Ft(t);if(!V&&!ie&&!H&&e>t||H&&U&&Q&&!V&&!ie||x&&U&&Q||!f&&Q||!D)return 1;if(!x&&!H&&!ie&&e=V)return Q;var ie=f[x];return Q*(ie=="desc"?-1:1)}}return e.index-t.index}function gl(e,t,f,x){for(var D=-1,H=e.length,U=f.length,V=-1,Q=t.length,ie=ct(H-U,0),re=q(Q+ie),oe=!x;++V1?f[D-1]:u,U=D>2?f[2]:u;for(H=e.length>3&&typeof H=="function"?(D--,H):u,U&&Ct(f[0],f[1],U)&&(H=D<3?u:H,D=1),t=Ke(t);++x-1?D[H?t[U]:U]:u}}function $l(e){return yn(function(t){var f=t.length,x=f,D=Vt.prototype.thru;for(e&&t.reverse();x--;){var H=t[x];if(typeof H!="function")throw new Gt(b);if(D&&!U&&kr(H)=="wrapper")var U=new Vt([],!0)}for(x=U?x:f;++x1&&Re.reverse(),re&&QV))return!1;var ie=H.get(e),re=H.get(t);if(ie&&re)return ie==t&&re==e;var oe=-1,ue=!0,ge=f&a?new Yn:u;for(H.set(e,t),H.set(t,e);++oe1?"& ":"")+t[x],t=t.join(f>2?", ":" "),e.replace(gu,`{ +/* [wrapped with `+t+`] */ +`)}function gd(e){return Ce(e)||Jn(e)||!!(Fa&&e&&e[Fa])}function bn(e,t){var f=typeof e;return t=t??P,!!t&&(f=="number"||f!="symbol"&&xu.test(e))&&e>-1&&e%1==0&&e0){if(++t>=A)return arguments[0]}else t=0;return e.apply(u,arguments)}}function Rr(e,t){var f=-1,x=e.length,D=x-1;for(t=t===u?x:t;++f1?e[t-1]:u;return f=typeof f=="function"?(e.pop(),f):u,Kl(e,f)});function Yl(e){var t=B(e);return t.__chain__=!0,t}function xp(e,t){return t(e),e}function Ir(e,t){return t(e)}var Ep=yn(function(e){var t=e.length,f=t?e[0]:0,x=this.__wrapped__,D=function(H){return Io(H,e)};return t>1||this.__actions__.length||!(x instanceof Me)||!bn(f)?this.thru(D):(x=x.slice(f,+f+(t?1:0)),x.__actions__.push({func:Ir,args:[D],thisArg:u}),new Vt(x,this.__chain__).thru(function(H){return t&&!H.length&&H.push(u),H}))});function Lp(){return Yl(this)}function Tp(){return new Vt(this.value(),this.__chain__)}function kp(){this.__values__===u&&(this.__values__=ac(this.value()));var e=this.__index__>=this.__values__.length,t=e?u:this.__values__[this.__index__++];return{done:e,value:t}}function Mp(){return this}function Rp(e){for(var t,f=this;f instanceof wr;){var x=Pl(f);x.__index__=0,x.__values__=u,t?D.__wrapped__=x:t=x;var D=x;f=f.__wrapped__}return D.__wrapped__=e,t}function Ip(){var e=this.__wrapped__;if(e instanceof Me){var t=e;return this.__actions__.length&&(t=new Me(this)),t=t.reverse(),t.__actions__.push({func:Ir,args:[as],thisArg:u}),new Vt(t,this.__chain__)}return this.thru(as)}function Op(){return cl(this.__wrapped__,this.__actions__)}var Dp=Ar(function(e,t,f){Ge.call(e,f)?++e[f]:mn(e,f,1)});function Fp(e,t,f){var x=Ce(e)?Sa:xf;return f&&Ct(e,t,f)&&(t=u),x(e,me(t,3))}function Wp(e,t){var f=Ce(e)?Tn:Ka;return f(e,me(t,3))}var Np=bl(Hl),Bp=bl(zl);function Pp(e,t){return vt(Or(e,t),1)}function Hp(e,t){return vt(Or(e,t),W)}function zp(e,t,f){return f=f===u?1:xe(f),vt(Or(e,t),f)}function Xl(e,t){var f=Ce(e)?Ut:In;return f(e,me(t,3))}function jl(e,t){var f=Ce(e)?sh:Va;return f(e,me(t,3))}var Up=Ar(function(e,t,f){Ge.call(e,f)?e[f].push(t):mn(e,f,[t])});function Gp(e,t,f,x){e=Lt(e)?e:gi(e),f=f&&!x?xe(f):0;var D=e.length;return f<0&&(f=ct(D+f,0)),Br(e)?f<=D&&e.indexOf(t,f)>-1:!!D&&ii(e,t,f)>-1}var Vp=Te(function(e,t,f){var x=-1,D=typeof t=="function",H=Lt(e)?q(e.length):[];return In(e,function(U){H[++x]=D?It(t,U,f):Ii(U,t,f)}),H}),Kp=Ar(function(e,t,f){mn(e,f,t)});function Or(e,t){var f=Ce(e)?Je:Ja;return f(e,me(t,3))}function Yp(e,t,f,x){return e==null?[]:(Ce(t)||(t=t==null?[]:[t]),f=x?u:f,Ce(f)||(f=f==null?[]:[f]),nl(e,t,f))}var Xp=Ar(function(e,t,f){e[f?0:1].push(t)},function(){return[[],[]]});function jp(e,t,f){var x=Ce(e)?bo:xa,D=arguments.length<3;return x(e,me(t,4),f,D,In)}function Zp(e,t,f){var x=Ce(e)?ah:xa,D=arguments.length<3;return x(e,me(t,4),f,D,Va)}function Qp(e,t){var f=Ce(e)?Tn:Ka;return f(e,Wr(me(t,3)))}function Jp(e){var t=Ce(e)?Ha:Gf;return t(e)}function qp(e,t,f){(f?Ct(e,t,f):t===u)?t=1:t=xe(t);var x=Ce(e)?$f:Vf;return x(e,t)}function eg(e){var t=Ce(e)?Sf:Yf;return t(e)}function tg(e){if(e==null)return 0;if(Lt(e))return Br(e)?oi(e):e.length;var t=yt(e);return t==He||t==Rt?e.size:Bo(e).length}function ng(e,t,f){var x=Ce(e)?$o:Xf;return f&&Ct(e,t,f)&&(t=u),x(e,me(t,3))}var ig=Te(function(e,t){if(e==null)return[];var f=t.length;return f>1&&Ct(e,t[0],t[1])?t=[]:f>2&&Ct(t[0],t[1],t[2])&&(t=[t[0]]),nl(e,vt(t,1),[])}),Dr=Fh||function(){return gt.Date.now()};function rg(e,t){if(typeof t!="function")throw new Gt(b);return e=xe(e),function(){if(--e<1)return t.apply(this,arguments)}}function Zl(e,t,f){return t=f?u:t,t=e&&t==null?e.length:t,wn(e,M,u,u,u,u,t)}function Ql(e,t){var f;if(typeof t!="function")throw new Gt(b);return e=xe(e),function(){return--e>0&&(f=t.apply(this,arguments)),e<=1&&(t=u),f}}var cs=Te(function(e,t,f){var x=c;if(f.length){var D=Mn(f,di(cs));x|=y}return wn(e,x,t,f,D)}),Jl=Te(function(e,t,f){var x=c|d;if(f.length){var D=Mn(f,di(Jl));x|=y}return wn(t,x,e,f,D)});function ql(e,t,f){t=f?u:t;var x=wn(e,R,u,u,u,u,u,t);return x.placeholder=ql.placeholder,x}function ec(e,t,f){t=f?u:t;var x=wn(e,$,u,u,u,u,u,t);return x.placeholder=ec.placeholder,x}function tc(e,t,f){var x,D,H,U,V,Q,ie=0,re=!1,oe=!1,ue=!0;if(typeof e!="function")throw new Gt(b);t=jt(t)||0,et(f)&&(re=!!f.leading,oe="maxWait"in f,H=oe?ct(jt(f.maxWait)||0,t):H,ue="trailing"in f?!!f.trailing:ue);function ge(st){var tn=x,_n=D;return x=D=u,ie=st,U=e.apply(_n,tn),U}function we(st){return ie=st,V=Ni(ke,t),re?ge(st):U}function Ee(st){var tn=st-Q,_n=st-ie,bc=t-tn;return oe?wt(bc,H-_n):bc}function ye(st){var tn=st-Q,_n=st-ie;return Q===u||tn>=t||tn<0||oe&&_n>=H}function ke(){var st=Dr();if(ye(st))return Re(st);V=Ni(ke,Ee(st))}function Re(st){return V=u,ue&&x?ge(st):(x=D=u,U)}function Wt(){V!==u&&hl(V),ie=0,x=Q=D=V=u}function At(){return V===u?U:Re(Dr())}function Nt(){var st=Dr(),tn=ye(st);if(x=arguments,D=this,Q=st,tn){if(V===u)return we(Q);if(oe)return hl(V),V=Ni(ke,t),ge(Q)}return V===u&&(V=Ni(ke,t)),U}return Nt.cancel=Wt,Nt.flush=At,Nt}var og=Te(function(e,t){return Ga(e,1,t)}),sg=Te(function(e,t,f){return Ga(e,jt(t)||0,f)});function ag(e){return wn(e,L)}function Fr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new Gt(b);var f=function(){var x=arguments,D=t?t.apply(this,x):x[0],H=f.cache;if(H.has(D))return H.get(D);var U=e.apply(this,x);return f.cache=H.set(D,U)||H,U};return f.cache=new(Fr.Cache||vn),f}Fr.Cache=vn;function Wr(e){if(typeof e!="function")throw new Gt(b);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function lg(e){return Ql(2,e)}var cg=jf(function(e,t){t=t.length==1&&Ce(t[0])?Je(t[0],Ot(me())):Je(vt(t,1),Ot(me()));var f=t.length;return Te(function(x){for(var D=-1,H=wt(x.length,f);++D=t}),Jn=ja(function(){return arguments}())?ja:function(e){return tt(e)&&Ge.call(e,"callee")&&!Da.call(e,"callee")},Ce=q.isArray,Cg=va?Ot(va):Rf;function Lt(e){return e!=null&&Nr(e.length)&&!$n(e)}function ot(e){return tt(e)&&Lt(e)}function Ag(e){return e===!0||e===!1||tt(e)&&_t(e)==ae}var Wn=Nh||$s,xg=ma?Ot(ma):If;function Eg(e){return tt(e)&&e.nodeType===1&&!Bi(e)}function Lg(e){if(e==null)return!0;if(Lt(e)&&(Ce(e)||typeof e=="string"||typeof e.splice=="function"||Wn(e)||pi(e)||Jn(e)))return!e.length;var t=yt(e);if(t==He||t==Rt)return!e.size;if(Wi(e))return!Bo(e).length;for(var f in e)if(Ge.call(e,f))return!1;return!0}function Tg(e,t){return Oi(e,t)}function kg(e,t,f){f=typeof f=="function"?f:u;var x=f?f(e,t):u;return x===u?Oi(e,t,u,f):!!x}function hs(e){if(!tt(e))return!1;var t=_t(e);return t==be||t==he||typeof e.message=="string"&&typeof e.name=="string"&&!Bi(e)}function Mg(e){return typeof e=="number"&&Wa(e)}function $n(e){if(!et(e))return!1;var t=_t(e);return t==Ie||t==dt||t==se||t==_i}function ic(e){return typeof e=="number"&&e==xe(e)}function Nr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=P}function et(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function tt(e){return e!=null&&typeof e=="object"}var rc=wa?Ot(wa):Df;function Rg(e,t){return e===t||No(e,t,ts(t))}function Ig(e,t,f){return f=typeof f=="function"?f:u,No(e,t,ts(t),f)}function Og(e){return oc(e)&&e!=+e}function Dg(e){if(wd(e))throw new _e(k);return Za(e)}function Fg(e){return e===null}function Wg(e){return e==null}function oc(e){return typeof e=="number"||tt(e)&&_t(e)==ze}function Bi(e){if(!tt(e)||_t(e)!=pt)return!1;var t=hr(e);if(t===null)return!0;var f=Ge.call(t,"constructor")&&t.constructor;return typeof f=="function"&&f instanceof f&&ar.call(f)==Rh}var fs=ya?Ot(ya):Ff;function Ng(e){return ic(e)&&e>=-P&&e<=P}var sc=ba?Ot(ba):Wf;function Br(e){return typeof e=="string"||!Ce(e)&&tt(e)&&_t(e)==fn}function Ft(e){return typeof e=="symbol"||tt(e)&&_t(e)==dn}var pi=$a?Ot($a):Nf;function Bg(e){return e===u}function Pg(e){return tt(e)&&yt(e)==Un}function Hg(e){return tt(e)&&_t(e)==ne}var zg=Tr(Po),Ug=Tr(function(e,t){return e<=t});function ac(e){if(!e)return[];if(Lt(e))return Br(e)?Jt(e):Et(e);if(xi&&e[xi])return bh(e[xi]());var t=yt(e),f=t==He?Eo:t==Rt?rr:gi;return f(e)}function Sn(e){if(!e)return e===0?e:0;if(e=jt(e),e===W||e===-W){var t=e<0?-1:1;return t*z}return e===e?e:0}function xe(e){var t=Sn(e),f=t%1;return t===t?f?t-f:t:0}function lc(e){return e?Xn(xe(e),0,Y):0}function jt(e){if(typeof e=="number")return e;if(Ft(e))return G;if(et(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=et(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ea(e);var f=_u.test(e);return f||Au.test(e)?ih(e.slice(2),f?2:8):Su.test(e)?G:+e}function cc(e){return an(e,Tt(e))}function Gg(e){return e?Xn(xe(e),-P,P):e===0?e:0}function Ue(e){return e==null?"":Dt(e)}var Vg=hi(function(e,t){if(Wi(t)||Lt(t)){an(t,ft(t),e);return}for(var f in t)Ge.call(t,f)&&Mi(e,f,t[f])}),uc=hi(function(e,t){an(t,Tt(t),e)}),Pr=hi(function(e,t,f,x){an(t,Tt(t),e,x)}),Kg=hi(function(e,t,f,x){an(t,ft(t),e,x)}),Yg=yn(Io);function Xg(e,t){var f=ui(e);return t==null?f:za(f,t)}var jg=Te(function(e,t){e=Ke(e);var f=-1,x=t.length,D=x>2?t[2]:u;for(D&&Ct(t[0],t[1],D)&&(x=1);++f1),H}),an(e,qo(e),f),x&&(f=Kt(f,r|o|i,sd));for(var D=t.length;D--;)Vo(f,t[D]);return f});function dv(e,t){return fc(e,Wr(me(t)))}var pv=yn(function(e,t){return e==null?{}:Hf(e,t)});function fc(e,t){if(e==null)return{};var f=Je(qo(e),function(x){return[x]});return t=me(t),il(e,f,function(x,D){return t(x,D[0])})}function gv(e,t,f){t=Dn(t,e);var x=-1,D=t.length;for(D||(D=1,e=u);++xt){var x=e;e=t,t=x}if(f||e%1||t%1){var D=Na();return wt(e+D*(t-e+nh("1e-"+((D+"").length-1))),t)}return zo(e,t)}var xv=fi(function(e,t,f){return t=t.toLowerCase(),e+(f?gc(t):t)});function gc(e){return gs(Ue(e).toLowerCase())}function vc(e){return e=Ue(e),e&&e.replace(Eu,gh).replace(Ku,"")}function Ev(e,t,f){e=Ue(e),t=Dt(t);var x=e.length;f=f===u?x:Xn(xe(f),0,x);var D=f;return f-=t.length,f>=0&&e.slice(f,D)==t}function Lv(e){return e=Ue(e),e&&au.test(e)?e.replace(Ys,vh):e}function Tv(e){return e=Ue(e),e&&du.test(e)?e.replace(co,"\\$&"):e}var kv=fi(function(e,t,f){return e+(f?"-":"")+t.toLowerCase()}),Mv=fi(function(e,t,f){return e+(f?" ":"")+t.toLowerCase()}),Rv=yl("toLowerCase");function Iv(e,t,f){e=Ue(e),t=xe(t);var x=t?oi(e):0;if(!t||x>=t)return e;var D=(t-x)/2;return Lr(gr(D),f)+e+Lr(pr(D),f)}function Ov(e,t,f){e=Ue(e),t=xe(t);var x=t?oi(e):0;return t&&x>>0,f?(e=Ue(e),e&&(typeof t=="string"||t!=null&&!fs(t))&&(t=Dt(t),!t&&ri(e))?Fn(Jt(e),0,f):e.split(t,f)):[]}var Hv=fi(function(e,t,f){return e+(f?" ":"")+gs(t)});function zv(e,t,f){return e=Ue(e),f=f==null?0:Xn(xe(f),0,e.length),t=Dt(t),e.slice(f,f+t.length)==t}function Uv(e,t,f){var x=B.templateSettings;f&&Ct(e,t,f)&&(t=u),e=Ue(e),t=Pr({},t,x,xl);var D=Pr({},t.imports,x.imports,xl),H=ft(D),U=xo(D,H),V,Q,ie=0,re=t.interpolate||qi,oe="__p += '",ue=Lo((t.escape||qi).source+"|"+re.source+"|"+(re===Xs?$u:qi).source+"|"+(t.evaluate||qi).source+"|$","g"),ge="//# sourceURL="+(Ge.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qu+"]")+` +`;e.replace(ue,function(ye,ke,Re,Wt,At,Nt){return Re||(Re=Wt),oe+=e.slice(ie,Nt).replace(Lu,mh),ke&&(V=!0,oe+=`' + +__e(`+ke+`) + +'`),At&&(Q=!0,oe+=`'; +`+At+`; +__p += '`),Re&&(oe+=`' + +((__t = (`+Re+`)) == null ? '' : __t) + +'`),ie=Nt+ye.length,ye}),oe+=`'; +`;var we=Ge.call(t,"variable")&&t.variable;if(!we)oe=`with (obj) { +`+oe+` +} +`;else if(yu.test(we))throw new _e(S);oe=(Q?oe.replace(Ji,""):oe).replace(ru,"$1").replace(ou,"$1;"),oe="function("+(we||"obj")+`) { +`+(we?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(Q?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+oe+`return __p +}`;var Ee=wc(function(){return Be(H,ge+"return "+oe).apply(u,U)});if(Ee.source=oe,hs(Ee))throw Ee;return Ee}function Gv(e){return Ue(e).toLowerCase()}function Vv(e){return Ue(e).toUpperCase()}function Kv(e,t,f){if(e=Ue(e),e&&(f||t===u))return Ea(e);if(!e||!(t=Dt(t)))return e;var x=Jt(e),D=Jt(t),H=La(x,D),U=Ta(x,D)+1;return Fn(x,H,U).join("")}function Yv(e,t,f){if(e=Ue(e),e&&(f||t===u))return e.slice(0,Ma(e)+1);if(!e||!(t=Dt(t)))return e;var x=Jt(e),D=Ta(x,Jt(t))+1;return Fn(x,0,D).join("")}function Xv(e,t,f){if(e=Ue(e),e&&(f||t===u))return e.replace(uo,"");if(!e||!(t=Dt(t)))return e;var x=Jt(e),D=La(x,Jt(t));return Fn(x,D).join("")}function jv(e,t){var f=F,x=E;if(et(t)){var D="separator"in t?t.separator:D;f="length"in t?xe(t.length):f,x="omission"in t?Dt(t.omission):x}e=Ue(e);var H=e.length;if(ri(e)){var U=Jt(e);H=U.length}if(f>=H)return e;var V=f-oi(x);if(V<1)return x;var Q=U?Fn(U,0,V).join(""):e.slice(0,V);if(D===u)return Q+x;if(U&&(V+=Q.length-V),fs(D)){if(e.slice(V).search(D)){var ie,re=Q;for(D.global||(D=Lo(D.source,Ue(js.exec(D))+"g")),D.lastIndex=0;ie=D.exec(re);)var oe=ie.index;Q=Q.slice(0,oe===u?V:oe)}}else if(e.indexOf(Dt(D),V)!=V){var ue=Q.lastIndexOf(D);ue>-1&&(Q=Q.slice(0,ue))}return Q+x}function Zv(e){return e=Ue(e),e&&su.test(e)?e.replace(Ks,Ch):e}var Qv=fi(function(e,t,f){return e+(f?" ":"")+t.toUpperCase()}),gs=yl("toUpperCase");function mc(e,t,f){return e=Ue(e),t=f?u:t,t===u?yh(e)?Eh(e):uh(e):e.match(t)||[]}var wc=Te(function(e,t){try{return It(e,u,t)}catch(f){return hs(f)?f:new _e(f)}}),Jv=yn(function(e,t){return Ut(t,function(f){f=ln(f),mn(e,f,cs(e[f],e))}),e});function qv(e){var t=e==null?0:e.length,f=me();return e=t?Je(e,function(x){if(typeof x[1]!="function")throw new Gt(b);return[f(x[0]),x[1]]}):[],Te(function(x){for(var D=-1;++DP)return[];var f=Y,x=wt(e,Y);t=me(t),e-=Y;for(var D=Ao(x,t);++f0||t<0)?new Me(f):(e<0?f=f.takeRight(-e):e&&(f=f.drop(e)),t!==u&&(t=xe(t),f=t<0?f.dropRight(-t):f.take(t-e)),f)},Me.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Me.prototype.toArray=function(){return this.take(Y)},sn(Me.prototype,function(e,t){var f=/^(?:filter|find|map|reject)|While$/.test(t),x=/^(?:head|last)$/.test(t),D=B[x?"take"+(t=="last"?"Right":""):t],H=x||/^find/.test(t);D&&(B.prototype[t]=function(){var U=this.__wrapped__,V=x?[1]:arguments,Q=U instanceof Me,ie=V[0],re=Q||Ce(U),oe=function(ke){var Re=D.apply(B,kn([ke],V));return x&&ue?Re[0]:Re};re&&f&&typeof ie=="function"&&ie.length!=1&&(Q=re=!1);var ue=this.__chain__,ge=!!this.__actions__.length,we=H&&!ue,Ee=Q&&!ge;if(!H&&re){U=Ee?U:new Me(this);var ye=e.apply(U,V);return ye.__actions__.push({func:Ir,args:[oe],thisArg:u}),new Vt(ye,ue)}return we&&Ee?e.apply(this,V):(ye=this.thru(oe),we?x?ye.value()[0]:ye.value():ye)})}),Ut(["pop","push","shift","sort","splice","unshift"],function(e){var t=or[e],f=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",x=/^(?:pop|shift)$/.test(e);B.prototype[e]=function(){var D=arguments;if(x&&!this.__chain__){var H=this.value();return t.apply(Ce(H)?H:[],D)}return this[f](function(U){return t.apply(Ce(U)?U:[],D)})}}),sn(Me.prototype,function(e,t){var f=B[t];if(f){var x=f.name+"";Ge.call(ci,x)||(ci[x]=[]),ci[x].push({name:t,func:f})}}),ci[xr(u,d).name]=[{name:"wrapper",func:u}],Me.prototype.clone=jh,Me.prototype.reverse=Zh,Me.prototype.value=Qh,B.prototype.at=Ep,B.prototype.chain=Lp,B.prototype.commit=Tp,B.prototype.next=kp,B.prototype.plant=Rp,B.prototype.reverse=Ip,B.prototype.toJSON=B.prototype.valueOf=B.prototype.value=Op,B.prototype.first=B.prototype.head,xi&&(B.prototype[xi]=Mp),B},si=Lh();Gn?((Gn.exports=si)._=si,mo._=si):gt._=si}).call(Pi)})(ro,ro.exports);var vy=ro.exports;const my=Dc(vy),wy={class:"container pt-5"},yy={class:"accordion",id:"accordionArea"},by=["id"],$y=["data-bs-target","aria-controls"],Sy=["id","aria-labelledby"],_y={class:"accordion-body"},Cy=["onClick"],Ay=zn({__name:"workflowStageList",props:{workflowStageMappingsFormData:{},pipelineScriptList:{}},emits:["on-start-drag","on-finish-drag","splice-workflow-stage-mappings-form-data","set-pipeline-order"],setup(I,{emit:C}){const u=I,g=C,N=h=>{let s=h.draggedContext.futureIndex,r=h.draggedContext.element.isDefaultScript,o=!0;return r&&(o=!1),(s<1||s>u.workflowStageMappingsFormData.length-1)&&(o=!1),o},k=h=>h,b=h=>{if(u.workflowStageMappingsFormData.length<1)return;const s=h,r={stageOrder:s.workflowStageOrder,workflowStageTypeIdx:s.workflowStageTypeIdx,stageContent:s.workflowStageContent,defaultScriptTag:"null",isDefaultScript:!1};g("splice-workflow-stage-mappings-form-data",r),g("set-pipeline-order")},S=()=>{g("on-start-drag")},l=()=>{g("on-finish-drag")};return(h,s)=>{const r=Hs("VueDraggableNext");return We(),Ne("div",wy,[ve("div",yy,[(We(!0),Ne(An,null,Hn(h.pipelineScriptList,(o,i)=>(We(),Ne("div",{class:"accordion-item",key:i},[ve("h2",{class:"accordion-header",id:"heading"+o},[ve("button",{class:"accordion-button collapsed",type:"button","data-bs-toggle":"collapse","data-bs-target":"#collapse"+i,"aria-expanded":"false","aria-controls":"collapse"+i},Qt(o.title),9,$y)],8,by),ve("div",{id:"collapse"+i,class:"accordion-collapse collapse","aria-labelledby":"heading"+i,"data-bs-parent":"#accordionArea"},[ve("div",_y,[rn(r,{list:o.list,group:{name:"pipelineEidtor",pull:"clone",put:!1},move:N,clone:k,onStart:S,onEnd:l},{default:Nc(()=>[(We(!0),Ne(An,null,Hn(o.list,(n,a)=>(We(),Ne("div",{key:a,class:"paletteItem",onClick:c=>b(n)},Qt(n?n.workflowStageName:"등록된 스테이지가 없습니다."),9,Cy))),128))]),_:2},1032,["list"])])],8,Sy)]))),128))])])}}}),xy=so(Ay,[["__scopeId","data-v-2ee3fc5d"]]),Ey={class:"mb-3"},Ly={class:"p-1"},Ty={class:"grid gap-0 g-col-12"},ky={key:0,class:"p-2 g-col-8"},My={key:1},Ry={class:"p-2 g-col-4"},Iy=zn({__name:"PipelineGenerator",props:{mode:{},workflowStageMappingsFormData:{}},emits:["init-workflow-stage-mappings","on-click-create-script","splice-workflow-stage-mappings-form-data"],setup(I,{emit:C}){zs();const u=I,g=C;oo(()=>{S()});const{workflowStageMappingsFormData:N}=Fc(u),k=()=>{g("on-click-create-script")},b=$t([]),S=async()=>{try{const a=await Km();b.value=a.data?a.data:{}}catch{b.value={}}},l=a=>{let c=a.draggedContext.futureIndex,d=a.draggedContext.element.isDefaultScript,p=!0;return d&&(p=!1),(c<1||c>b.value.length-2)&&(p=!1),p},h=$t(!1),s=a=>{h.value=!0},r=a=>{h.value=!1,o()},o=()=>{let a=1;Object.keys(b.value).forEach(d=>{b.value[d].list.forEach(p=>{p.defaultScriptTag&&(p.defaultScriptTag=="DEFAULT_START"?p.stageOrder=0:p.defaultScriptTag=="DEFAULT_EMD"?p.stageOrder=b.value.length-1:(p.stageOrder=a,a+=1))})})},i=a=>{if(!(a==0||a==N.value.length-1)){if(!confirm("파이프라인을 삭제하시겠습니까?"))return!1;N.value.splice(a,1)}},n=a=>{g("splice-workflow-stage-mappings-form-data",a)};return(a,c)=>(We(),Ne("div",Ey,[ve("div",{class:"grid gap-0 column-gap-3 border-bottom pb-5 pt-5"},[c[0]||(c[0]=ve("label",{class:"form-label required p-2 g-col-11"}," Pipeline ",-1)),ve("button",{class:"btn btn-primary",onClick:k}," Create Script ")]),ve("div",Ly,[ve("div",Ty,[rt(N)?(We(),Ne("div",ky,[rn(rt(Hw),{list:rt(N),group:{name:"pipelineEidtor",pull:!1,put:!0},move:l,onStart:s,onEnd:r},{default:Nc(()=>[(We(!0),Ne(An,null,Hn(rt(N),(d,p)=>(We(),Ne("div",{key:p},[rn(gy,{idx:p,"pipeline-info":d,"pipeline-script-list":b.value,"drag-flag":h.value,onOnDeletePipeline:i},null,8,["idx","pipeline-info","pipeline-script-list","drag-flag"])]))),128))]),_:1},8,["list"])])):(We(),Ne("div",My,c[1]||(c[1]=[ve("span",null,"스크립트 생성 버튼을 클릭해주세요",-1)]))),ve("div",Ry,[rn(xy,{"workflow-stage-mappings-form-data":rt(N),"pipeline-script-list":b.value,onOnStartDrag:s,onOnFinishDrag:r,onSpliceWorkflowStageMappingsFormData:n,onSetPipelineOrder:o},null,8,["workflow-stage-mappings-form-data","pipeline-script-list"])])])])]))}}),Oy=so(Iy,[["__scopeId","data-v-afb55bcd"]]),Dy={class:"modal",id:"workflowHistoryDetailPopup",tabindex:"-1"},Fy={class:"modal-dialog modal-xl",role:"document"},Wy={class:"modal-content"},Ny={class:"modal-body text-left py-4"},By={class:"mb-5"},Py={class:"steps steps-counter"},Hy=["onClick"],zy={class:"card mt-8"},Uy={class:"card-body"},Gy={class:"row row-deck"},Vy={class:"card"},Ky={style:{display:"flex !important","justify-content":"space-between !important"}},Yy={class:"stage-title"},Xy={style:{cursor:"pointer"}},jy=["onClick"],Zy=["onClick"],Qy={key:0},Jy={key:1},qy=zn({__name:"WorkflowHistoryPopoup",props:{workflowIdx:{},workflowName:{},buildName:{},workflowStages:{}},setup(I){zs();const C=I;Zr(()=>C.workflowStages,()=>{C.workflowStages.length>0&&g(C.workflowStages[0])});const u=$t([]),g=async k=>{const b={workflowIdx:C.workflowIdx,buildName:C.buildName,stageIdx:k.id};await Ym(b).then(({data:S})=>{S.stageFlowNodes.forEach(l=>{l.flag=!1}),u.value=S})},N=k=>{u.value.stageFlowNodes[k].flag=!u.value.stageFlowNodes[k].flag};return(k,b)=>(We(),Ne("div",Dy,[ve("div",Fy,[ve("div",Wy,[b[2]||(b[2]=ve("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),b[3]||(b[3]=ve("div",{class:"modal-status bg-info"},null,-1)),ve("div",Ny,[ve("h3",By,Qt(C.workflowName),1),ve("div",Py,[(We(!0),Ne(An,null,Hn(k.workflowStages,(S,l)=>(We(),Ne("span",{class:Wc(["step-item",{active:S.status==="IN_PROGRESS"}]),key:l,onClick:h=>g(S),style:{cursor:"pointer"}},Qt(S.name),11,Hy))),128))]),ve("div",zy,[ve("div",Uy,[ve("div",Gy,[ve("div",Vy,[(We(!0),Ne(An,null,Hn(u.value.stageFlowNodes,(S,l)=>(We(),Ne("div",{key:l,class:"card-body"},[ve("div",Ky,[ve("p",Yy,Qt(S.name),1),ve("a",Xy,[S.flag?(We(),Ne("svg",{key:1,xmlns:"http://www.w3.org/2000/svg",onClick:h=>N(l),width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-up"},b[1]||(b[1]=[ve("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),ve("path",{d:"M6 15l6 -6l6 6"},null,-1)]),8,Zy)):(We(),Ne("svg",{key:0,onClick:h=>N(l),xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-chevron-down"},b[0]||(b[0]=[ve("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),ve("path",{d:"M6 9l6 6l6 -6"},null,-1)]),8,jy))])]),S.flag&&S.parameterDescription?(We(),Ne("div",Qy,Qt(S.parameterDescription),1)):ji("",!0),S.flag&&S.error!==null?(We(),Ne("div",Jy,Qt(S.error.type),1)):ji("",!0)]))),128))])])])])]),b[4]||(b[4]=ve("div",{class:"modal-footer"},[ve("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ")],-1))])])]))}}),e0=so(qy,[["__scopeId","data-v-509c6b86"]]),t0={class:"mt-5 mb-5"},n0=zn({__name:"WorkflowHistoryList",props:{workflowIdx:{},workflowName:{}},setup(I){const C=$t(!0),u=$t(!1),g=I;Zr(()=>g.workflowIdx,async()=>{g.workflowIdx!==0&&await k(g.workflowIdx)}),Zr(()=>u.value,()=>{}),oo(()=>{h()});const N=$t([]),k=async o=>{C.value=!0,await Xm(o).then(({data:i})=>{C.value=!1,i.forEach(n=>{n.startTimeMillis=new Date(n.startTimeMillis).toLocaleString(),n.user="ADMIN"}),N.value=my.sortBy(i,"name").reverse(),u.value=!0})},b=$t([]),S=$t(""),l=$t([]),h=()=>{b.value=[{title:"Name",field:"name",width:"20%"},{title:"Status",field:"status",width:"20%",formatter:s},{title:"User",field:"user",width:"20%"},{title:"Run time",field:"startTimeMillis",width:"20%"},{title:"Action",width:"20%",formatter:r,cellClick:function(o,i){S.value=i.getRow().getData().name.replace("#",""),l.value=i.getRow().getData().stages}}]},s=o=>{const i=o.getValue();return` +
+ + + ${i} + +
+ `},r=()=>` +
+ +
`;return(o,i)=>{const n=Hs("b-overlay");return We(),Ne(An,null,[ve("div",t0,[i[0]||(i[0]=ve("label",{class:"form-label"}," History ",-1)),rn(n,{show:C.value,id:"overlay-background",variant:"transparent",opacity:"1",blur:"1rem",rounded:"lg",style:{"z-index":"1000"}},null,8,["show"]),ve("div",null,[rn(tw,{columns:b.value,"table-data":N.value},null,8,["columns","table-data"])])]),rn(e0,{"workflow-idx":g.workflowIdx,"build-name":S.value,"workflow-name":g.workflowName,"workflow-stages":l.value},null,8,["workflow-idx","build-name","workflow-name","workflow-stages"])],64)}}}),i0={class:"card w-100",ref:"workflowForm"},r0={class:"card-header"},o0={class:"card-title"},s0={key:0,class:"card-body"},a0={class:"card-title"},l0={class:"mb-3"},c0={class:"grid gap-0 column-gap-3"},u0={key:1,class:"btn btn-success"},h0={class:"mb-3"},f0={class:"grid gap-0 column-gap-3"},d0=["value"],p0={class:"row align-items-center"},g0={class:"col-auto ms-auto"},v0={class:"btn-list"},$0=zn({__name:"WorkflowForm",setup(I){const C=zs(),u=Pm(),g=Hm();oo(()=>{k(),r(),d(),a()});const N=$t("new"),k=()=>{N.value=u.params.workflowIdx===void 0?"new":"detail"};let b=zm({});const S=$t([]),l=$t([]),h={workflowIdx:0,workflowName:"",workflowPurpose:"",ossIdx:0,script:""},s=[{paramKey:"",paramValue:"",eventListenerYn:"N"}],r=async()=>{if(N.value==="new")b={...h},S.value=[...s],l.value=[];else{const{data:_}=await jm(u.params.workflowIdx,"N");b={..._.workflowInfo},S.value=[..._.workflowParams],l.value=[..._.workflowStageMappings],b={...b,workflowIdx:u.params.workflowIdx},o.value=!0}},o=$t(!1),i=async _=>{const{data:T}=await Qm(_);T?C.error("이미 사용중인 이름입니다."):(C.success("사용 가능한 이름입니다."),o.value=!0)},n=$t([]),a=()=>{n.value=[{name:"배포용",value:"deploy"},{name:"실행용",value:"run"},{name:"테스트용",value:"test"},{name:"웹훅용",value:"webhook"}]},c=$t(""),d=async()=>{try{const{data:_}=await Vm("JENKINS");_&&b&&(N.value==="new"?(b.ossIdx=_?_[0].ossIdx:"OSS 정보가 없습니다.",c.value=_?_[0].ossUrl:"NULL"):_.forEach(T=>{T.ossIdx===b.ossIdx&&(c.value=T.ossUrl)}))}catch(_){console.log(_)}},p=async()=>{y(),N.value==="new"?await R():await $()},R=async()=>{const _={workflowInfo:{...b},workflowParams:[...S.value],workflowStageMappings:[...l.value]},{data:T}=await Jm(_);T?(C.success("등록 되었습니다."),g.push("/web/workflow/list")):C.error("등록하지 못했습니다.")},$=async()=>{const _={workflowInfo:{...b},workflowParams:[...S.value],workflowStageMappings:[...l.value]},{data:T}=await qm(_);T?(C.success("수정 되었습니다."),g.push("/web/workflow/list")):C.error("수정하지 못했습니다.")},y=()=>{m(),O(),N.value=="new"&&M()},m=()=>{let _="";l.value.forEach(T=>{_+=T.stageContent,T.isDefaultScript||(_+=` +`)}),b={...b,script:_}},M=()=>{delete b.workflowIdx},O=()=>{S.value.forEach(_=>{delete _.paramIdx})},L=()=>{g.push("/web/workflow/list")},F=()=>{l.value=[]},E=async()=>{if(b.workflowName===""){C.error("워크플로우 명을 입력해주세요.");return}else if(!b.workflowPurpose){C.error("목적을 선택해주세요.");return}await w(b.workflowName)},A=["DEFAULT_START","DEFAULT_END"],w=async _=>{try{F();const{data:T}=await ew(_),W=T||[];W.forEach((P,z)=>{P.isDefaultScript=!0,P.defaultScriptTag=A[z]}),l.value=[...W]}catch(T){l.value=[],C.error(String(T))}},v=_=>{l.value.splice(l.value.length-1,0,_)};return(_,T)=>(We(),Ne("div",i0,[ve("div",r0,[ve("div",o0,[ve("h1",null,Qt(N.value==="new"?"New":"Detail")+" Workflow",1)])]),rt(b)&&S.value&&l.value?(We(),Ne("div",s0,[ve("div",a0,[ve("div",l0,[T[3]||(T[3]=ve("label",{class:"form-label required"}," Workflow Name ",-1)),ve("div",c0,[$c(ve("input",{type:"text",ref:"workflowName",class:"form-control p-2 g-col-11",placeholder:"Enter the workflow name","onUpdate:modelValue":T[0]||(T[0]=W=>rt(b).workflowName=W)},null,512),[[Um,rt(b).workflowName]]),o.value?(We(),Ne("button",u0,"Duplicate Check")):(We(),Ne("button",{key:0,class:"btn btn-primary",onClick:T[1]||(T[1]=W=>i(rt(b).workflowName))},"Duplicate Check"))])]),ve("div",h0,[T[5]||(T[5]=ve("label",{class:"form-label required"},"Purpose",-1)),ve("div",f0,[$c(ve("select",{ref:"workflowPurpose","onUpdate:modelValue":T[2]||(T[2]=W=>rt(b).workflowPurpose=W),class:"form-select p-2 g-col-12"},[T[4]||(T[4]=ve("option",{value:""},"Select Workflow Purpose.",-1)),(We(!0),Ne(An,null,Hn(n.value,(W,P)=>(We(),Ne("option",{value:W.value,key:P},Qt(W.name),9,d0))),128))],512),[[Gm,rt(b).workflowPurpose]])])]),rn(Oy,{mode:N.value,"workflow-stage-mappings-form-data":l.value,onInitWorkflowStageMappings:F,onOnClickCreateScript:E,onSpliceWorkflowStageMappingsFormData:v},null,8,["mode","workflow-stage-mappings-form-data"]),rn(Zm,{popup:!1,"workflow-param-data":S.value,"event-listener-yn":"N"},null,8,["workflow-param-data"]),rn(n0,{"workflow-idx":rt(b).workflowIdx,"workflow-name":rt(b).workflowName},null,8,["workflow-idx","workflow-name"]),ve("div",p0,[T[6]||(T[6]=ve("div",{id:"gap",class:"col"},null,-1)),ve("div",g0,[ve("div",v0,[ve("button",{class:"btn btn-primary",onClick:p},Qt(N.value==="new"?"Regist":"Edit"),1),ve("button",{class:"btn btn-right border",onClick:L}," To List ")])])])])])):ji("",!0)],512))}});export{$0 as default}; diff --git a/src/main/resources/static/assets/WorkflowList-_g7datXD.js b/src/main/resources/static/assets/WorkflowList-_g7datXD.js new file mode 100644 index 0000000..78df5d6 --- /dev/null +++ b/src/main/resources/static/assets/WorkflowList-_g7datXD.js @@ -0,0 +1,38 @@ +import{_ as N}from"./TableHeader.vue_vue_type_script_setup_true_lang-CtosSeSW.js";import{_ as D}from"./request-CmxyMwC5.js";import{d as L,P as F,a as P,r as R,b as S,g as B}from"./ParamForm-CikIVyrv.js";import{d as g,u as y,a as w,b as m,e as t,t as W,c as I,r as f,w as $,k as E,j as x,l as V,F as A,g as G,o as T,m as C,n as O,i as p}from"./index-BPhSkGh_.js";const U={class:"modal",id:"deleteWorkflow",tabindex:"-1"},j={class:"modal-dialog modal-lg",role:"document"},z={class:"modal-content"},M={class:"modal-body text-left py-4"},q={class:"modal-footer"},H=g({__name:"DeleteWorkflow",props:{workflowName:{},workflowIdx:{}},emits:["get-workflow-list"],setup(v,{emit:b}){const r=y(),d=v,i=b,o=async()=>{const{data:n}=await L(d.workflowIdx);n?r.success("삭제되었습니다."):r.error("삭제하지 못했습니다."),i("get-workflow-list")};return(n,s)=>(w(),m("div",U,[t("div",j,[t("div",z,[s[3]||(s[3]=t("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),s[4]||(s[4]=t("div",{class:"modal-status bg-danger"},null,-1)),t("div",M,[s[1]||(s[1]=t("h3",{class:"mb-5"}," Delete Workflow ",-1)),t("h4",null,"Are you sure you want to delete "+W(d.workflowName)+"?",1)]),t("div",q,[s[2]||(s[2]=t("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),t("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:s[0]||(s[0]=l=>o())}," Delete ")])])])]))}}),J={class:"modal",id:"runWorkflow",tabindex:"-1"},K={class:"modal-dialog modal-lg",role:"document"},Q={class:"modal-content"},X={class:"modal-body text-left py-4"},Y={class:"modal-footer"},Z=g({__name:"RunWorkflow",props:{workflowIdx:{}},emits:["get-workflow-list"],setup(v,{emit:b}){const r=y(),d=v,i=b,o=I(()=>d.workflowIdx),n=f({});$(()=>o.value,async()=>{const{data:l}=await P(o.value,"N");n.value=l});const s=async()=>{r.success("워크플로우가 실행 되었습니다."),i("get-workflow-list"),await R(n.value).then(({data:l})=>{l?r.success("워크플로우가 정상적으로 완료 되었습니다."):r.error("워크플로우가 정상적으로 완료 되지 못했습니다.")})};return(l,a)=>(w(),m("div",J,[t("div",K,[t("div",Q,[a[3]||(a[3]=t("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),a[4]||(a[4]=t("div",{class:"modal-status bg-danger"},null,-1)),t("div",X,[a[1]||(a[1]=t("h3",{class:"mb-5"}," Run Workflow ",-1)),n.value.workflowParams?(w(),E(F,{key:0,popup:!0,"workflow-param-data":n.value.workflowParams,"event-listener-yn":"N"},null,8,["workflow-param-data"])):x("",!0)]),t("div",Y,[a[2]||(a[2]=t("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),t("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:a[0]||(a[0]=k=>s())}," Run ")])])])]))}}),tt={class:"modal",id:"workflowLog",tabindex:"-1"},ot={class:"modal-dialog modal-xl",role:"document"},st={class:"modal-content"},et={class:"modal-body text-left py-4"},at={class:"mb-5"},lt={key:0,class:"spinner-border",role:"status"},nt={key:0},rt={class:"card mb-3"},dt=["onClick"],it={class:"card-title"},ut={key:0,class:"card-body"},ct=["value"],wt=g({__name:"WorkflowLog",props:{workflowIdx:{}},emits:["get-oss-list"],setup(v,{emit:b}){y();const r=v,d=f(!1),i=I(()=>r.workflowIdx);$(i,async()=>{d.value=!1,await n()});const o=f([]),n=async()=>{o.value=[],await S(i.value).then(({data:k})=>{o.value=k,d.value=!0})},s=()=>{o.value=[],l.value=1},l=f(1),a=k=>{l.value===k?l.value=0:l.value=k};return(k,u)=>(w(),m("div",tt,[t("div",ot,[t("div",st,[u[3]||(u[3]=t("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),t("div",et,[t("h3",at,[u[1]||(u[1]=V(" Workflow Log ")),d.value?x("",!0):(w(),m("div",lt,u[0]||(u[0]=[t("span",{class:"visually-hidden"},"Loading...",-1)])))]),t("div",null,[o.value.length<=0?(w(),m("div",nt,u[2]||(u[2]=[t("p",{class:"text-secondary"},"No Data",-1)]))):(w(!0),m(A,{key:1},G(o.value,e=>(w(),m("div",{key:e.buildIdx},[t("div",rt,[t("div",{class:"card-header",onClick:c=>a(e.buildIdx),style:{cursor:"pointer"}},[t("h3",it,W(e.buildIdx),1)],8,dt),l.value===e.buildIdx?(w(),m("div",ut,[t("textarea",{value:e.buildLog,disabled:"",style:{width:"100%"},rows:"20"},null,8,ct)])):x("",!0)])]))),128))])]),t("div",{class:"modal-footer"},[t("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:s}," Cancel ")])])])]))}}),mt={class:"card card-flush w-100"},pt=g({__name:"WorkflowList",setup(v){const b=f(!0);y();const r=f([]),d=f([]);T(async()=>{s(),await i()});const i=async()=>{try{alert("test"),b.value=!0,await B("N").then(({data:e})=>{b.value=!1,r.value=e})}catch(e){console.log(e)}},o=f(0),n=f(""),s=()=>{d.value=[{title:"Workflow Name",field:"workflowInfo.workflowName",width:"30%"},{title:"Workflow Purpose",field:"workflowInfo.workflowPurpose",width:"10%"},{title:"Status",field:"workflowInfo.status",width:"10%",formatter:k},{title:"Params Count",formatter:a,width:"10%"},{title:"Created Date",field:"regDate",width:"20%"},{title:"Action",width:"20%",formatter:u,cellClick:async(e,c)=>{const _=e.target,h=_==null?void 0:_.getAttribute("id");o.value=c.getRow().getData().workflowInfo.workflowIdx,h==="detail-btn"?C.push("/web/workflow/detail/"+o.value):h==="delete-btn"&&(n.value=c.getRow().getData().workflowInfo.workflowName)}}]},l=()=>{C.push("/web/workflow/new")},a=e=>`${e._cell.row.data.workflowParams.length}`,k=e=>{const c=e.getValue();return` +
+ + + ${c} + +
+ `},u=()=>` +
+ + + + +
`;return(e,c)=>{const _=O("b-overlay");return w(),m("div",mt,[p(N,{"header-title":"Workflow","new-btn-title":"New Workflow",popupFlag:!1,popupTarget:"",onClickNewBtn:l}),p(D,{columns:d.value,"table-data":r.value},null,8,["columns","table-data"]),p(H,{"workflow-name":n.value,"workflow-idx":o.value,onGetWorkflowList:i},null,8,["workflow-name","workflow-idx"]),p(Z,{"workflow-idx":o.value,onGetWorkflowList:i},null,8,["workflow-idx"]),p(wt,{"workflow-idx":o.value},null,8,["workflow-idx"]),p(_,{show:b.value,id:"overlay-background",variant:"transparent",opacity:"1",blur:"1rem",rounded:"lg",style:{"z-index":"1000"}},null,8,["show"])])}}});export{pt as default}; diff --git a/src/main/resources/static/assets/WorkflowStageList-CxXBB1gI.js b/src/main/resources/static/assets/WorkflowStageList-CxXBB1gI.js new file mode 100644 index 0000000..f19264c --- /dev/null +++ b/src/main/resources/static/assets/WorkflowStageList-CxXBB1gI.js @@ -0,0 +1,17 @@ +import{_ as V}from"./TableHeader.vue_vue_type_script_setup_true_lang-CtosSeSW.js";import{s as k,_ as B}from"./request-CmxyMwC5.js";import{d as C,u as D,c as A,w as U,o as h,r as g,a as i,b as d,e,t as T,j as q,f as W,v as M,F as R,g as j,h as _,i as N}from"./index-BPhSkGh_.js";const G=()=>k.get("/workflowStageType/list"),O=()=>k.get("/workflowStage/list");function P(a){return k.get("/workflowStage/"+a)}function z(a){return k.get(`/workflowStage/duplicate?workflowStageName=${a.workflowStageName}&workflowStageTypeName=${a.workflowStageTypeName}`)}function H(a){return k.post("/workflowStage",a)}function J(a){return k.patch(`/workflowStage/${a.workflowStageIdx}`,a)}function K(a){return k.delete(`/workflowStage/${a}`)}function Q(a){return k.get(`/workflowStage/default/script/${a}`)}const X={class:"modal",id:"workflowStageForm",tabindex:"-1"},Y={class:"modal-dialog modal-lg",role:"document"},Z={class:"modal-content"},ee={class:"modal-body text-left py-4"},te={class:"mb-5"},oe={class:"mb-3"},ae={style:{display:"flex","justify-content":"start"}},le={key:0},se={class:"grid gap-0 column-gap-3"},ne=["value"],re={class:"mb-3"},we={class:"grid gap-0 column-gap-3"},ie={class:"col"},de={key:1,class:"btn btn-success",style:{margin:"3px"}},ge={class:"mb-3"},fe={class:"mb-3"},ce={class:"modal-footer"},ue=C({__name:"WorkflowStageForm",props:{mode:{},workflowStageIdx:{}},emits:["get-workflow-stage-list"],setup(a,{emit:b}){const w=D(),r=a,f=b,c=A(()=>r.workflowStageIdx);U(c,async()=>{p(),await l()}),h(async()=>{p(),await l()});const t=g({}),l=async()=>{if(r.mode==="new")t.value.workflowStageIdx=0,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName="",t.value.workflowStageName="",t.value.workflowStageDesc="",t.value.workflowStageContent="",t.value.workflowStageOrder=0,m.value=!1,v.value=!1;else{const{data:s}=await P(r.workflowStageIdx);t.value=s,m.value=!0}},S=g([]),p=async()=>{try{const{data:s}=await G();S.value=s}catch(s){console.log(s)}},v=g(!1),u=async()=>{v.value=!v.value,t.value.workflowStageTypeIdx=0,t.value.workflowStageTypeName=""},x=async()=>{S.value.forEach(s=>{t.value.workflowStageTypeIdx===s.workflowStageTypeIdx&&(t.value.workflowStageTypeName=s.workflowStageTypeName)}),await y(t.value.workflowStageTypeName)},y=async s=>{const{data:o}=await Q(s);t.value.workflowStageContent=o[0].workflowStageContent},m=g(!1),I=async()=>{const s={workflowStageName:t.value.workflowStageName,workflowStageTypeName:t.value.workflowStageTypeName},{data:o}=await z(s);o?w.error("이미 사용중인 이름입니다."):(w.success("사용 가능한 이름입니다."),m.value=!0)},$=async()=>{r.mode==="new"?await E().then(()=>{f("get-workflow-stage-list")}):await F().then(()=>{f("get-workflow-stage-list")}),l()},E=async()=>{const{data:s}=await H(t.value);s?w.success("등록되었습니다."):w.error("등록 할 수 없습니다.")},F=async()=>{const{data:s}=await J(t.value);s?w.success("수정되었습니다."):w.error("수정 할 수 없습니다.")};return(s,o)=>(i(),d("div",X,[e("div",Y,[e("div",Z,[o[14]||(o[14]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),e("div",ee,[e("h3",te,T(r.mode==="new"?"New":"Edit")+" Workflow Stage ",1),e("div",null,[e("div",oe,[e("div",ae,[o[9]||(o[9]=e("label",{class:"form-label required col"}," Workflow Stage Type ",-1)),r.mode==="new"?(i(),d("div",le,[e("input",{type:"checkBox",onChange:u},null,32),o[8]||(o[8]=e("label",null,"Add Workflow Type",-1))])):q("",!0)]),e("div",se,[v.value?W((i(),d("input",{key:1,type:"text",class:"form-control p-2 g-col-12",placeholder:"Please enter the Workflow Stage type you want to add","onUpdate:modelValue":o[1]||(o[1]=n=>t.value.workflowStageTypeName=n),onFocusout:o[2]||(o[2]=n=>y(t.value.workflowStageTypeName))},null,544)),[[_,t.value.workflowStageTypeName]]):W((i(),d("select",{key:0,"onUpdate:modelValue":o[0]||(o[0]=n=>t.value.workflowStageTypeIdx=n),class:"form-select p-2 g-col-12",onChange:x},[o[10]||(o[10]=e("option",{value:0},"Select Workflow Stage Type",-1)),(i(!0),d(R,null,j(S.value,(n,L)=>(i(),d("option",{value:n.workflowStageTypeIdx,key:L},T(n.workflowStageTypeName),9,ne))),128))],544)),[[M,t.value.workflowStageTypeIdx]])])]),e("div",re,[o[11]||(o[11]=e("label",{class:"form-label required"},"Workflow Stage Name",-1)),e("div",we,[W(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Name","onUpdate:modelValue":o[3]||(o[3]=n=>t.value.workflowStageName=n)},null,512),[[_,t.value.workflowStageName]]),e("div",ie,[m.value?(i(),d("button",de,"Duplicate Check")):(i(),d("button",{key:0,class:"btn btn-primary chk",onClick:I},"Duplicate Check"))])])]),e("div",ge,[o[12]||(o[12]=e("label",{class:"form-label required"},"Workflow Stage Description",-1)),W(e("input",{type:"text",class:"form-control p-2 g-col-11",placeholder:"Enter the Workflow Stage Description","onUpdate:modelValue":o[4]||(o[4]=n=>t.value.workflowStageDesc=n)},null,512),[[_,t.value.workflowStageDesc]])]),e("div",fe,[o[13]||(o[13]=e("label",{class:"form-label required"},"Script",-1)),W(e("textarea",{rows:"10",class:"form-control p-2 g-col-11",placeholder:"Enter the Script","onUpdate:modelValue":o[5]||(o[5]=n=>t.value.workflowStageContent=n)},null,512),[[_,t.value.workflowStageContent]])])])]),e("div",ce,[e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal",onClick:o[6]||(o[6]=n=>l())}," Cancel "),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:o[7]||(o[7]=n=>$())},T(r.mode==="new"?"Regist":"Edit"),1)])])])]))}}),ke={class:"modal",id:"deleteWorkflowStage",tabindex:"-1"},me={class:"modal-dialog modal-lg",role:"document"},Se={class:"modal-content"},pe={class:"modal-body text-left py-4"},ve={class:"modal-footer"},ye=C({__name:"DeleteWorkflowStage",props:{workflowStageName:{},workflowStageIdx:{}},emits:["get-workflow-stage-list"],setup(a,{emit:b}){const w=D(),r=a,f=b,c=async()=>{const{data:t}=await K(r.workflowStageIdx);t?w.success("삭제되었습니다."):w.error("삭제하지 못했습니다."),f("get-workflow-stage-list")};return(t,l)=>(i(),d("div",ke,[e("div",me,[e("div",Se,[l[3]||(l[3]=e("button",{type:"button",class:"btn-close","data-bs-dismiss":"modal","aria-label":"Close"},null,-1)),l[4]||(l[4]=e("div",{class:"modal-status bg-danger"},null,-1)),e("div",pe,[l[1]||(l[1]=e("h3",{class:"mb-5"}," Delete Workflow Stage ",-1)),e("h4",null,"Are you sure you want to delete "+T(r.workflowStageName)+"?",1)]),e("div",ve,[l[2]||(l[2]=e("a",{href:"#",class:"btn btn-link link-secondary","data-bs-dismiss":"modal"}," Cancel ",-1)),e("a",{href:"#",class:"btn btn-primary ms-auto","data-bs-dismiss":"modal",onClick:l[0]||(l[0]=S=>c())}," Delete ")])])])]))}}),be={class:"card card-flush w-100"},Ne=C({__name:"WorkflowStageList",setup(a){const b=D(),w=g([]),r=g([]);h(async()=>{l(),await f()});const f=async()=>{try{const{data:u}=await O();w.value=u}catch(u){console.log(u),b.error("데이터를 가져올 수 없습니다.")}},c=g(0),t=g(""),l=()=>{r.value=[{title:"Stage Type",field:"workflowStageTypeName",width:"27%"},{title:"Stage Name",field:"workflowStageName",width:"27%"},{title:"Stage Desc",field:"workflowStageDesc",width:"26%"},{title:"Action",width:"20%",formatter:S,cellClick:function(u,x){const y=u.target,m=y==null?void 0:y.getAttribute("id");c.value=x.getRow().getData().workflowStageIdx,m==="edit-btn"?p.value="edit":m==="delete-btn"&&(t.value=x.getRow().getData().workflowStageName)}}]},S=()=>` +
+ + +
`,p=g("new"),v=()=>{c.value=0,p.value="new"};return(u,x)=>(i(),d("div",be,[N(V,{"header-title":"Workflow Stage","new-btn-title":"New Stage","popup-flag":!0,"popup-target":"#workflowStageForm",onClickNewBtn:v}),N(B,{columns:r.value,"table-data":w.value},null,8,["columns","table-data"]),N(ue,{mode:p.value,"workflow-stage-idx":c.value,onGetWorkflowStageList:f},null,8,["mode","workflow-stage-idx"]),N(ye,{"workflow-stage-name":t.value,"workflow-stage-idx":c.value,onGetWorkflowStageList:f},null,8,["workflow-stage-name","workflow-stage-idx"])]))}});export{Ne as default}; diff --git a/src/main/resources/static/assets/index-BPhSkGh_.js b/src/main/resources/static/assets/index-BPhSkGh_.js new file mode 100644 index 0000000..ebc2706 --- /dev/null +++ b/src/main/resources/static/assets/index-BPhSkGh_.js @@ -0,0 +1,39 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/OssList-BiiASFl1.js","assets/TableHeader.vue_vue_type_script_setup_true_lang-CtosSeSW.js","assets/request-CmxyMwC5.js","assets/request-BXn7ndvL.css","assets/oss-Bq2sfj0Q.js","assets/WorkflowStageList-CxXBB1gI.js","assets/EventListenerList-DoBwtMSB.js","assets/ParamForm-CikIVyrv.js","assets/ParamForm-CN6U4gcC.css","assets/WorkflowList-_g7datXD.js","assets/WorkflowForm-NvV96v6Y.js","assets/WorkflowForm-w7C4LY7S.css"])))=>i.map(i=>d[i]); +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();/** +* @vue/shared v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function Yc(e){const t=Object.create(null);for(const n of e.split(","))t[n]=1;return n=>n in t}const bt={},ui=[],ss=()=>{},eE=()=>!1,il=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),Xc=e=>e.startsWith("onUpdate:"),At=Object.assign,Jc=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},tE=Object.prototype.hasOwnProperty,at=(e,t)=>tE.call(e,t),Be=Array.isArray,ci=e=>ko(e)==="[object Map]",Oi=e=>ko(e)==="[object Set]",Ap=e=>ko(e)==="[object Date]",ze=e=>typeof e=="function",wt=e=>typeof e=="string",Un=e=>typeof e=="symbol",gt=e=>e!==null&&typeof e=="object",gg=e=>(gt(e)||ze(e))&&ze(e.then)&&ze(e.catch),vg=Object.prototype.toString,ko=e=>vg.call(e),nE=e=>ko(e).slice(8,-1),bg=e=>ko(e)==="[object Object]",Qc=e=>wt(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,no=Yc(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),ol=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},sE=/-(\w)/g,In=ol(e=>e.replace(sE,(t,n)=>n?n.toUpperCase():"")),rE=/\B([A-Z])/g,Xs=ol(e=>e.replace(rE,"-$1").toLowerCase()),al=ol(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ca=ol(e=>e?`on${al(e)}`:""),qs=(e,t)=>!Object.is(e,t),Sa=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:s,value:n})},Ma=e=>{const t=parseFloat(e);return isNaN(t)?e:t},iE=e=>{const t=wt(e)?Number(e):NaN;return isNaN(t)?e:t};let xp;const ll=()=>xp||(xp=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Lt(e){if(Be(e)){const t={};for(let n=0;n{if(n){const s=n.split(aE);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function ne(e){let t="";if(wt(e))t=e;else if(Be(e))for(let n=0;nkr(n,t))}const wg=e=>!!(e&&e.__v_isRef===!0),Ee=e=>wt(e)?e:e==null?"":Be(e)||gt(e)&&(e.toString===vg||!ze(e.toString))?wg(e)?Ee(e.value):JSON.stringify(e,Eg,2):String(e),Eg=(e,t)=>wg(t)?Eg(e,t.value):ci(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r],i)=>(n[wu(s,i)+" =>"]=r,n),{})}:Oi(t)?{[`Set(${t.size})`]:[...t.values()].map(n=>wu(n))}:Un(t)?wu(t):gt(t)&&!Be(t)&&!bg(t)?String(t):t,wu=(e,t="")=>{var n;return Un(e)?`Symbol(${(n=e.description)!=null?n:t})`:e};/** +* @vue/reactivity v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let Xt;class Tg{constructor(t=!1){this.detached=t,this._active=!0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=Xt,!t&&Xt&&(this.index=(Xt.scopes||(Xt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let t,n;if(this.scopes)for(t=0,n=this.scopes.length;t0)return;if(ro){let t=ro;for(ro=void 0;t;){const n=t.next;t.next=void 0,t.flags&=-9,t=n}}let e;for(;so;){let t=so;for(so=void 0;t;){const n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(s){e||(e=s)}t=n}}if(e)throw e}function kg(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function $g(e){let t,n=e.depsTail,s=n;for(;s;){const r=s.prevDep;s.version===-1?(s===n&&(n=r),sd(s),pE(s)):t=s,s.dep.activeLink=s.prevActiveLink,s.prevActiveLink=void 0,s=r}e.deps=t,e.depsTail=n}function ic(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&(Ng(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function Ng(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===go))return;e.globalVersion=go;const t=e.dep;if(e.flags|=2,t.version>0&&!e.isSSR&&e.deps&&!ic(e)){e.flags&=-3;return}const n=yt,s=Hn;yt=e,Hn=!0;try{kg(e);const r=e.fn(e._value);(t.version===0||qs(r,e._value))&&(e._value=r,t.version++)}catch(r){throw t.version++,r}finally{yt=n,Hn=s,$g(e),e.flags&=-3}}function sd(e,t=!1){const{dep:n,prevSub:s,nextSub:r}=e;if(s&&(s.nextSub=r,e.prevSub=void 0),r&&(r.prevSub=s,e.nextSub=void 0),n.subs===e&&(n.subs=s,!s&&n.computed)){n.computed.flags&=-5;for(let i=n.computed.deps;i;i=i.nextDep)sd(i,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function pE(e){const{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}let Hn=!0;const Bg=[];function Js(){Bg.push(Hn),Hn=!1}function Qs(){const e=Bg.pop();Hn=e===void 0?!0:e}function Op(e){const{cleanup:t}=e;if(e.cleanup=void 0,t){const n=yt;yt=void 0;try{t()}finally{yt=n}}}let go=0;class hE{constructor(t,n){this.sub=t,this.dep=n,this.version=n.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class rd{constructor(t){this.computed=t,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0}track(t){if(!yt||!Hn||yt===this.computed)return;let n=this.activeLink;if(n===void 0||n.sub!==yt)n=this.activeLink=new hE(yt,this),yt.deps?(n.prevDep=yt.depsTail,yt.depsTail.nextDep=n,yt.depsTail=n):yt.deps=yt.depsTail=n,Ig(n);else if(n.version===-1&&(n.version=this.version,n.nextDep)){const s=n.nextDep;s.prevDep=n.prevDep,n.prevDep&&(n.prevDep.nextDep=s),n.prevDep=yt.depsTail,n.nextDep=void 0,yt.depsTail.nextDep=n,yt.depsTail=n,yt.deps===n&&(yt.deps=s)}return n}trigger(t){this.version++,go++,this.notify(t)}notify(t){td();try{for(let n=this.subs;n;n=n.prevSub)n.sub.notify()&&n.sub.dep.notify()}finally{nd()}}}function Ig(e){if(e.dep.sc++,e.sub.flags&4){const t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let s=t.deps;s;s=s.nextDep)Ig(s)}const n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}const Fa=new WeakMap,Tr=Symbol(""),oc=Symbol(""),vo=Symbol("");function Rt(e,t,n){if(Hn&&yt){let s=Fa.get(e);s||Fa.set(e,s=new Map);let r=s.get(n);r||(s.set(n,r=new rd),r.map=s,r.key=n),r.track()}}function vs(e,t,n,s,r,i){const o=Fa.get(e);if(!o){go++;return}const l=u=>{u&&u.trigger()};if(td(),t==="clear")o.forEach(l);else{const u=Be(e),d=u&&Qc(n);if(u&&n==="length"){const c=Number(s);o.forEach((p,m)=>{(m==="length"||m===vo||!Un(m)&&m>=c)&&l(p)})}else switch((n!==void 0||o.has(void 0))&&l(o.get(n)),d&&l(o.get(vo)),t){case"add":u?d&&l(o.get("length")):(l(o.get(Tr)),ci(e)&&l(o.get(oc)));break;case"delete":u||(l(o.get(Tr)),ci(e)&&l(o.get(oc)));break;case"set":ci(e)&&l(o.get(Tr));break}}nd()}function mE(e,t){const n=Fa.get(e);return n&&n.get(t)}function Jr(e){const t=it(e);return t===e?t:(Rt(t,"iterate",vo),kn(e)?t:t.map(Vt))}function ul(e){return Rt(e=it(e),"iterate",vo),e}const gE={__proto__:null,[Symbol.iterator](){return Tu(this,Symbol.iterator,Vt)},concat(...e){return Jr(this).concat(...e.map(t=>Be(t)?Jr(t):t))},entries(){return Tu(this,"entries",e=>(e[1]=Vt(e[1]),e))},every(e,t){return fs(this,"every",e,t,void 0,arguments)},filter(e,t){return fs(this,"filter",e,t,n=>n.map(Vt),arguments)},find(e,t){return fs(this,"find",e,t,Vt,arguments)},findIndex(e,t){return fs(this,"findIndex",e,t,void 0,arguments)},findLast(e,t){return fs(this,"findLast",e,t,Vt,arguments)},findLastIndex(e,t){return fs(this,"findLastIndex",e,t,void 0,arguments)},forEach(e,t){return fs(this,"forEach",e,t,void 0,arguments)},includes(...e){return Cu(this,"includes",e)},indexOf(...e){return Cu(this,"indexOf",e)},join(e){return Jr(this).join(e)},lastIndexOf(...e){return Cu(this,"lastIndexOf",e)},map(e,t){return fs(this,"map",e,t,void 0,arguments)},pop(){return qi(this,"pop")},push(...e){return qi(this,"push",e)},reduce(e,...t){return kp(this,"reduce",e,t)},reduceRight(e,...t){return kp(this,"reduceRight",e,t)},shift(){return qi(this,"shift")},some(e,t){return fs(this,"some",e,t,void 0,arguments)},splice(...e){return qi(this,"splice",e)},toReversed(){return Jr(this).toReversed()},toSorted(e){return Jr(this).toSorted(e)},toSpliced(...e){return Jr(this).toSpliced(...e)},unshift(...e){return qi(this,"unshift",e)},values(){return Tu(this,"values",Vt)}};function Tu(e,t,n){const s=ul(e),r=s[t]();return s!==e&&!kn(e)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=n(i.value)),i}),r}const vE=Array.prototype;function fs(e,t,n,s,r,i){const o=ul(e),l=o!==e&&!kn(e),u=o[t];if(u!==vE[t]){const p=u.apply(e,i);return l?Vt(p):p}let d=n;o!==e&&(l?d=function(p,m){return n.call(this,Vt(p),m,e)}:n.length>2&&(d=function(p,m){return n.call(this,p,m,e)}));const c=u.call(o,d,s);return l&&r?r(c):c}function kp(e,t,n,s){const r=ul(e);let i=n;return r!==e&&(kn(e)?n.length>3&&(i=function(o,l,u){return n.call(this,o,l,u,e)}):i=function(o,l,u){return n.call(this,o,Vt(l),u,e)}),r[t](i,...s)}function Cu(e,t,n){const s=it(e);Rt(s,"iterate",vo);const r=s[t](...n);return(r===-1||r===!1)&&ad(n[0])?(n[0]=it(n[0]),s[t](...n)):r}function qi(e,t,n=[]){Js(),td();const s=it(e)[t].apply(e,n);return nd(),Qs(),s}const bE=Yc("__proto__,__v_isRef,__isVue"),Pg=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!=="arguments"&&e!=="caller").map(e=>Symbol[e]).filter(Un));function _E(e){Un(e)||(e=String(e));const t=it(this);return Rt(t,"has",e),t.hasOwnProperty(e)}class Lg{constructor(t=!1,n=!1){this._isReadonly=t,this._isShallow=n}get(t,n,s){const r=this._isReadonly,i=this._isShallow;if(n==="__v_isReactive")return!r;if(n==="__v_isReadonly")return r;if(n==="__v_isShallow")return i;if(n==="__v_raw")return s===(r?i?kE:Mg:i?Vg:Rg).get(t)||Object.getPrototypeOf(t)===Object.getPrototypeOf(s)?t:void 0;const o=Be(t);if(!r){let u;if(o&&(u=gE[n]))return u;if(n==="hasOwnProperty")return _E}const l=Reflect.get(t,n,mt(t)?t:s);return(Un(n)?Pg.has(n):bE(n))||(r||Rt(t,"get",n),i)?l:mt(l)?o&&Qc(n)?l:l.value:gt(l)?r?bo(l):rn(l):l}}class Dg extends Lg{constructor(t=!1){super(!1,t)}set(t,n,s,r){let i=t[n];if(!this._isShallow){const u=$r(i);if(!kn(s)&&!$r(s)&&(i=it(i),s=it(s)),!Be(t)&&mt(i)&&!mt(s))return u?!1:(i.value=s,!0)}const o=Be(t)&&Qc(n)?Number(n)e,ua=e=>Reflect.getPrototypeOf(e);function CE(e,t,n){return function(...s){const r=this.__v_raw,i=it(r),o=ci(i),l=e==="entries"||e===Symbol.iterator&&o,u=e==="keys"&&o,d=r[e](...s),c=n?ac:t?lc:Vt;return!t&&Rt(i,"iterate",u?oc:Tr),{next(){const{value:p,done:m}=d.next();return m?{value:p,done:m}:{value:l?[c(p[0]),c(p[1])]:c(p),done:m}},[Symbol.iterator](){return this}}}}function ca(e){return function(...t){return e==="delete"?!1:e==="clear"?void 0:this}}function SE(e,t){const n={get(r){const i=this.__v_raw,o=it(i),l=it(r);e||(qs(r,l)&&Rt(o,"get",r),Rt(o,"get",l));const{has:u}=ua(o),d=t?ac:e?lc:Vt;if(u.call(o,r))return d(i.get(r));if(u.call(o,l))return d(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!e&&Rt(it(r),"iterate",Tr),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,o=it(i),l=it(r);return e||(qs(r,l)&&Rt(o,"has",r),Rt(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,u=it(l),d=t?ac:e?lc:Vt;return!e&&Rt(u,"iterate",Tr),l.forEach((c,p)=>r.call(i,d(c),d(p),o))}};return At(n,e?{add:ca("add"),set:ca("set"),delete:ca("delete"),clear:ca("clear")}:{add(r){!t&&!kn(r)&&!$r(r)&&(r=it(r));const i=it(this);return ua(i).has.call(i,r)||(i.add(r),vs(i,"add",r,r)),this},set(r,i){!t&&!kn(i)&&!$r(i)&&(i=it(i));const o=it(this),{has:l,get:u}=ua(o);let d=l.call(o,r);d||(r=it(r),d=l.call(o,r));const c=u.call(o,r);return o.set(r,i),d?qs(i,c)&&vs(o,"set",r,i):vs(o,"add",r,i),this},delete(r){const i=it(this),{has:o,get:l}=ua(i);let u=o.call(i,r);u||(r=it(r),u=o.call(i,r)),l&&l.call(i,r);const d=i.delete(r);return u&&vs(i,"delete",r,void 0),d},clear(){const r=it(this),i=r.size!==0,o=r.clear();return i&&vs(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{n[r]=CE(r,e,t)}),n}function id(e,t){const n=SE(e,t);return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(at(n,r)&&r in s?n:s,r,i)}const AE={get:id(!1,!1)},xE={get:id(!1,!0)},OE={get:id(!0,!1)};const Rg=new WeakMap,Vg=new WeakMap,Mg=new WeakMap,kE=new WeakMap;function $E(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function NE(e){return e.__v_skip||!Object.isExtensible(e)?0:$E(nE(e))}function rn(e){return $r(e)?e:od(e,!1,wE,AE,Rg)}function Fg(e){return od(e,!1,TE,xE,Vg)}function bo(e){return od(e,!0,EE,OE,Mg)}function od(e,t,n,s,r){if(!gt(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=NE(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ws(e){return $r(e)?ws(e.__v_raw):!!(e&&e.__v_isReactive)}function $r(e){return!!(e&&e.__v_isReadonly)}function kn(e){return!!(e&&e.__v_isShallow)}function ad(e){return e?!!e.__v_raw:!1}function it(e){const t=e&&e.__v_raw;return t?it(t):e}function ld(e){return!at(e,"__v_skip")&&Object.isExtensible(e)&&_g(e,"__v_skip",!0),e}const Vt=e=>gt(e)?rn(e):e,lc=e=>gt(e)?bo(e):e;function mt(e){return e?e.__v_isRef===!0:!1}function ke(e){return jg(e,!1)}function Hg(e){return jg(e,!0)}function jg(e,t){return mt(e)?e:new BE(e,t)}class BE{constructor(t,n){this.dep=new rd,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=n?t:it(t),this._value=n?t:Vt(t),this.__v_isShallow=n}get value(){return this.dep.track(),this._value}set value(t){const n=this._rawValue,s=this.__v_isShallow||kn(t)||$r(t);t=s?t:it(t),qs(t,n)&&(this._rawValue=t,this._value=s?t:Vt(t),this.dep.trigger())}}function b(e){return mt(e)?e.value:e}const IE={get:(e,t,n)=>t==="__v_raw"?e:b(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return mt(r)&&!mt(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function zg(e){return ws(e)?e:new Proxy(e,IE)}function PE(e){const t=Be(e)?new Array(e.length):{};for(const n in e)t[n]=Ug(e,n);return t}class LE{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0,this._value=void 0}get value(){const t=this._object[this._key];return this._value=t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}get dep(){return mE(it(this._object),this._key)}}class DE{constructor(t){this._getter=t,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}}function _(e,t,n){return mt(e)?e:ze(e)?new DE(e):gt(e)&&arguments.length>1?Ug(e,t,n):ke(e)}function Ug(e,t,n){const s=e[t];return mt(s)?s:new LE(e,t,n)}class RE{constructor(t,n,s){this.fn=t,this.setter=n,this._value=void 0,this.dep=new rd(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=go-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!n,this.isSSR=s}notify(){if(this.flags|=16,!(this.flags&8)&&yt!==this)return Og(this,!0),!0}get value(){const t=this.dep.track();return Ng(this),t&&(t.version=this.dep.version),this._value}set value(t){this.setter&&this.setter(t)}}function VE(e,t,n=!1){let s,r;return ze(e)?s=e:(s=e.get,r=e.set),new RE(s,r,n)}const da={},Ha=new WeakMap;let br;function ME(e,t=!1,n=br){if(n){let s=Ha.get(n);s||Ha.set(n,s=[]),s.push(e)}}function FE(e,t,n=bt){const{immediate:s,deep:r,once:i,scheduler:o,augmentJob:l,call:u}=n,d=N=>r?N:kn(N)||r===!1||r===0?bs(N,1):bs(N);let c,p,m,v,w=!1,C=!1;if(mt(e)?(p=()=>e.value,w=kn(e)):ws(e)?(p=()=>d(e),w=!0):Be(e)?(C=!0,w=e.some(N=>ws(N)||kn(N)),p=()=>e.map(N=>{if(mt(N))return N.value;if(ws(N))return d(N);if(ze(N))return u?u(N,2):N()})):ze(e)?t?p=u?()=>u(e,2):e:p=()=>{if(m){Js();try{m()}finally{Qs()}}const N=br;br=c;try{return u?u(e,3,[v]):e(v)}finally{br=N}}:p=ss,t&&r){const N=p,B=r===!0?1/0:r;p=()=>bs(N(),B)}const k=ed(),x=()=>{c.stop(),k&&Jc(k.effects,c)};if(i&&t){const N=t;t=(...B)=>{N(...B),x()}}let O=C?new Array(e.length).fill(da):da;const I=N=>{if(!(!(c.flags&1)||!c.dirty&&!N))if(t){const B=c.run();if(r||w||(C?B.some((L,j)=>qs(L,O[j])):qs(B,O))){m&&m();const L=br;br=c;try{const j=[B,O===da?void 0:C&&O[0]===da?[]:O,v];u?u(t,3,j):t(...j),O=B}finally{br=L}}}else c.run()};return l&&l(I),c=new Ag(p),c.scheduler=o?()=>o(I,!1):I,v=N=>ME(N,!1,c),m=c.onStop=()=>{const N=Ha.get(c);if(N){if(u)u(N,4);else for(const B of N)B();Ha.delete(c)}},t?s?I(!0):O=c.run():o?o(I.bind(null,!0),!0):c.run(),x.pause=c.pause.bind(c),x.resume=c.resume.bind(c),x.stop=x,x}function bs(e,t=1/0,n){if(t<=0||!gt(e)||e.__v_skip||(n=n||new Set,n.has(e)))return e;if(n.add(e),t--,mt(e))bs(e.value,t,n);else if(Be(e))for(let s=0;s{bs(s,t,n)});else if(bg(e)){for(const s in e)bs(e[s],t,n);for(const s of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,s)&&bs(e[s],t,n)}return e}/** +* @vue/runtime-core v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function $o(e,t,n,s){try{return s?e(...s):e()}catch(r){cl(r,t,n)}}function qn(e,t,n,s){if(ze(e)){const r=$o(e,t,n,s);return r&&gg(r)&&r.catch(i=>{cl(i,t,n)}),r}if(Be(e)){const r=[];for(let i=0;i>>1,r=Jt[s],i=_o(r);i=_o(n)?Jt.push(e):Jt.splice(jE(t),0,e),e.flags|=1,Wg()}}function Wg(){ja||(ja=qg.then(Gg))}function zE(e){Be(e)?di.push(...e):Ms&&e.id===-1?Ms.splice(ni+1,0,e):e.flags&1||(di.push(e),e.flags|=1),Wg()}function $p(e,t,n=ts+1){for(;n_o(n)-_o(s));if(di.length=0,Ms){Ms.push(...t);return}for(Ms=t,ni=0;nie.id==null?e.flags&2?-1:1/0:e.id;function Gg(e){try{for(ts=0;ts{s._d&&jp(-1);const i=za(t);let o;try{o=e(...r)}finally{za(i),s._d&&jp(1)}return o};return s._n=!0,s._c=!0,s._d=!0,s}function ki(e,t){if(kt===null)return e;const n=gl(kt),s=e.dirs||(e.dirs=[]);for(let r=0;re.__isTeleport,io=e=>e&&(e.disabled||e.disabled===""),UE=e=>e&&(e.defer||e.defer===""),Np=e=>typeof SVGElement<"u"&&e instanceof SVGElement,Bp=e=>typeof MathMLElement=="function"&&e instanceof MathMLElement,uc=(e,t)=>{const n=e&&e.to;return wt(n)?t?t(n):null:n},qE={name:"Teleport",__isTeleport:!0,process(e,t,n,s,r,i,o,l,u,d){const{mc:c,pc:p,pbc:m,o:{insert:v,querySelector:w,createText:C,createComment:k}}=d,x=io(t.props);let{shapeFlag:O,children:I,dynamicChildren:N}=t;if(e==null){const B=t.el=C(""),L=t.anchor=C("");v(B,n,s),v(L,n,s);const j=($,M)=>{O&16&&(r&&r.isCE&&(r.ce._teleportTarget=$),c(I,$,M,r,i,o,l,u))},F=()=>{const $=t.target=uc(t.props,w),M=Qg($,t,C,v);$&&(o!=="svg"&&Np($)?o="svg":o!=="mathml"&&Bp($)&&(o="mathml"),x||(j($,M),Aa(t,!1)))};x&&(j(n,L),Aa(t,!0)),UE(t.props)?en(F,i):F()}else{t.el=e.el,t.targetStart=e.targetStart;const B=t.anchor=e.anchor,L=t.target=e.target,j=t.targetAnchor=e.targetAnchor,F=io(e.props),$=F?n:L,M=F?B:j;if(o==="svg"||Np(L)?o="svg":(o==="mathml"||Bp(L))&&(o="mathml"),N?(m(e.dynamicChildren,N,$,r,i,o,l),hd(e,t,!0)):u||p(e,t,$,M,r,i,o,l,!1),x)F?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):fa(t,n,B,d,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const Q=t.target=uc(t.props,w);Q&&fa(t,Q,null,d,0)}else F&&fa(t,L,j,d,1);Aa(t,x)}},remove(e,t,n,{um:s,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:u,targetStart:d,targetAnchor:c,target:p,props:m}=e;if(p&&(r(d),r(c)),i&&r(u),o&16){const v=i||!io(m);for(let w=0;w{e.isMounted=!0}),No(()=>{e.isUnmounting=!0}),e}const An=[Function,Array],ev={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:An,onEnter:An,onAfterEnter:An,onEnterCancelled:An,onBeforeLeave:An,onLeave:An,onAfterLeave:An,onLeaveCancelled:An,onBeforeAppear:An,onAppear:An,onAfterAppear:An,onAppearCancelled:An},tv=e=>{const t=e.subTree;return t.component?tv(t.component):t},GE={name:"BaseTransition",props:ev,setup(e,{slots:t}){const n=Bo(),s=Zg();return()=>{const r=t.default&&cd(t.default(),!0);if(!r||!r.length)return;const i=nv(r),o=it(e),{mode:l}=o;if(s.isLeaving)return Su(i);const u=Ip(i);if(!u)return Su(i);let d=yo(u,o,s,n,m=>d=m);u.type!==Mt&&Nr(u,d);const c=n.subTree,p=c&&Ip(c);if(p&&p.type!==Mt&&!_r(u,p)&&tv(n).type!==Mt){const m=yo(p,o,s,n);if(Nr(p,m),l==="out-in"&&u.type!==Mt)return s.isLeaving=!0,m.afterLeave=()=>{s.isLeaving=!1,n.job.flags&8||n.update(),delete m.afterLeave},Su(i);l==="in-out"&&u.type!==Mt&&(m.delayLeave=(v,w,C)=>{const k=sv(s,p);k[String(p.key)]=p,v[Fs]=()=>{w(),v[Fs]=void 0,delete d.delayedLeave},d.delayedLeave=C})}return i}}};function nv(e){let t=e[0];if(e.length>1){for(const n of e)if(n.type!==Mt){t=n;break}}return t}const YE=GE;function sv(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function yo(e,t,n,s,r){const{appear:i,mode:o,persisted:l=!1,onBeforeEnter:u,onEnter:d,onAfterEnter:c,onEnterCancelled:p,onBeforeLeave:m,onLeave:v,onAfterLeave:w,onLeaveCancelled:C,onBeforeAppear:k,onAppear:x,onAfterAppear:O,onAppearCancelled:I}=t,N=String(e.key),B=sv(n,e),L=($,M)=>{$&&qn($,s,9,M)},j=($,M)=>{const Q=M[1];L($,M),Be($)?$.every(X=>X.length<=1)&&Q():$.length<=1&&Q()},F={mode:o,persisted:l,beforeEnter($){let M=u;if(!n.isMounted)if(i)M=k||u;else return;$[Fs]&&$[Fs](!0);const Q=B[N];Q&&_r(e,Q)&&Q.el[Fs]&&Q.el[Fs](),L(M,[$])},enter($){let M=d,Q=c,X=p;if(!n.isMounted)if(i)M=x||d,Q=O||c,X=I||p;else return;let ae=!1;const Oe=$[pa]=ge=>{ae||(ae=!0,ge?L(X,[$]):L(Q,[$]),F.delayedLeave&&F.delayedLeave(),$[pa]=void 0)};M?j(M,[$,Oe]):Oe()},leave($,M){const Q=String(e.key);if($[pa]&&$[pa](!0),n.isUnmounting)return M();L(m,[$]);let X=!1;const ae=$[Fs]=Oe=>{X||(X=!0,M(),Oe?L(C,[$]):L(w,[$]),$[Fs]=void 0,B[Q]===e&&delete B[Q])};B[Q]=e,v?j(v,[$,ae]):ae()},clone($){const M=yo($,t,n,s,r);return r&&r(M),M}};return F}function Su(e){if(dl(e))return e=Ws(e),e.children=null,e}function Ip(e){if(!dl(e))return Jg(e.type)&&e.children?nv(e.children):e;const{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&ze(n.default))return n.default()}}function Nr(e,t){e.shapeFlag&6&&e.component?(e.transition=t,Nr(e.component.subTree,t)):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function cd(e,t=!1,n){let s=[],r=0;for(let i=0;i1)for(let i=0;icc(w,t&&(Be(t)?t[C]:t),n,s,r));return}if(fi(s)&&!r)return;const i=s.shapeFlag&4?gl(s.component):s.el,o=r?null:i,{i:l,r:u}=e,d=t&&t.r,c=l.refs===bt?l.refs={}:l.refs,p=l.setupState,m=it(p),v=p===bt?()=>!1:w=>at(m,w);if(d!=null&&d!==u&&(wt(d)?(c[d]=null,v(d)&&(p[d]=null)):mt(d)&&(d.value=null)),ze(u))$o(u,l,12,[o,c]);else{const w=wt(u),C=mt(u);if(w||C){const k=()=>{if(e.f){const x=w?v(u)?p[u]:c[u]:u.value;r?Be(x)&&Jc(x,i):Be(x)?x.includes(i)||x.push(i):w?(c[u]=[i],v(u)&&(p[u]=c[u])):(u.value=[i],e.k&&(c[e.k]=u.value))}else w?(c[u]=o,v(u)&&(p[u]=o)):C&&(u.value=o,e.k&&(c[e.k]=o))};o?(k.id=-1,en(k,n)):k()}}}ll().requestIdleCallback;ll().cancelIdleCallback;const fi=e=>!!e.type.__asyncLoader,dl=e=>e.type.__isKeepAlive;function fl(e,t){iv(e,"a",t)}function XE(e,t){iv(e,"da",t)}function iv(e,t,n=Pt){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(pl(t,s,n),n){let r=n.parent;for(;r&&r.parent;)dl(r.parent.vnode)&&JE(s,t,n,r),r=r.parent}}function JE(e,t,n,s){const r=pl(t,e,s,!0);dd(()=>{Jc(s[t],r)},n)}function pl(e,t,n=Pt,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{Js();const l=Io(n),u=qn(t,n,e,o);return l(),Qs(),u});return s?r.unshift(i):r.push(i),i}}const Os=e=>(t,n=Pt)=>{(!To||e==="sp")&&pl(e,(...s)=>t(...s),n)},QE=Os("bm"),$t=Os("m"),ZE=Os("bu"),ov=Os("u"),No=Os("bum"),dd=Os("um"),e1=Os("sp"),t1=Os("rtg"),n1=Os("rtc");function s1(e,t=Pt){pl("ec",e,t)}const av="components";function Cr(e,t){return uv(av,e,!0,t)||e}const lv=Symbol.for("v-ndc");function Ve(e){return wt(e)?uv(av,e,!1)||e:e||lv}function uv(e,t,n=!0,s=!1){const r=kt||Pt;if(r){const i=r.type;{const l=j1(i,!1);if(l&&(l===t||l===In(t)||l===al(In(t))))return i}const o=Pp(r[e]||i[e],t)||Pp(r.appContext[e],t);return!o&&s?i:o}}function Pp(e,t){return e&&(e[t]||e[In(t)]||e[al(In(t))])}function ht(e,t,n,s){let r;const i=n,o=Be(e);if(o||wt(e)){const l=o&&ws(e);let u=!1;l&&(u=!kn(e),e=ul(e)),r=new Array(e.length);for(let d=0,c=e.length;dt(l,u,void 0,i));else{const l=Object.keys(e);r=new Array(l.length);for(let u=0,d=l.length;u{const i=s.fn(...r);return i&&(i.key=s.key),i}:s.fn)}return e}function U(e,t,n={},s,r){if(kt.ce||kt.parent&&fi(kt.parent)&&kt.parent.ce)return t!=="default"&&(n.name=t),A(),re(Re,null,[Ye("slot",n,s&&s())],64);let i=e[t];i&&i._c&&(i._d=!1),A();const o=i&&dv(i(n)),l=n.key||o&&o.key,u=re(Re,{key:(l&&!Un(l)?l:`_${t}`)+(!o&&s?"_fb":"")},o||(s?s():[]),o&&e._===1?64:-2);return!r&&u.scopeId&&(u.slotScopeIds=[u.scopeId+"-s"]),i&&i._c&&(i._d=!0),u}function dv(e){return e.some(t=>Eo(t)?!(t.type===Mt||t.type===Re&&!dv(t.children)):!0)?e:null}function r1(e,t){const n={};for(const s in e)n[Ca(s)]=e[s];return n}const dc=e=>e?Nv(e)?gl(e):dc(e.parent):null,oo=At(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=>dc(e.parent),$root:e=>dc(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>fd(e),$forceUpdate:e=>e.f||(e.f=()=>{ud(e.update)}),$nextTick:e=>e.n||(e.n=hn.bind(e.proxy)),$watch:e=>A1.bind(e)}),Au=(e,t)=>e!==bt&&!e.__isScriptSetup&&at(e,t),i1={get({_:e},t){if(t==="__v_skip")return!0;const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:u}=e;let d;if(t[0]!=="$"){const v=o[t];if(v!==void 0)switch(v){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(Au(s,t))return o[t]=1,s[t];if(r!==bt&&at(r,t))return o[t]=2,r[t];if((d=e.propsOptions[0])&&at(d,t))return o[t]=3,i[t];if(n!==bt&&at(n,t))return o[t]=4,n[t];fc&&(o[t]=0)}}const c=oo[t];let p,m;if(c)return t==="$attrs"&&Rt(e.attrs,"get",""),c(e);if((p=l.__cssModules)&&(p=p[t]))return p;if(n!==bt&&at(n,t))return o[t]=4,n[t];if(m=u.config.globalProperties,at(m,t))return m[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return Au(r,t)?(r[t]=n,!0):s!==bt&&at(s,t)?(s[t]=n,!0):at(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==bt&&at(e,o)||Au(t,o)||(l=i[0])&&at(l,o)||at(s,o)||at(oo,o)||at(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?e._.accessCache[t]=0:at(n,"value")&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}};function Ht(){return pv().slots}function fv(){return pv().attrs}function pv(){const e=Bo();return e.setupContext||(e.setupContext=Iv(e))}function Lp(e){return Be(e)?e.reduce((t,n)=>(t[n]=null,t),{}):e}let fc=!0;function o1(e){const t=fd(e),n=e.proxy,s=e.ctx;fc=!1,t.beforeCreate&&Dp(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:u,inject:d,created:c,beforeMount:p,mounted:m,beforeUpdate:v,updated:w,activated:C,deactivated:k,beforeDestroy:x,beforeUnmount:O,destroyed:I,unmounted:N,render:B,renderTracked:L,renderTriggered:j,errorCaptured:F,serverPrefetch:$,expose:M,inheritAttrs:Q,components:X,directives:ae,filters:Oe}=t;if(d&&a1(d,s,null),o)for(const fe in o){const $e=o[fe];ze($e)&&(s[fe]=$e.bind(n))}if(r){const fe=r.call(n,n);gt(fe)&&(e.data=rn(fe))}if(fc=!0,i)for(const fe in i){const $e=i[fe],Xe=ze($e)?$e.bind(n,n):ze($e.get)?$e.get.bind(n,n):ss,K=!ze($e)&&ze($e.set)?$e.set.bind(n):ss,He=E({get:Xe,set:K});Object.defineProperty(s,fe,{enumerable:!0,configurable:!0,get:()=>He.value,set:oe=>He.value=oe})}if(l)for(const fe in l)hv(l[fe],s,n,fe);if(u){const fe=ze(u)?u.call(n):u;Reflect.ownKeys(fe).forEach($e=>{rs($e,fe[$e])})}c&&Dp(c,e,"c");function be(fe,$e){Be($e)?$e.forEach(Xe=>fe(Xe.bind(n))):$e&&fe($e.bind(n))}if(be(QE,p),be($t,m),be(ZE,v),be(ov,w),be(fl,C),be(XE,k),be(s1,F),be(n1,L),be(t1,j),be(No,O),be(dd,N),be(e1,$),Be(M))if(M.length){const fe=e.exposed||(e.exposed={});M.forEach($e=>{Object.defineProperty(fe,$e,{get:()=>n[$e],set:Xe=>n[$e]=Xe})})}else e.exposed||(e.exposed={});B&&e.render===ss&&(e.render=B),Q!=null&&(e.inheritAttrs=Q),X&&(e.components=X),ae&&(e.directives=ae),$&&rv(e)}function a1(e,t,n=ss){Be(e)&&(e=pc(e));for(const s in e){const r=e[s];let i;gt(r)?"default"in r?i=Ct(r.from||s,r.default,!0):i=Ct(r.from||s):i=Ct(r),mt(i)?Object.defineProperty(t,s,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):t[s]=i}}function Dp(e,t,n){qn(Be(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function hv(e,t,n,s){let r=s.includes(".")?Av(n,s):()=>n[s];if(wt(e)){const i=t[e];ze(i)&&dt(r,i)}else if(ze(e))dt(r,e.bind(n));else if(gt(e))if(Be(e))e.forEach(i=>hv(i,t,n,s));else{const i=ze(e.handler)?e.handler.bind(n):t[e.handler];ze(i)&&dt(r,i,e)}}function fd(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let u;return l?u=l:!r.length&&!n&&!s?u=t:(u={},r.length&&r.forEach(d=>Ua(u,d,o,!0)),Ua(u,t,o)),gt(t)&&i.set(t,u),u}function Ua(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&Ua(e,i,n,!0),r&&r.forEach(o=>Ua(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=l1[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const l1={data:Rp,props:Vp,emits:Vp,methods:Qi,computed:Qi,beforeCreate:Yt,created:Yt,beforeMount:Yt,mounted:Yt,beforeUpdate:Yt,updated:Yt,beforeDestroy:Yt,beforeUnmount:Yt,destroyed:Yt,unmounted:Yt,activated:Yt,deactivated:Yt,errorCaptured:Yt,serverPrefetch:Yt,components:Qi,directives:Qi,watch:c1,provide:Rp,inject:u1};function Rp(e,t){return t?e?function(){return At(ze(e)?e.call(this,this):e,ze(t)?t.call(this,this):t)}:t:e}function u1(e,t){return Qi(pc(e),pc(t))}function pc(e){if(Be(e)){const t={};for(let n=0;n1)return n&&ze(t)?t.call(s&&s.proxy):t}}function p1(){return!!(Pt||kt||Sr)}const gv={},vv=()=>Object.create(gv),bv=e=>Object.getPrototypeOf(e)===gv;function h1(e,t,n,s=!1){const r={},i=vv();e.propsDefaults=Object.create(null),_v(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:Fg(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function m1(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=it(r),[u]=e.propsOptions;let d=!1;if((s||o>0)&&!(o&16)){if(o&8){const c=e.vnode.dynamicProps;for(let p=0;p{u=!0;const[m,v]=yv(p,t,!0);At(o,m),v&&l.push(...v)};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}if(!i&&!u)return gt(e)&&s.set(e,ui),ui;if(Be(i))for(let c=0;ce[0]==="_"||e==="$stable",pd=e=>Be(e)?e.map(ns):[ns(e)],v1=(e,t,n)=>{if(t._n)return t;const s=me((...r)=>pd(t(...r)),n);return s._c=!1,s},Ev=(e,t,n)=>{const s=e._ctx;for(const r in e){if(wv(r))continue;const i=e[r];if(ze(i))t[r]=v1(r,i,s);else if(i!=null){const o=pd(i);t[r]=()=>o}}},Tv=(e,t)=>{const n=pd(t);e.slots.default=()=>n},Cv=(e,t,n)=>{for(const s in t)(n||s!=="_")&&(e[s]=t[s])},b1=(e,t,n)=>{const s=e.slots=vv();if(e.vnode.shapeFlag&32){const r=t._;r?(Cv(s,t,n),n&&_g(s,"_",r,!0)):Ev(t,s)}else t&&Tv(e,t)},_1=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=bt;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:Cv(r,t,n):(i=!t.$stable,Ev(t,r)),o=t}else t&&(Tv(e,t),o={default:1});if(i)for(const l in r)!wv(l)&&o[l]==null&&delete r[l]},en=I1;function y1(e){return w1(e)}function w1(e,t){const n=ll();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:u,setText:d,setElementText:c,parentNode:p,nextSibling:m,setScopeId:v=ss,insertStaticContent:w}=e,C=(g,T,D,R=null,W=null,J=null,he=void 0,ie=null,ce=!!T.dynamicChildren)=>{if(g===T)return;g&&!_r(g,T)&&(R=z(g),oe(g,W,J,!0),g=null),T.patchFlag===-2&&(ce=!1,T.dynamicChildren=null);const{type:se,ref:Ie,shapeFlag:ve}=T;switch(se){case ml:k(g,T,D,R);break;case Mt:x(g,T,D,R);break;case ku:g==null&&O(T,D,R,he);break;case Re:X(g,T,D,R,W,J,he,ie,ce);break;default:ve&1?B(g,T,D,R,W,J,he,ie,ce):ve&6?ae(g,T,D,R,W,J,he,ie,ce):(ve&64||ve&128)&&se.process(g,T,D,R,W,J,he,ie,ce,Te)}Ie!=null&&W&&cc(Ie,g&&g.ref,J,T||g,!T)},k=(g,T,D,R)=>{if(g==null)s(T.el=l(T.children),D,R);else{const W=T.el=g.el;T.children!==g.children&&d(W,T.children)}},x=(g,T,D,R)=>{g==null?s(T.el=u(T.children||""),D,R):T.el=g.el},O=(g,T,D,R)=>{[g.el,g.anchor]=w(g.children,T,D,R,g.el,g.anchor)},I=({el:g,anchor:T},D,R)=>{let W;for(;g&&g!==T;)W=m(g),s(g,D,R),g=W;s(T,D,R)},N=({el:g,anchor:T})=>{let D;for(;g&&g!==T;)D=m(g),r(g),g=D;r(T)},B=(g,T,D,R,W,J,he,ie,ce)=>{T.type==="svg"?he="svg":T.type==="math"&&(he="mathml"),g==null?L(T,D,R,W,J,he,ie,ce):$(g,T,W,J,he,ie,ce)},L=(g,T,D,R,W,J,he,ie)=>{let ce,se;const{props:Ie,shapeFlag:ve,transition:we,dirs:De}=g;if(ce=g.el=o(g.type,J,Ie&&Ie.is,Ie),ve&8?c(ce,g.children):ve&16&&F(g.children,ce,null,R,W,xu(g,J),he,ie),De&&hr(g,null,R,"created"),j(ce,g,g.scopeId,he,R),Ie){for(const nt in Ie)nt!=="value"&&!no(nt)&&i(ce,nt,null,Ie[nt],J,R);"value"in Ie&&i(ce,"value",null,Ie.value,J),(se=Ie.onVnodeBeforeMount)&&Zn(se,R,g)}De&&hr(g,null,R,"beforeMount");const We=E1(W,we);We&&we.beforeEnter(ce),s(ce,T,D),((se=Ie&&Ie.onVnodeMounted)||We||De)&&en(()=>{se&&Zn(se,R,g),We&&we.enter(ce),De&&hr(g,null,R,"mounted")},W)},j=(g,T,D,R,W)=>{if(D&&v(g,D),R)for(let J=0;J{for(let se=ce;se{const ie=T.el=g.el;let{patchFlag:ce,dynamicChildren:se,dirs:Ie}=T;ce|=g.patchFlag&16;const ve=g.props||bt,we=T.props||bt;let De;if(D&&mr(D,!1),(De=we.onVnodeBeforeUpdate)&&Zn(De,D,T,g),Ie&&hr(T,g,D,"beforeUpdate"),D&&mr(D,!0),(ve.innerHTML&&we.innerHTML==null||ve.textContent&&we.textContent==null)&&c(ie,""),se?M(g.dynamicChildren,se,ie,D,R,xu(T,W),J):he||$e(g,T,ie,null,D,R,xu(T,W),J,!1),ce>0){if(ce&16)Q(ie,ve,we,D,W);else if(ce&2&&ve.class!==we.class&&i(ie,"class",null,we.class,W),ce&4&&i(ie,"style",ve.style,we.style,W),ce&8){const We=T.dynamicProps;for(let nt=0;nt{De&&Zn(De,D,T,g),Ie&&hr(T,g,D,"updated")},R)},M=(g,T,D,R,W,J,he)=>{for(let ie=0;ie{if(T!==D){if(T!==bt)for(const J in T)!no(J)&&!(J in D)&&i(g,J,T[J],null,W,R);for(const J in D){if(no(J))continue;const he=D[J],ie=T[J];he!==ie&&J!=="value"&&i(g,J,ie,he,W,R)}"value"in D&&i(g,"value",T.value,D.value,W)}},X=(g,T,D,R,W,J,he,ie,ce)=>{const se=T.el=g?g.el:l(""),Ie=T.anchor=g?g.anchor:l("");let{patchFlag:ve,dynamicChildren:we,slotScopeIds:De}=T;De&&(ie=ie?ie.concat(De):De),g==null?(s(se,D,R),s(Ie,D,R),F(T.children||[],D,Ie,W,J,he,ie,ce)):ve>0&&ve&64&&we&&g.dynamicChildren?(M(g.dynamicChildren,we,D,W,J,he,ie),(T.key!=null||W&&T===W.subTree)&&hd(g,T,!0)):$e(g,T,D,Ie,W,J,he,ie,ce)},ae=(g,T,D,R,W,J,he,ie,ce)=>{T.slotScopeIds=ie,g==null?T.shapeFlag&512?W.ctx.activate(T,D,R,he,ce):Oe(T,D,R,W,J,he,ce):ge(g,T,ce)},Oe=(g,T,D,R,W,J,he)=>{const ie=g.component=V1(g,R,W);if(dl(g)&&(ie.ctx.renderer=Te),M1(ie,!1,he),ie.asyncDep){if(W&&W.registerDep(ie,be,he),!g.el){const ce=ie.subTree=Ye(Mt);x(null,ce,T,D)}}else be(ie,g,T,D,W,J,he)},ge=(g,T,D)=>{const R=T.component=g.component;if(N1(g,T,D))if(R.asyncDep&&!R.asyncResolved){fe(R,T,D);return}else R.next=T,R.update();else T.el=g.el,R.vnode=T},be=(g,T,D,R,W,J,he)=>{const ie=()=>{if(g.isMounted){let{next:ve,bu:we,u:De,parent:We,vnode:nt}=g;{const zt=Sv(g);if(zt){ve&&(ve.el=nt.el,fe(g,ve,he)),zt.asyncDep.then(()=>{g.isUnmounted||ie()});return}}let st=ve,Nt;mr(g,!1),ve?(ve.el=nt.el,fe(g,ve,he)):ve=nt,we&&Sa(we),(Nt=ve.props&&ve.props.onVnodeBeforeUpdate)&&Zn(Nt,We,ve,nt),mr(g,!0);const Bt=Ou(g),jt=g.subTree;g.subTree=Bt,C(jt,Bt,p(jt.el),z(jt),g,W,J),ve.el=Bt.el,st===null&&B1(g,Bt.el),De&&en(De,W),(Nt=ve.props&&ve.props.onVnodeUpdated)&&en(()=>Zn(Nt,We,ve,nt),W)}else{let ve;const{el:we,props:De}=T,{bm:We,m:nt,parent:st,root:Nt,type:Bt}=g,jt=fi(T);if(mr(g,!1),We&&Sa(We),!jt&&(ve=De&&De.onVnodeBeforeMount)&&Zn(ve,st,T),mr(g,!0),we&&tt){const zt=()=>{g.subTree=Ou(g),tt(we,g.subTree,g,W,null)};jt&&Bt.__asyncHydrate?Bt.__asyncHydrate(we,g,zt):zt()}else{Nt.ce&&Nt.ce._injectChildStyle(Bt);const zt=g.subTree=Ou(g);C(null,zt,D,R,g,W,J),T.el=zt.el}if(nt&&en(nt,W),!jt&&(ve=De&&De.onVnodeMounted)){const zt=T;en(()=>Zn(ve,st,zt),W)}(T.shapeFlag&256||st&&fi(st.vnode)&&st.vnode.shapeFlag&256)&&g.a&&en(g.a,W),g.isMounted=!0,T=D=R=null}};g.scope.on();const ce=g.effect=new Ag(ie);g.scope.off();const se=g.update=ce.run.bind(ce),Ie=g.job=ce.runIfDirty.bind(ce);Ie.i=g,Ie.id=g.uid,ce.scheduler=()=>ud(Ie),mr(g,!0),se()},fe=(g,T,D)=>{T.component=g;const R=g.vnode.props;g.vnode=T,g.next=null,m1(g,T.props,R,D),_1(g,T.children,D),Js(),$p(g),Qs()},$e=(g,T,D,R,W,J,he,ie,ce=!1)=>{const se=g&&g.children,Ie=g?g.shapeFlag:0,ve=T.children,{patchFlag:we,shapeFlag:De}=T;if(we>0){if(we&128){K(se,ve,D,R,W,J,he,ie,ce);return}else if(we&256){Xe(se,ve,D,R,W,J,he,ie,ce);return}}De&8?(Ie&16&&ue(se,W,J),ve!==se&&c(D,ve)):Ie&16?De&16?K(se,ve,D,R,W,J,he,ie,ce):ue(se,W,J,!0):(Ie&8&&c(D,""),De&16&&F(ve,D,R,W,J,he,ie,ce))},Xe=(g,T,D,R,W,J,he,ie,ce)=>{g=g||ui,T=T||ui;const se=g.length,Ie=T.length,ve=Math.min(se,Ie);let we;for(we=0;weIe?ue(g,W,J,!0,!1,ve):F(T,D,R,W,J,he,ie,ce,ve)},K=(g,T,D,R,W,J,he,ie,ce)=>{let se=0;const Ie=T.length;let ve=g.length-1,we=Ie-1;for(;se<=ve&&se<=we;){const De=g[se],We=T[se]=ce?Hs(T[se]):ns(T[se]);if(_r(De,We))C(De,We,D,null,W,J,he,ie,ce);else break;se++}for(;se<=ve&&se<=we;){const De=g[ve],We=T[we]=ce?Hs(T[we]):ns(T[we]);if(_r(De,We))C(De,We,D,null,W,J,he,ie,ce);else break;ve--,we--}if(se>ve){if(se<=we){const De=we+1,We=Dewe)for(;se<=ve;)oe(g[se],W,J,!0),se++;else{const De=se,We=se,nt=new Map;for(se=We;se<=we;se++){const Ut=T[se]=ce?Hs(T[se]):ns(T[se]);Ut.key!=null&&nt.set(Ut.key,se)}let st,Nt=0;const Bt=we-We+1;let jt=!1,zt=0;const nr=new Array(Bt);for(se=0;se=Bt){oe(Ut,W,J,!0);continue}let yn;if(Ut.key!=null)yn=nt.get(Ut.key);else for(st=We;st<=we;st++)if(nr[st-We]===0&&_r(Ut,T[st])){yn=st;break}yn===void 0?oe(Ut,W,J,!0):(nr[yn-We]=se+1,yn>=zt?zt=yn:jt=!0,C(Ut,T[yn],D,null,W,J,he,ie,ce),Nt++)}const zo=jt?T1(nr):ui;for(st=zo.length-1,se=Bt-1;se>=0;se--){const Ut=We+se,yn=T[Ut],Uo=Ut+1{const{el:J,type:he,transition:ie,children:ce,shapeFlag:se}=g;if(se&6){He(g.component.subTree,T,D,R);return}if(se&128){g.suspense.move(T,D,R);return}if(se&64){he.move(g,T,D,Te);return}if(he===Re){s(J,T,D);for(let ve=0;veie.enter(J),W);else{const{leave:ve,delayLeave:we,afterLeave:De}=ie,We=()=>s(J,T,D),nt=()=>{ve(J,()=>{We(),De&&De()})};we?we(J,We,nt):nt()}else s(J,T,D)},oe=(g,T,D,R=!1,W=!1)=>{const{type:J,props:he,ref:ie,children:ce,dynamicChildren:se,shapeFlag:Ie,patchFlag:ve,dirs:we,cacheIndex:De}=g;if(ve===-2&&(W=!1),ie!=null&&cc(ie,null,D,g,!0),De!=null&&(T.renderCache[De]=void 0),Ie&256){T.ctx.deactivate(g);return}const We=Ie&1&&we,nt=!fi(g);let st;if(nt&&(st=he&&he.onVnodeBeforeUnmount)&&Zn(st,T,g),Ie&6)Ne(g.component,D,R);else{if(Ie&128){g.suspense.unmount(D,R);return}We&&hr(g,null,T,"beforeUnmount"),Ie&64?g.type.remove(g,T,D,Te,R):se&&!se.hasOnce&&(J!==Re||ve>0&&ve&64)?ue(se,T,D,!1,!0):(J===Re&&ve&384||!W&&Ie&16)&&ue(ce,T,D),R&&le(g)}(nt&&(st=he&&he.onVnodeUnmounted)||We)&&en(()=>{st&&Zn(st,T,g),We&&hr(g,null,T,"unmounted")},D)},le=g=>{const{type:T,el:D,anchor:R,transition:W}=g;if(T===Re){Ae(D,R);return}if(T===ku){N(g);return}const J=()=>{r(D),W&&!W.persisted&&W.afterLeave&&W.afterLeave()};if(g.shapeFlag&1&&W&&!W.persisted){const{leave:he,delayLeave:ie}=W,ce=()=>he(D,J);ie?ie(g.el,J,ce):ce()}else J()},Ae=(g,T)=>{let D;for(;g!==T;)D=m(g),r(g),g=D;r(T)},Ne=(g,T,D)=>{const{bum:R,scope:W,job:J,subTree:he,um:ie,m:ce,a:se}=g;Fp(ce),Fp(se),R&&Sa(R),W.stop(),J&&(J.flags|=8,oe(he,g,T,D)),ie&&en(ie,T),en(()=>{g.isUnmounted=!0},T),T&&T.pendingBranch&&!T.isUnmounted&&g.asyncDep&&!g.asyncResolved&&g.suspenseId===T.pendingId&&(T.deps--,T.deps===0&&T.resolve())},ue=(g,T,D,R=!1,W=!1,J=0)=>{for(let he=J;he{if(g.shapeFlag&6)return z(g.component.subTree);if(g.shapeFlag&128)return g.suspense.next();const T=m(g.anchor||g.el),D=T&&T[Xg];return D?m(D):T};let q=!1;const de=(g,T,D)=>{g==null?T._vnode&&oe(T._vnode,null,null,!0):C(T._vnode||null,g,T,null,null,null,D),T._vnode=g,q||(q=!0,$p(),Kg(),q=!1)},Te={p:C,um:oe,m:He,r:le,mt:Oe,mc:F,pc:$e,pbc:M,n:z,o:e};let Qe,tt;return{render:de,hydrate:Qe,createApp:f1(de,Qe)}}function xu({type:e,props:t},n){return n==="svg"&&e==="foreignObject"||n==="mathml"&&e==="annotation-xml"&&t&&t.encoding&&t.encoding.includes("html")?void 0:n}function mr({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function E1(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function hd(e,t,n=!1){const s=e.children,r=t.children;if(Be(s)&&Be(r))for(let i=0;i>1,e[n[l]]0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}function Sv(e){const t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Sv(t)}function Fp(e){if(e)for(let t=0;tCt(C1);function ao(e,t){return md(e,null,t)}function dt(e,t,n){return md(e,t,n)}function md(e,t,n=bt){const{immediate:s,deep:r,flush:i,once:o}=n,l=At({},n),u=t&&s||!t&&i!=="post";let d;if(To){if(i==="sync"){const v=S1();d=v.__watcherHandles||(v.__watcherHandles=[])}else if(!u){const v=()=>{};return v.stop=ss,v.resume=ss,v.pause=ss,v}}const c=Pt;l.call=(v,w,C)=>qn(v,c,w,C);let p=!1;i==="post"?l.scheduler=v=>{en(v,c&&c.suspense)}:i!=="sync"&&(p=!0,l.scheduler=(v,w)=>{w?v():ud(v)}),l.augmentJob=v=>{t&&(v.flags|=4),p&&(v.flags|=2,c&&(v.id=c.uid,v.i=c))};const m=FE(e,t,l);return To&&(d?d.push(m):u&&m()),m}function A1(e,t,n){const s=this.proxy,r=wt(e)?e.includes(".")?Av(s,e):()=>s[e]:e.bind(s,s);let i;ze(t)?i=t:(i=t.handler,n=t);const o=Io(this),l=md(r,i.bind(s),n);return o(),l}function Av(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;rt==="modelValue"||t==="model-value"?e.modelModifiers:e[`${t}Modifiers`]||e[`${In(t)}Modifiers`]||e[`${Xs(t)}Modifiers`];function O1(e,t,...n){if(e.isUnmounted)return;const s=e.vnode.props||bt;let r=n;const i=t.startsWith("update:"),o=i&&x1(s,t.slice(7));o&&(o.trim&&(r=n.map(c=>wt(c)?c.trim():c)),o.number&&(r=n.map(Ma)));let l,u=s[l=Ca(t)]||s[l=Ca(In(t))];!u&&i&&(u=s[l=Ca(Xs(t))]),u&&qn(u,e,6,r);const d=s[l+"Once"];if(d){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,qn(d,e,6,r)}}function xv(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!ze(e)){const u=d=>{const c=xv(d,t,!0);c&&(l=!0,At(o,c))};!n&&t.mixins.length&&t.mixins.forEach(u),e.extends&&u(e.extends),e.mixins&&e.mixins.forEach(u)}return!i&&!l?(gt(e)&&s.set(e,null),null):(Be(i)?i.forEach(u=>o[u]=null):At(o,i),gt(e)&&s.set(e,o),o)}function hl(e,t){return!e||!il(t)?!1:(t=t.slice(2).replace(/Once$/,""),at(e,t[0].toLowerCase()+t.slice(1))||at(e,Xs(t))||at(e,t))}function Ou(e){const{type:t,vnode:n,proxy:s,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:u,render:d,renderCache:c,props:p,data:m,setupState:v,ctx:w,inheritAttrs:C}=e,k=za(e);let x,O;try{if(n.shapeFlag&4){const N=r||s,B=N;x=ns(d.call(B,N,c,p,v,m,w)),O=l}else{const N=t;x=ns(N.length>1?N(p,{attrs:l,slots:o,emit:u}):N(p,null)),O=t.props?l:k1(l)}}catch(N){lo.length=0,cl(N,e,1),x=Ye(Mt)}let I=x;if(O&&C!==!1){const N=Object.keys(O),{shapeFlag:B}=I;N.length&&B&7&&(i&&N.some(Xc)&&(O=$1(O,i)),I=Ws(I,O,!1,!0))}return n.dirs&&(I=Ws(I,null,!1,!0),I.dirs=I.dirs?I.dirs.concat(n.dirs):n.dirs),n.transition&&Nr(I,n.transition),x=I,za(k),x}const k1=e=>{let t;for(const n in e)(n==="class"||n==="style"||il(n))&&((t||(t={}))[n]=e[n]);return t},$1=(e,t)=>{const n={};for(const s in e)(!Xc(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function N1(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:u}=t,d=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&u>=0){if(u&1024)return!0;if(u&16)return s?Hp(s,o,d):!!o;if(u&8){const c=t.dynamicProps;for(let p=0;pe.__isSuspense;function I1(e,t){t&&t.pendingBranch?Be(e)?t.effects.push(...e):t.effects.push(e):zE(e)}const Re=Symbol.for("v-fgt"),ml=Symbol.for("v-txt"),Mt=Symbol.for("v-cmt"),ku=Symbol.for("v-stc"),lo=[];let pn=null;function A(e=!1){lo.push(pn=e?null:[])}function P1(){lo.pop(),pn=lo[lo.length-1]||null}let wo=1;function jp(e){wo+=e,e<0&&pn&&(pn.hasOnce=!0)}function kv(e){return e.dynamicChildren=wo>0?pn||ui:null,P1(),wo>0&&pn&&pn.push(e),e}function H(e,t,n,s,r,i){return kv(_e(e,t,n,s,r,i,!0))}function re(e,t,n,s,r){return kv(Ye(e,t,n,s,r,!0))}function Eo(e){return e?e.__v_isVNode===!0:!1}function _r(e,t){return e.type===t.type&&e.key===t.key}const $v=({key:e})=>e??null,xa=({ref:e,ref_key:t,ref_for:n})=>(typeof e=="number"&&(e=""+e),e!=null?wt(e)||mt(e)||ze(e)?{i:kt,r:e,k:t,f:!!n}:e:null);function _e(e,t=null,n=null,s=0,r=null,i=e===Re?0:1,o=!1,l=!1){const u={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&$v(t),ref:t&&xa(t),scopeId:Yg,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:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:kt};return l?(gd(u,n),i&128&&e.normalize(u)):n&&(u.shapeFlag|=wt(n)?8:16),wo>0&&!o&&pn&&(u.patchFlag>0||i&6)&&u.patchFlag!==32&&pn.push(u),u}const Ye=L1;function L1(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===lv)&&(e=Mt),Eo(e)){const l=Ws(e,t,!0);return n&&gd(l,n),wo>0&&!i&&pn&&(l.shapeFlag&6?pn[pn.indexOf(e)]=l:pn.push(l)),l.patchFlag=-2,l}if(z1(e)&&(e=e.__vccOpts),t){t=Ft(t);let{class:l,style:u}=t;l&&!wt(l)&&(t.class=ne(l)),gt(u)&&(ad(u)&&!Be(u)&&(u=At({},u)),t.style=Lt(u))}const o=wt(e)?1:Ov(e)?128:Jg(e)?64:gt(e)?4:ze(e)?2:0;return _e(e,t,n,s,r,o,i,!0)}function Ft(e){return e?ad(e)||bv(e)?At({},e):e:null}function Ws(e,t,n=!1,s=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:u}=e,d=t?Le(r||{},t):r,c={__v_isVNode:!0,__v_skip:!0,type:e.type,props:d,key:d&&$v(d),ref:t&&t.ref?n&&i?Be(i)?i.concat(xa(t)):[i,xa(t)]:xa(t):i,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!==Re?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:u,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ws(e.ssContent),ssFallback:e.ssFallback&&Ws(e.ssFallback),el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return u&&s&&Nr(c,u.clone(c)),c}function Fe(e=" ",t=0){return Ye(ml,null,e,t)}function xe(e="",t=!1){return t?(A(),re(Mt,null,e)):Ye(Mt,null,e)}function ns(e){return e==null||typeof e=="boolean"?Ye(Mt):Be(e)?Ye(Re,null,e.slice()):Eo(e)?Hs(e):Ye(ml,null,String(e))}function Hs(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ws(e)}function gd(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(Be(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),gd(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!bv(t)?t._ctx=kt:r===3&&kt&&(kt.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else ze(t)?(t={default:t,_ctx:kt},n=32):(t=String(t),s&64?(n=16,t=[Fe(t)]):n=8);e.children=t,e.shapeFlag|=n}function Le(...e){const t={};for(let n=0;nPt||kt;let qa,mc;{const e=ll(),t=(n,s)=>{let r;return(r=e[n])||(r=e[n]=[]),r.push(s),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};qa=t("__VUE_INSTANCE_SETTERS__",n=>Pt=n),mc=t("__VUE_SSR_SETTERS__",n=>To=n)}const Io=e=>{const t=Pt;return qa(e),e.scope.on(),()=>{e.scope.off(),qa(t)}},zp=()=>{Pt&&Pt.scope.off(),qa(null)};function Nv(e){return e.vnode.shapeFlag&4}let To=!1;function M1(e,t=!1,n=!1){t&&mc(t);const{props:s,children:r}=e.vnode,i=Nv(e);h1(e,s,i,t),b1(e,r,n);const o=i?F1(e,t):void 0;return t&&mc(!1),o}function F1(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,i1);const{setup:s}=n;if(s){Js();const r=e.setupContext=s.length>1?Iv(e):null,i=Io(e),o=$o(s,e,0,[e.props,r]),l=gg(o);if(Qs(),i(),(l||e.sp)&&!fi(e)&&rv(e),l){if(o.then(zp,zp),t)return o.then(u=>{Up(e,u,t)}).catch(u=>{cl(u,e,0)});e.asyncDep=o}else Up(e,o,t)}else Bv(e,t)}function Up(e,t,n){ze(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:gt(t)&&(e.setupState=zg(t)),Bv(e,n)}let qp;function Bv(e,t,n){const s=e.type;if(!e.render){if(!t&&qp&&!s.render){const r=s.template||fd(e).template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:u}=s,d=At(At({isCustomElement:i,delimiters:l},o),u);s.render=qp(r,d)}}e.render=s.render||ss}{const r=Io(e);Js();try{o1(e)}finally{Qs(),r()}}}const H1={get(e,t){return Rt(e,"get",""),e[t]}};function Iv(e){const t=n=>{e.exposed=n||{}};return{attrs:new Proxy(e.attrs,H1),slots:e.slots,emit:e.emit,expose:t}}function gl(e){return e.exposed?e.exposeProxy||(e.exposeProxy=new Proxy(zg(ld(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in oo)return oo[n](e)},has(t,n){return n in t||n in oo}})):e.proxy}function j1(e,t=!0){return ze(e)?e.displayName||e.name:e.name||t&&e.__name}function z1(e){return ze(e)&&"__vccOpts"in e}const E=(e,t)=>VE(e,t,To);function Ke(e,t,n){const s=arguments.length;return s===2?gt(t)&&!Be(t)?Eo(t)?Ye(e,null,[t]):Ye(e,t):Ye(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Eo(n)&&(n=[n]),Ye(e,t,n))}const U1="3.5.12";/** +* @vue/runtime-dom v3.5.12 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let gc;const Wp=typeof window<"u"&&window.trustedTypes;if(Wp)try{gc=Wp.createPolicy("vue",{createHTML:e=>e})}catch{}const Pv=gc?e=>gc.createHTML(e):e=>e,q1="http://www.w3.org/2000/svg",W1="http://www.w3.org/1998/Math/MathML",gs=typeof document<"u"?document:null,Kp=gs&&gs.createElement("template"),K1={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t==="svg"?gs.createElementNS(q1,e):t==="mathml"?gs.createElementNS(W1,e):n?gs.createElement(e,{is:n}):gs.createElement(e);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>gs.createTextNode(e),createComment:e=>gs.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>gs.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Kp.innerHTML=Pv(s==="svg"?`${e}`:s==="mathml"?`${e}`:e);const l=Kp.content;if(s==="svg"||s==="mathml"){const u=l.firstChild;for(;u.firstChild;)l.appendChild(u.firstChild);l.removeChild(u)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},Is="transition",Wi="animation",pi=Symbol("_vtc"),Lv={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},Dv=At({},ev,Lv),G1=e=>(e.displayName="Transition",e.props=Dv,e),Y1=G1((e,{slots:t})=>Ke(YE,Rv(e),t)),gr=(e,t=[])=>{Be(e)?e.forEach(n=>n(...t)):e&&e(...t)},Gp=e=>e?Be(e)?e.some(t=>t.length>1):e.length>1:!1;function Rv(e){const t={};for(const X in e)X in Lv||(t[X]=e[X]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:u=i,appearActiveClass:d=o,appearToClass:c=l,leaveFromClass:p=`${n}-leave-from`,leaveActiveClass:m=`${n}-leave-active`,leaveToClass:v=`${n}-leave-to`}=e,w=X1(r),C=w&&w[0],k=w&&w[1],{onBeforeEnter:x,onEnter:O,onEnterCancelled:I,onLeave:N,onLeaveCancelled:B,onBeforeAppear:L=x,onAppear:j=O,onAppearCancelled:F=I}=t,$=(X,ae,Oe)=>{Rs(X,ae?c:l),Rs(X,ae?d:o),Oe&&Oe()},M=(X,ae)=>{X._isLeaving=!1,Rs(X,p),Rs(X,v),Rs(X,m),ae&&ae()},Q=X=>(ae,Oe)=>{const ge=X?j:O,be=()=>$(ae,X,Oe);gr(ge,[ae,be]),Yp(()=>{Rs(ae,X?u:i),ms(ae,X?c:l),Gp(ge)||Xp(ae,s,C,be)})};return At(t,{onBeforeEnter(X){gr(x,[X]),ms(X,i),ms(X,o)},onBeforeAppear(X){gr(L,[X]),ms(X,u),ms(X,d)},onEnter:Q(!1),onAppear:Q(!0),onLeave(X,ae){X._isLeaving=!0;const Oe=()=>M(X,ae);ms(X,p),ms(X,m),Mv(),Yp(()=>{X._isLeaving&&(Rs(X,p),ms(X,v),Gp(N)||Xp(X,s,k,Oe))}),gr(N,[X,Oe])},onEnterCancelled(X){$(X,!1),gr(I,[X])},onAppearCancelled(X){$(X,!0),gr(F,[X])},onLeaveCancelled(X){M(X),gr(B,[X])}})}function X1(e){if(e==null)return null;if(gt(e))return[$u(e.enter),$u(e.leave)];{const t=$u(e);return[t,t]}}function $u(e){return iE(e)}function ms(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e[pi]||(e[pi]=new Set)).add(t)}function Rs(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const n=e[pi];n&&(n.delete(t),n.size||(e[pi]=void 0))}function Yp(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let J1=0;function Xp(e,t,n,s){const r=e._endId=++J1,i=()=>{r===e._endId&&s()};if(n!=null)return setTimeout(i,n);const{type:o,timeout:l,propCount:u}=Vv(e,t);if(!o)return s();const d=o+"end";let c=0;const p=()=>{e.removeEventListener(d,m),i()},m=v=>{v.target===e&&++c>=u&&p()};setTimeout(()=>{c(n[w]||"").split(", "),r=s(`${Is}Delay`),i=s(`${Is}Duration`),o=Jp(r,i),l=s(`${Wi}Delay`),u=s(`${Wi}Duration`),d=Jp(l,u);let c=null,p=0,m=0;t===Is?o>0&&(c=Is,p=o,m=i.length):t===Wi?d>0&&(c=Wi,p=d,m=u.length):(p=Math.max(o,d),c=p>0?o>d?Is:Wi:null,m=c?c===Is?i.length:u.length:0);const v=c===Is&&/\b(transform|all)(,|$)/.test(s(`${Is}Property`).toString());return{type:c,timeout:p,propCount:m,hasTransform:v}}function Jp(e,t){for(;e.lengthQp(n)+Qp(e[s])))}function Qp(e){return e==="auto"?0:Number(e.slice(0,-1).replace(",","."))*1e3}function Mv(){return document.body.offsetHeight}function Q1(e,t,n){const s=e[pi];s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}const Wa=Symbol("_vod"),Fv=Symbol("_vsh"),Z1={beforeMount(e,{value:t},{transition:n}){e[Wa]=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Ki(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Ki(e,!0),s.enter(e)):s.leave(e,()=>{Ki(e,!1)}):Ki(e,t))},beforeUnmount(e,{value:t}){Ki(e,t)}};function Ki(e,t){e.style.display=t?e[Wa]:"none",e[Fv]=!t}const eT=Symbol(""),tT=/(^|;)\s*display\s*:/;function nT(e,t,n){const s=e.style,r=wt(n);let i=!1;if(n&&!r){if(t)if(wt(t))for(const o of t.split(";")){const l=o.slice(0,o.indexOf(":")).trim();n[l]==null&&Oa(s,l,"")}else for(const o in t)n[o]==null&&Oa(s,o,"");for(const o in n)o==="display"&&(i=!0),Oa(s,o,n[o])}else if(r){if(t!==n){const o=s[eT];o&&(n+=";"+o),s.cssText=n,i=tT.test(n)}}else t&&e.removeAttribute("style");Wa in e&&(e[Wa]=i?s.display:"",e[Fv]&&(s.display="none"))}const Zp=/\s*!important$/;function Oa(e,t,n){if(Be(n))n.forEach(s=>Oa(e,t,s));else if(n==null&&(n=""),t.startsWith("--"))e.setProperty(t,n);else{const s=sT(e,t);Zp.test(n)?e.setProperty(Xs(s),n.replace(Zp,""),"important"):e[s]=n}}const eh=["Webkit","Moz","ms"],Nu={};function sT(e,t){const n=Nu[t];if(n)return n;let s=In(t);if(s!=="filter"&&s in e)return Nu[t]=s;s=al(s);for(let r=0;rBu||(aT.then(()=>Bu=0),Bu=Date.now());function uT(e,t){const n=s=>{if(!s._vts)s._vts=Date.now();else if(s._vts<=n.attached)return;qn(cT(s,n.value),t,5,[s])};return n.value=e,n.attached=lT(),n}function cT(e,t){if(Be(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const oh=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,dT=(e,t,n,s,r,i)=>{const o=r==="svg";t==="class"?Q1(e,s,o):t==="style"?nT(e,n,s):il(t)?Xc(t)||iT(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):fT(e,t,s,o))?(sh(e,t,s),!e.tagName.includes("-")&&(t==="value"||t==="checked"||t==="selected")&&nh(e,t,s,o,i,t!=="value")):e._isVueCE&&(/[A-Z]/.test(t)||!wt(s))?sh(e,In(t),s,i,t):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),nh(e,t,s,o))};function fT(e,t,n,s){if(s)return!!(t==="innerHTML"||t==="textContent"||t in e&&oh(t)&&ze(n));if(t==="spellcheck"||t==="draggable"||t==="translate"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA")return!1;if(t==="width"||t==="height"){const r=e.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return oh(t)&&wt(n)?!1:t in e}const Hv=new WeakMap,jv=new WeakMap,Ka=Symbol("_moveCb"),ah=Symbol("_enterCb"),pT=e=>(delete e.props.mode,e),hT=pT({name:"TransitionGroup",props:At({},Dv,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Bo(),s=Zg();let r,i;return ov(()=>{if(!r.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!_T(r[0].el,n.vnode.el,o))return;r.forEach(gT),r.forEach(vT);const l=r.filter(bT);Mv(),l.forEach(u=>{const d=u.el,c=d.style;ms(d,o),c.transform=c.webkitTransform=c.transitionDuration="";const p=d[Ka]=m=>{m&&m.target!==d||(!m||/transform$/.test(m.propertyName))&&(d.removeEventListener("transitionend",p),d[Ka]=null,Rs(d,o))};d.addEventListener("transitionend",p)})}),()=>{const o=it(e),l=Rv(o);let u=o.tag||Re;if(r=[],i)for(let d=0;d{l.split(/\s+/).forEach(u=>u&&s.classList.remove(u))}),n.split(/\s+/).forEach(l=>l&&s.classList.add(l)),s.style.display="none";const i=t.nodeType===1?t:t.parentNode;i.appendChild(s);const{hasTransform:o}=Vv(s);return i.removeChild(s),o}const Ks=e=>{const t=e.props["onUpdate:modelValue"]||!1;return Be(t)?n=>Sa(t,n):t};function yT(e){e.target.composing=!0}function lh(e){const t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event("input")))}const $n=Symbol("_assign"),XR={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e[$n]=Ks(r);const i=s||r.props&&r.props.type==="number";_s(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n&&(l=l.trim()),i&&(l=Ma(l)),e[$n](l)}),n&&_s(e,"change",()=>{e.value=e.value.trim()}),t||(_s(e,"compositionstart",yT),_s(e,"compositionend",lh),_s(e,"change",lh))},mounted(e,{value:t}){e.value=t??""},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:s,trim:r,number:i}},o){if(e[$n]=Ks(o),e.composing)return;const l=(i||e.type==="number")&&!/^0\d/.test(e.value)?Ma(e.value):e.value,u=t??"";l!==u&&(document.activeElement===e&&e.type!=="range"&&(s&&t===n||r&&e.value.trim()===u)||(e.value=u))}},wT={deep:!0,created(e,t,n){e[$n]=Ks(n),_s(e,"change",()=>{const s=e._modelValue,r=hi(e),i=e.checked,o=e[$n];if(Be(s)){const l=Zc(s,r),u=l!==-1;if(i&&!u)o(s.concat(r));else if(!i&&u){const d=[...s];d.splice(l,1),o(d)}}else if(Oi(s)){const l=new Set(s);i?l.add(r):l.delete(r),o(l)}else o(zv(e,i))})},mounted:uh,beforeUpdate(e,t,n){e[$n]=Ks(n),uh(e,t,n)}};function uh(e,{value:t,oldValue:n},s){e._modelValue=t;let r;if(Be(t))r=Zc(t,s.props.value)>-1;else if(Oi(t))r=t.has(s.props.value);else{if(t===n)return;r=kr(t,zv(e,!0))}e.checked!==r&&(e.checked=r)}const ET={created(e,{value:t},n){e.checked=kr(t,n.props.value),e[$n]=Ks(n),_s(e,"change",()=>{e[$n](hi(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e[$n]=Ks(s),t!==n&&(e.checked=kr(t,s.props.value))}},TT={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=Oi(t);_s(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Ma(hi(o)):hi(o));e[$n](e.multiple?r?new Set(i):i:i[0]),e._assigning=!0,hn(()=>{e._assigning=!1})}),e[$n]=Ks(s)},mounted(e,{value:t}){ch(e,t)},beforeUpdate(e,t,n){e[$n]=Ks(n)},updated(e,{value:t}){e._assigning||ch(e,t)}};function ch(e,t){const n=e.multiple,s=Be(t);if(!(n&&!s&&!Oi(t))){for(let r=0,i=e.options.length;rString(d)===String(l)):o.selected=Zc(t,l)>-1}else o.selected=t.has(l);else if(kr(hi(o),t)){e.selectedIndex!==r&&(e.selectedIndex=r);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function hi(e){return"_value"in e?e._value:e.value}function zv(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const CT=["ctrl","shift","alt","meta"],ST={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&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>CT.some(n=>e[`${n}Key`]&&!t.includes(n))},vl=(e,t)=>{const n=e._withMods||(e._withMods={}),s=t.join(".");return n[s]||(n[s]=(r,...i)=>{for(let o=0;o{const n=e._withKeys||(e._withKeys={}),s=t.join(".");return n[s]||(n[s]=r=>{if(!("key"in r))return;const i=Xs(r.key);if(t.some(o=>o===i||AT[o]===i))return e(r)})},OT=At({patchProp:dT},K1);let dh;function kT(){return dh||(dh=y1(OT))}const Uv=(...e)=>{const t=kT().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=NT(s);if(!r)return;const i=t._component;!ze(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=n(r,!1,$T(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t};function $T(e){if(e instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&e instanceof MathMLElement)return"mathml"}function NT(e){return wt(e)?document.querySelector(e):e}var BT=!1;/*! + * pinia v2.1.7 + * (c) 2023 Eduardo San Martin Morote + * @license MIT + */let qv;const bl=e=>qv=e,Wv=Symbol();function vc(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var uo;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(uo||(uo={}));function IT(){const e=Cg(!0),t=e.run(()=>ke({}));let n=[],s=[];const r=ld({install(i){bl(r),r._a=i,i.provide(Wv,r),i.config.globalProperties.$pinia=r,s.forEach(o=>n.push(o)),s=[]},use(i){return!this._a&&!BT?s.push(i):n.push(i),this},_p:n,_a:null,_e:e,_s:new Map,state:t});return r}const Kv=()=>{};function fh(e,t,n,s=Kv){e.push(t);const r=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),s())};return!n&&ed()&&Sg(r),r}function Qr(e,...t){e.slice().forEach(n=>{n(...t)})}const PT=e=>e();function bc(e,t){e instanceof Map&&t instanceof Map&&t.forEach((n,s)=>e.set(s,n)),e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const n in t){if(!t.hasOwnProperty(n))continue;const s=t[n],r=e[n];vc(r)&&vc(s)&&e.hasOwnProperty(n)&&!mt(s)&&!ws(s)?e[n]=bc(r,s):e[n]=s}return e}const LT=Symbol();function DT(e){return!vc(e)||!e.hasOwnProperty(LT)}const{assign:Vs}=Object;function RT(e){return!!(mt(e)&&e.effect)}function VT(e,t,n,s){const{state:r,actions:i,getters:o}=t,l=n.state.value[e];let u;function d(){l||(n.state.value[e]=r?r():{});const c=PE(n.state.value[e]);return Vs(c,i,Object.keys(o||{}).reduce((p,m)=>(p[m]=ld(E(()=>{bl(n);const v=n._s.get(e);return o[m].call(v,v)})),p),{}))}return u=Gv(e,d,t,n,s,!0),u}function Gv(e,t,n={},s,r,i){let o;const l=Vs({actions:{}},n),u={deep:!0};let d,c,p=[],m=[],v;const w=s.state.value[e];!i&&!w&&(s.state.value[e]={}),ke({});let C;function k(F){let $;d=c=!1,typeof F=="function"?(F(s.state.value[e]),$={type:uo.patchFunction,storeId:e,events:v}):(bc(s.state.value[e],F),$={type:uo.patchObject,payload:F,storeId:e,events:v});const M=C=Symbol();hn().then(()=>{C===M&&(d=!0)}),c=!0,Qr(p,$,s.state.value[e])}const x=i?function(){const{state:$}=n,M=$?$():{};this.$patch(Q=>{Vs(Q,M)})}:Kv;function O(){o.stop(),p=[],m=[],s._s.delete(e)}function I(F,$){return function(){bl(s);const M=Array.from(arguments),Q=[],X=[];function ae(be){Q.push(be)}function Oe(be){X.push(be)}Qr(m,{args:M,name:F,store:B,after:ae,onError:Oe});let ge;try{ge=$.apply(this&&this.$id===e?this:B,M)}catch(be){throw Qr(X,be),be}return ge instanceof Promise?ge.then(be=>(Qr(Q,be),be)).catch(be=>(Qr(X,be),Promise.reject(be))):(Qr(Q,ge),ge)}}const N={_p:s,$id:e,$onAction:fh.bind(null,m),$patch:k,$reset:x,$subscribe(F,$={}){const M=fh(p,F,$.detached,()=>Q()),Q=o.run(()=>dt(()=>s.state.value[e],X=>{($.flush==="sync"?c:d)&&F({storeId:e,type:uo.direct,events:v},X)},Vs({},u,$)));return M},$dispose:O},B=rn(N);s._s.set(e,B);const j=(s._a&&s._a.runWithContext||PT)(()=>s._e.run(()=>(o=Cg()).run(t)));for(const F in j){const $=j[F];if(mt($)&&!RT($)||ws($))i||(w&&DT($)&&(mt($)?$.value=w[F]:bc($,w[F])),s.state.value[e][F]=$);else if(typeof $=="function"){const M=I(F,$);j[F]=M,l.actions[F]=$}}return Vs(B,j),Vs(it(B),j),Object.defineProperty(B,"$state",{get:()=>s.state.value[e],set:F=>{k($=>{Vs($,F)})}}),s._p.forEach(F=>{Vs(B,o.run(()=>F({store:B,app:s._a,pinia:s,options:l})))}),w&&i&&n.hydrate&&n.hydrate(B.$state,w),d=!0,c=!0,B}function MT(e,t,n){let s,r;const i=typeof t=="function";s=e,r=i?n:t;function o(l,u){const d=p1();return l=l||(d?Ct(Wv,null):null),l&&bl(l),l=qv,l._s.has(s)||(i?Gv(s,t,r,l):VT(s,r,l)),l._s.get(s)}return o.$id=s,o}/*! + * vue-router v4.4.0 + * (c) 2024 Eduardo San Martin Morote + * @license MIT + */const si=typeof document<"u";function FT(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const ct=Object.assign;function Iu(e,t){const n={};for(const s in t){const r=t[s];n[s]=Wn(r)?r.map(e):e(r)}return n}const co=()=>{},Wn=Array.isArray,Yv=/#/g,HT=/&/g,jT=/\//g,zT=/=/g,UT=/\?/g,Xv=/\+/g,qT=/%5B/g,WT=/%5D/g,Jv=/%5E/g,KT=/%60/g,Qv=/%7B/g,GT=/%7C/g,Zv=/%7D/g,YT=/%20/g;function vd(e){return encodeURI(""+e).replace(GT,"|").replace(qT,"[").replace(WT,"]")}function XT(e){return vd(e).replace(Qv,"{").replace(Zv,"}").replace(Jv,"^")}function _c(e){return vd(e).replace(Xv,"%2B").replace(YT,"+").replace(Yv,"%23").replace(HT,"%26").replace(KT,"`").replace(Qv,"{").replace(Zv,"}").replace(Jv,"^")}function JT(e){return _c(e).replace(zT,"%3D")}function QT(e){return vd(e).replace(Yv,"%23").replace(UT,"%3F")}function ZT(e){return e==null?"":QT(e).replace(jT,"%2F")}function Co(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const eC=/\/$/,tC=e=>e.replace(eC,"");function Pu(e,t,n="/"){let s,r={},i="",o="";const l=t.indexOf("#");let u=t.indexOf("?");return l=0&&(u=-1),u>-1&&(s=t.slice(0,u),i=t.slice(u+1,l>-1?l:t.length),r=e(i)),l>-1&&(s=s||t.slice(0,l),o=t.slice(l,t.length)),s=iC(s??t,n),{fullPath:s+(i&&"?")+i+o,path:s,query:r,hash:Co(o)}}function nC(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function ph(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function sC(e,t,n){const s=t.matched.length-1,r=n.matched.length-1;return s>-1&&s===r&&mi(t.matched[s],n.matched[r])&&eb(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function mi(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function eb(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!rC(e[n],t[n]))return!1;return!0}function rC(e,t){return Wn(e)?hh(e,t):Wn(t)?hh(t,e):e===t}function hh(e,t){return Wn(t)?e.length===t.length&&e.every((n,s)=>n===t[s]):e.length===1&&e[0]===t}function iC(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),s=e.split("/"),r=s[s.length-1];(r===".."||r===".")&&s.push("");let i=n.length-1,o,l;for(o=0;o1&&i--;else break;return n.slice(0,i).join("/")+"/"+s.slice(o).join("/")}const Ps={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var So;(function(e){e.pop="pop",e.push="push"})(So||(So={}));var fo;(function(e){e.back="back",e.forward="forward",e.unknown=""})(fo||(fo={}));function oC(e){if(!e)if(si){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),tC(e)}const aC=/^[^#]+#/;function lC(e,t){return e.replace(aC,"#")+t}function uC(e,t){const n=document.documentElement.getBoundingClientRect(),s=e.getBoundingClientRect();return{behavior:t.behavior,left:s.left-n.left-(t.left||0),top:s.top-n.top-(t.top||0)}}const _l=()=>({left:window.scrollX,top:window.scrollY});function cC(e){let t;if("el"in e){const n=e.el,s=typeof n=="string"&&n.startsWith("#"),r=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!r)return;t=uC(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function mh(e,t){return(history.state?history.state.position-t:-1)+e}const yc=new Map;function dC(e,t){yc.set(e,t)}function fC(e){const t=yc.get(e);return yc.delete(e),t}let pC=()=>location.protocol+"//"+location.host;function tb(e,t){const{pathname:n,search:s,hash:r}=t,i=e.indexOf("#");if(i>-1){let l=r.includes(e.slice(i))?e.slice(i).length:1,u=r.slice(l);return u[0]!=="/"&&(u="/"+u),ph(u,"")}return ph(n,e)+s+r}function hC(e,t,n,s){let r=[],i=[],o=null;const l=({state:m})=>{const v=tb(e,location),w=n.value,C=t.value;let k=0;if(m){if(n.value=v,t.value=m,o&&o===w){o=null;return}k=C?m.position-C.position:0}else s(v);r.forEach(x=>{x(n.value,w,{delta:k,type:So.pop,direction:k?k>0?fo.forward:fo.back:fo.unknown})})};function u(){o=n.value}function d(m){r.push(m);const v=()=>{const w=r.indexOf(m);w>-1&&r.splice(w,1)};return i.push(v),v}function c(){const{history:m}=window;m.state&&m.replaceState(ct({},m.state,{scroll:_l()}),"")}function p(){for(const m of i)m();i=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",c)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",c,{passive:!0}),{pauseListeners:u,listen:d,destroy:p}}function gh(e,t,n,s=!1,r=!1){return{back:e,current:t,forward:n,replaced:s,position:window.history.length,scroll:r?_l():null}}function mC(e){const{history:t,location:n}=window,s={value:tb(e,n)},r={value:t.state};r.value||i(s.value,{back:null,current:s.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(u,d,c){const p=e.indexOf("#"),m=p>-1?(n.host&&document.querySelector("base")?e:e.slice(p))+u:pC()+e+u;try{t[c?"replaceState":"pushState"](d,"",m),r.value=d}catch(v){console.error(v),n[c?"replace":"assign"](m)}}function o(u,d){const c=ct({},t.state,gh(r.value.back,u,r.value.forward,!0),d,{position:r.value.position});i(u,c,!0),s.value=u}function l(u,d){const c=ct({},r.value,t.state,{forward:u,scroll:_l()});i(c.current,c,!0);const p=ct({},gh(s.value,u,null),{position:c.position+1},d);i(u,p,!1),s.value=u}return{location:s,state:r,push:l,replace:o}}function gC(e){e=oC(e);const t=mC(e),n=hC(e,t.state,t.location,t.replace);function s(i,o=!0){o||n.pauseListeners(),history.go(i)}const r=ct({location:"",base:e,go:s,createHref:lC.bind(null,e)},t,n);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function vC(e){return typeof e=="string"||e&&typeof e=="object"}function nb(e){return typeof e=="string"||typeof e=="symbol"}const sb=Symbol("");var vh;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(vh||(vh={}));function gi(e,t){return ct(new Error,{type:e,[sb]:!0},t)}function ps(e,t){return e instanceof Error&&sb in e&&(t==null||!!(e.type&t))}const bh="[^/]+?",bC={sensitive:!1,strict:!1,start:!0,end:!0},_C=/[.+*?^${}()[\]/\\]/g;function yC(e,t){const n=ct({},bC,t),s=[];let r=n.start?"^":"";const i=[];for(const d of e){const c=d.length?[]:[90];n.strict&&!d.length&&(r+="/");for(let p=0;pt.length?t.length===1&&t[0]===80?1:-1:0}function rb(e,t){let n=0;const s=e.score,r=t.score;for(;n0&&t[t.length-1]<0}const EC={type:0,value:""},TC=/[a-zA-Z0-9_]/;function CC(e){if(!e)return[[]];if(e==="/")return[[EC]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(v){throw new Error(`ERR (${n})/"${d}": ${v}`)}let n=0,s=n;const r=[];let i;function o(){i&&r.push(i),i=[]}let l=0,u,d="",c="";function p(){d&&(n===0?i.push({type:0,value:d}):n===1||n===2||n===3?(i.length>1&&(u==="*"||u==="+")&&t(`A repeatable param (${d}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:d,regexp:c,repeatable:u==="*"||u==="+",optional:u==="*"||u==="?"})):t("Invalid state to consume buffer"),d="")}function m(){d+=u}for(;l{o(I)}:co}function o(p){if(nb(p)){const m=s.get(p);m&&(s.delete(p),n.splice(n.indexOf(m),1),m.children.forEach(o),m.alias.forEach(o))}else{const m=n.indexOf(p);m>-1&&(n.splice(m,1),p.record.name&&s.delete(p.record.name),p.children.forEach(o),p.alias.forEach(o))}}function l(){return n}function u(p){const m=$C(p,n);n.splice(m,0,p),p.record.name&&!wh(p)&&s.set(p.record.name,p)}function d(p,m){let v,w={},C,k;if("name"in p&&p.name){if(v=s.get(p.name),!v)throw gi(1,{location:p});k=v.record.name,w=ct(yh(m.params,v.keys.filter(I=>!I.optional).concat(v.parent?v.parent.keys.filter(I=>I.optional):[]).map(I=>I.name)),p.params&&yh(p.params,v.keys.map(I=>I.name))),C=v.stringify(w)}else if(p.path!=null)C=p.path,v=n.find(I=>I.re.test(C)),v&&(w=v.parse(C),k=v.record.name);else{if(v=m.name?s.get(m.name):n.find(I=>I.re.test(m.path)),!v)throw gi(1,{location:p,currentLocation:m});k=v.record.name,w=ct({},m.params,p.params),C=v.stringify(w)}const x=[];let O=v;for(;O;)x.unshift(O.record),O=O.parent;return{name:k,path:C,params:w,matched:x,meta:kC(x)}}e.forEach(p=>i(p));function c(){n.length=0,s.clear()}return{addRoute:i,resolve:d,removeRoute:o,clearRoutes:c,getRoutes:l,getRecordMatcher:r}}function yh(e,t){const n={};for(const s of t)s in e&&(n[s]=e[s]);return n}function xC(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:OC(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function OC(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const s in e.components)t[s]=typeof n=="object"?n[s]:n;return t}function wh(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function kC(e){return e.reduce((t,n)=>ct(t,n.meta),{})}function Eh(e,t){const n={};for(const s in e)n[s]=s in t?t[s]:e[s];return n}function $C(e,t){let n=0,s=t.length;for(;n!==s;){const i=n+s>>1;rb(e,t[i])<0?s=i:n=i+1}const r=NC(e);return r&&(s=t.lastIndexOf(r,s-1)),s}function NC(e){let t=e;for(;t=t.parent;)if(ib(t)&&rb(e,t)===0)return t}function ib({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function BC(e){const t={};if(e===""||e==="?")return t;const s=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;ri&&_c(i)):[s&&_c(s)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+n,i!=null&&(t+="="+i))})}return t}function IC(e){const t={};for(const n in e){const s=e[n];s!==void 0&&(t[n]=Wn(s)?s.map(r=>r==null?null:""+r):s==null?s:""+s)}return t}const PC=Symbol(""),Ch=Symbol(""),yl=Symbol(""),bd=Symbol(""),wc=Symbol("");function Gi(){let e=[];function t(s){return e.push(s),()=>{const r=e.indexOf(s);r>-1&&e.splice(r,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function js(e,t,n,s,r,i=o=>o()){const o=s&&(s.enterCallbacks[r]=s.enterCallbacks[r]||[]);return()=>new Promise((l,u)=>{const d=m=>{m===!1?u(gi(4,{from:n,to:t})):m instanceof Error?u(m):vC(m)?u(gi(2,{from:t,to:m})):(o&&s.enterCallbacks[r]===o&&typeof m=="function"&&o.push(m),l())},c=i(()=>e.call(s&&s.instances[r],t,n,d));let p=Promise.resolve(c);e.length<3&&(p=p.then(d)),p.catch(m=>u(m))})}function Lu(e,t,n,s,r=i=>i()){const i=[];for(const o of e)for(const l in o.components){let u=o.components[l];if(!(t!=="beforeRouteEnter"&&!o.instances[l]))if(LC(u)){const c=(u.__vccOpts||u)[t];c&&i.push(js(c,n,s,o,l,r))}else{let d=u();i.push(()=>d.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${l}" at "${o.path}"`));const p=FT(c)?c.default:c;o.components[l]=p;const v=(p.__vccOpts||p)[t];return v&&js(v,n,s,o,l,r)()}))}}return i}function LC(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function Sh(e){const t=Ct(yl),n=Ct(bd),s=E(()=>{const u=b(e.to);return t.resolve(u)}),r=E(()=>{const{matched:u}=s.value,{length:d}=u,c=u[d-1],p=n.matched;if(!c||!p.length)return-1;const m=p.findIndex(mi.bind(null,c));if(m>-1)return m;const v=Ah(u[d-2]);return d>1&&Ah(c)===v&&p[p.length-1].path!==v?p.findIndex(mi.bind(null,u[d-2])):m}),i=E(()=>r.value>-1&&MC(n.params,s.value.params)),o=E(()=>r.value>-1&&r.value===n.matched.length-1&&eb(n.params,s.value.params));function l(u={}){return VC(u)?t[b(e.replace)?"replace":"push"](b(e.to)).catch(co):Promise.resolve()}return{route:s,href:E(()=>s.value.href),isActive:i,isExactActive:o,navigate:l}}const DC=Z({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:Sh,setup(e,{slots:t}){const n=rn(Sh(e)),{options:s}=Ct(yl),r=E(()=>({[xh(e.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[xh(e.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const i=t.default&&t.default(n);return e.custom?i:Ke("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:r.value},i)}}}),RC=DC;function VC(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){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}}function MC(e,t){for(const n in t){const s=t[n],r=e[n];if(typeof s=="string"){if(s!==r)return!1}else if(!Wn(r)||r.length!==s.length||s.some((i,o)=>i!==r[o]))return!1}return!0}function Ah(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const xh=(e,t,n)=>e??t??n,FC=Z({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const s=Ct(wc),r=E(()=>e.route||s.value),i=Ct(Ch,0),o=E(()=>{let d=b(i);const{matched:c}=r.value;let p;for(;(p=c[d])&&!p.components;)d++;return d}),l=E(()=>r.value.matched[o.value]);rs(Ch,E(()=>o.value+1)),rs(PC,l),rs(wc,r);const u=ke();return dt(()=>[u.value,l.value,e.name],([d,c,p],[m,v,w])=>{c&&(c.instances[p]=d,v&&v!==c&&d&&d===m&&(c.leaveGuards.size||(c.leaveGuards=v.leaveGuards),c.updateGuards.size||(c.updateGuards=v.updateGuards))),d&&c&&(!v||!mi(c,v)||!m)&&(c.enterCallbacks[p]||[]).forEach(C=>C(d))},{flush:"post"}),()=>{const d=r.value,c=e.name,p=l.value,m=p&&p.components[c];if(!m)return Oh(n.default,{Component:m,route:d});const v=p.props[c],w=v?v===!0?d.params:typeof v=="function"?v(d):v:null,k=Ke(m,ct({},w,t,{onVnodeUnmounted:x=>{x.component.isUnmounted&&(p.instances[c]=null)},ref:u}));return Oh(n.default,{Component:k,route:d})||k}}});function Oh(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const ob=FC;function HC(e){const t=AC(e.routes,e),n=e.parseQuery||BC,s=e.stringifyQuery||Th,r=e.history,i=Gi(),o=Gi(),l=Gi(),u=Hg(Ps);let d=Ps;si&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const c=Iu.bind(null,z=>""+z),p=Iu.bind(null,ZT),m=Iu.bind(null,Co);function v(z,q){let de,Te;return nb(z)?(de=t.getRecordMatcher(z),Te=q):Te=z,t.addRoute(Te,de)}function w(z){const q=t.getRecordMatcher(z);q&&t.removeRoute(q)}function C(){return t.getRoutes().map(z=>z.record)}function k(z){return!!t.getRecordMatcher(z)}function x(z,q){if(q=ct({},q||u.value),typeof z=="string"){const T=Pu(n,z,q.path),D=t.resolve({path:T.path},q),R=r.createHref(T.fullPath);return ct(T,D,{params:m(D.params),hash:Co(T.hash),redirectedFrom:void 0,href:R})}let de;if(z.path!=null)de=ct({},z,{path:Pu(n,z.path,q.path).path});else{const T=ct({},z.params);for(const D in T)T[D]==null&&delete T[D];de=ct({},z,{params:p(T)}),q.params=p(q.params)}const Te=t.resolve(de,q),Qe=z.hash||"";Te.params=c(m(Te.params));const tt=nC(s,ct({},z,{hash:XT(Qe),path:Te.path})),g=r.createHref(tt);return ct({fullPath:tt,hash:Qe,query:s===Th?IC(z.query):z.query||{}},Te,{redirectedFrom:void 0,href:g})}function O(z){return typeof z=="string"?Pu(n,z,u.value.path):ct({},z)}function I(z,q){if(d!==z)return gi(8,{from:q,to:z})}function N(z){return j(z)}function B(z){return N(ct(O(z),{replace:!0}))}function L(z){const q=z.matched[z.matched.length-1];if(q&&q.redirect){const{redirect:de}=q;let Te=typeof de=="function"?de(z):de;return typeof Te=="string"&&(Te=Te.includes("?")||Te.includes("#")?Te=O(Te):{path:Te},Te.params={}),ct({query:z.query,hash:z.hash,params:Te.path!=null?{}:z.params},Te)}}function j(z,q){const de=d=x(z),Te=u.value,Qe=z.state,tt=z.force,g=z.replace===!0,T=L(de);if(T)return j(ct(O(T),{state:typeof T=="object"?ct({},Qe,T.state):Qe,force:tt,replace:g}),q||de);const D=de;D.redirectedFrom=q;let R;return!tt&&sC(s,Te,de)&&(R=gi(16,{to:D,from:Te}),He(Te,Te,!0,!1)),(R?Promise.resolve(R):M(D,Te)).catch(W=>ps(W)?ps(W,2)?W:K(W):$e(W,D,Te)).then(W=>{if(W){if(ps(W,2))return j(ct({replace:g},O(W.to),{state:typeof W.to=="object"?ct({},Qe,W.to.state):Qe,force:tt}),q||D)}else W=X(D,Te,!0,g,Qe);return Q(D,Te,W),W})}function F(z,q){const de=I(z,q);return de?Promise.reject(de):Promise.resolve()}function $(z){const q=Ae.values().next().value;return q&&typeof q.runWithContext=="function"?q.runWithContext(z):z()}function M(z,q){let de;const[Te,Qe,tt]=jC(z,q);de=Lu(Te.reverse(),"beforeRouteLeave",z,q);for(const T of Te)T.leaveGuards.forEach(D=>{de.push(js(D,z,q))});const g=F.bind(null,z,q);return de.push(g),ue(de).then(()=>{de=[];for(const T of i.list())de.push(js(T,z,q));return de.push(g),ue(de)}).then(()=>{de=Lu(Qe,"beforeRouteUpdate",z,q);for(const T of Qe)T.updateGuards.forEach(D=>{de.push(js(D,z,q))});return de.push(g),ue(de)}).then(()=>{de=[];for(const T of tt)if(T.beforeEnter)if(Wn(T.beforeEnter))for(const D of T.beforeEnter)de.push(js(D,z,q));else de.push(js(T.beforeEnter,z,q));return de.push(g),ue(de)}).then(()=>(z.matched.forEach(T=>T.enterCallbacks={}),de=Lu(tt,"beforeRouteEnter",z,q,$),de.push(g),ue(de))).then(()=>{de=[];for(const T of o.list())de.push(js(T,z,q));return de.push(g),ue(de)}).catch(T=>ps(T,8)?T:Promise.reject(T))}function Q(z,q,de){l.list().forEach(Te=>$(()=>Te(z,q,de)))}function X(z,q,de,Te,Qe){const tt=I(z,q);if(tt)return tt;const g=q===Ps,T=si?history.state:{};de&&(Te||g?r.replace(z.fullPath,ct({scroll:g&&T&&T.scroll},Qe)):r.push(z.fullPath,Qe)),u.value=z,He(z,q,de,g),K()}let ae;function Oe(){ae||(ae=r.listen((z,q,de)=>{if(!Ne.listening)return;const Te=x(z),Qe=L(Te);if(Qe){j(ct(Qe,{replace:!0}),Te).catch(co);return}d=Te;const tt=u.value;si&&dC(mh(tt.fullPath,de.delta),_l()),M(Te,tt).catch(g=>ps(g,12)?g:ps(g,2)?(j(g.to,Te).then(T=>{ps(T,20)&&!de.delta&&de.type===So.pop&&r.go(-1,!1)}).catch(co),Promise.reject()):(de.delta&&r.go(-de.delta,!1),$e(g,Te,tt))).then(g=>{g=g||X(Te,tt,!1),g&&(de.delta&&!ps(g,8)?r.go(-de.delta,!1):de.type===So.pop&&ps(g,20)&&r.go(-1,!1)),Q(Te,tt,g)}).catch(co)}))}let ge=Gi(),be=Gi(),fe;function $e(z,q,de){K(z);const Te=be.list();return Te.length?Te.forEach(Qe=>Qe(z,q,de)):console.error(z),Promise.reject(z)}function Xe(){return fe&&u.value!==Ps?Promise.resolve():new Promise((z,q)=>{ge.add([z,q])})}function K(z){return fe||(fe=!z,Oe(),ge.list().forEach(([q,de])=>z?de(z):q()),ge.reset()),z}function He(z,q,de,Te){const{scrollBehavior:Qe}=e;if(!si||!Qe)return Promise.resolve();const tt=!de&&fC(mh(z.fullPath,0))||(Te||!de)&&history.state&&history.state.scroll||null;return hn().then(()=>Qe(z,q,tt)).then(g=>g&&cC(g)).catch(g=>$e(g,z,q))}const oe=z=>r.go(z);let le;const Ae=new Set,Ne={currentRoute:u,listening:!0,addRoute:v,removeRoute:w,clearRoutes:t.clearRoutes,hasRoute:k,getRoutes:C,resolve:x,options:e,push:N,replace:B,go:oe,back:()=>oe(-1),forward:()=>oe(1),beforeEach:i.add,beforeResolve:o.add,afterEach:l.add,onError:be.add,isReady:Xe,install(z){const q=this;z.component("RouterLink",RC),z.component("RouterView",ob),z.config.globalProperties.$router=q,Object.defineProperty(z.config.globalProperties,"$route",{enumerable:!0,get:()=>b(u)}),si&&!le&&u.value===Ps&&(le=!0,N(r.location).catch(Qe=>{}));const de={};for(const Qe in Ps)Object.defineProperty(de,Qe,{get:()=>u.value[Qe],enumerable:!0});z.provide(yl,q),z.provide(bd,Fg(de)),z.provide(wc,u);const Te=z.unmount;Ae.add(z),z.unmount=function(){Ae.delete(z),Ae.size<1&&(d=Ps,ae&&ae(),ae=null,u.value=Ps,le=!1,fe=!1),Te()}}};function ue(z){return z.reduce((q,de)=>q.then(()=>$(de)),Promise.resolve())}return Ne}function jC(e,t){const n=[],s=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let o=0;omi(d,l))?s.push(l):n.push(l));const u=e.matched[o];u&&(t.matched.find(d=>mi(d,u))||r.push(u))}return[n,s,r]}function JR(){return Ct(yl)}function QR(e){return Ct(bd)}const zC=Z({__name:"App",setup(e){return(t,n)=>(A(),re(b(ob)))}});function ab(e,t){return function(){return e.apply(t,arguments)}}const{toString:UC}=Object.prototype,{getPrototypeOf:_d}=Object,wl=(e=>t=>{const n=UC.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Kn=e=>(e=e.toLowerCase(),t=>wl(t)===e),El=e=>t=>typeof t===e,{isArray:$i}=Array,Ao=El("undefined");function qC(e){return e!==null&&!Ao(e)&&e.constructor!==null&&!Ao(e.constructor)&&Nn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const lb=Kn("ArrayBuffer");function WC(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&lb(e.buffer),t}const KC=El("string"),Nn=El("function"),ub=El("number"),Tl=e=>e!==null&&typeof e=="object",GC=e=>e===!0||e===!1,ka=e=>{if(wl(e)!=="object")return!1;const t=_d(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},YC=Kn("Date"),XC=Kn("File"),JC=Kn("Blob"),QC=Kn("FileList"),ZC=e=>Tl(e)&&Nn(e.pipe),eS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Nn(e.append)&&((t=wl(e))==="formdata"||t==="object"&&Nn(e.toString)&&e.toString()==="[object FormData]"))},tS=Kn("URLSearchParams"),[nS,sS,rS,iS]=["ReadableStream","Request","Response","Headers"].map(Kn),oS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Po(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let s,r;if(typeof e!="object"&&(e=[e]),$i(e))for(s=0,r=e.length;s0;)if(r=n[s],t===r.toLowerCase())return r;return null}const db=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,fb=e=>!Ao(e)&&e!==db;function Ec(){const{caseless:e}=fb(this)&&this||{},t={},n=(s,r)=>{const i=e&&cb(t,r)||r;ka(t[i])&&ka(s)?t[i]=Ec(t[i],s):ka(s)?t[i]=Ec({},s):$i(s)?t[i]=s.slice():t[i]=s};for(let s=0,r=arguments.length;s(Po(t,(r,i)=>{n&&Nn(r)?e[i]=ab(r,n):e[i]=r},{allOwnKeys:s}),e),lS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),uS=(e,t,n,s)=>{e.prototype=Object.create(t.prototype,s),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},cS=(e,t,n,s)=>{let r,i,o;const l={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),i=r.length;i-- >0;)o=r[i],(!s||s(o,e,t))&&!l[o]&&(t[o]=e[o],l[o]=!0);e=n!==!1&&_d(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},dS=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const s=e.indexOf(t,n);return s!==-1&&s===n},fS=e=>{if(!e)return null;if($i(e))return e;let t=e.length;if(!ub(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},pS=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&_d(Uint8Array)),hS=(e,t)=>{const s=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=s.next())&&!r.done;){const i=r.value;t.call(e,i[0],i[1])}},mS=(e,t)=>{let n;const s=[];for(;(n=e.exec(t))!==null;)s.push(n);return s},gS=Kn("HTMLFormElement"),vS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,s,r){return s.toUpperCase()+r}),kh=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),bS=Kn("RegExp"),pb=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),s={};Po(n,(r,i)=>{let o;(o=t(r,i,e))!==!1&&(s[i]=o||r)}),Object.defineProperties(e,s)},_S=e=>{pb(e,(t,n)=>{if(Nn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const s=e[n];if(Nn(s)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},yS=(e,t)=>{const n={},s=r=>{r.forEach(i=>{n[i]=!0})};return $i(e)?s(e):s(String(e).split(t)),n},wS=()=>{},ES=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,Du="abcdefghijklmnopqrstuvwxyz",$h="0123456789",hb={DIGIT:$h,ALPHA:Du,ALPHA_DIGIT:Du+Du.toUpperCase()+$h},TS=(e=16,t=hb.ALPHA_DIGIT)=>{let n="";const{length:s}=t;for(;e--;)n+=t[Math.random()*s|0];return n};function CS(e){return!!(e&&Nn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const SS=e=>{const t=new Array(10),n=(s,r)=>{if(Tl(s)){if(t.indexOf(s)>=0)return;if(!("toJSON"in s)){t[r]=s;const i=$i(s)?[]:{};return Po(s,(o,l)=>{const u=n(o,r+1);!Ao(u)&&(i[l]=u)}),t[r]=void 0,i}}return s};return n(e,0)},AS=Kn("AsyncFunction"),xS=e=>e&&(Tl(e)||Nn(e))&&Nn(e.then)&&Nn(e.catch),Y={isArray:$i,isArrayBuffer:lb,isBuffer:qC,isFormData:eS,isArrayBufferView:WC,isString:KC,isNumber:ub,isBoolean:GC,isObject:Tl,isPlainObject:ka,isReadableStream:nS,isRequest:sS,isResponse:rS,isHeaders:iS,isUndefined:Ao,isDate:YC,isFile:XC,isBlob:JC,isRegExp:bS,isFunction:Nn,isStream:ZC,isURLSearchParams:tS,isTypedArray:pS,isFileList:QC,forEach:Po,merge:Ec,extend:aS,trim:oS,stripBOM:lS,inherits:uS,toFlatObject:cS,kindOf:wl,kindOfTest:Kn,endsWith:dS,toArray:fS,forEachEntry:hS,matchAll:mS,isHTMLForm:gS,hasOwnProperty:kh,hasOwnProp:kh,reduceDescriptors:pb,freezeMethods:_S,toObjectSet:yS,toCamelCase:vS,noop:wS,toFiniteNumber:ES,findKey:cb,global:db,isContextDefined:fb,ALPHABET:hb,generateString:TS,isSpecCompliantForm:CS,toJSONObject:SS,isAsyncFn:AS,isThenable:xS};function Ge(e,t,n,s,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),s&&(this.request=s),r&&(this.response=r)}Y.inherits(Ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Y.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const mb=Ge.prototype,gb={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{gb[e]={value:e}});Object.defineProperties(Ge,gb);Object.defineProperty(mb,"isAxiosError",{value:!0});Ge.from=(e,t,n,s,r,i)=>{const o=Object.create(mb);return Y.toFlatObject(e,o,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),Ge.call(o,e.message,t,n,s,r),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const OS=null;function Tc(e){return Y.isPlainObject(e)||Y.isArray(e)}function vb(e){return Y.endsWith(e,"[]")?e.slice(0,-2):e}function Nh(e,t,n){return e?e.concat(t).map(function(r,i){return r=vb(r),!n&&i?"["+r+"]":r}).join(n?".":""):t}function kS(e){return Y.isArray(e)&&!e.some(Tc)}const $S=Y.toFlatObject(Y,{},null,function(t){return/^is[A-Z]/.test(t)});function Cl(e,t,n){if(!Y.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Y.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(C,k){return!Y.isUndefined(k[C])});const s=n.metaTokens,r=n.visitor||c,i=n.dots,o=n.indexes,u=(n.Blob||typeof Blob<"u"&&Blob)&&Y.isSpecCompliantForm(t);if(!Y.isFunction(r))throw new TypeError("visitor must be a function");function d(w){if(w===null)return"";if(Y.isDate(w))return w.toISOString();if(!u&&Y.isBlob(w))throw new Ge("Blob is not supported. Use a Buffer instead.");return Y.isArrayBuffer(w)||Y.isTypedArray(w)?u&&typeof Blob=="function"?new Blob([w]):Buffer.from(w):w}function c(w,C,k){let x=w;if(w&&!k&&typeof w=="object"){if(Y.endsWith(C,"{}"))C=s?C:C.slice(0,-2),w=JSON.stringify(w);else if(Y.isArray(w)&&kS(w)||(Y.isFileList(w)||Y.endsWith(C,"[]"))&&(x=Y.toArray(w)))return C=vb(C),x.forEach(function(I,N){!(Y.isUndefined(I)||I===null)&&t.append(o===!0?Nh([C],N,i):o===null?C:C+"[]",d(I))}),!1}return Tc(w)?!0:(t.append(Nh(k,C,i),d(w)),!1)}const p=[],m=Object.assign($S,{defaultVisitor:c,convertValue:d,isVisitable:Tc});function v(w,C){if(!Y.isUndefined(w)){if(p.indexOf(w)!==-1)throw Error("Circular reference detected in "+C.join("."));p.push(w),Y.forEach(w,function(x,O){(!(Y.isUndefined(x)||x===null)&&r.call(t,x,Y.isString(O)?O.trim():O,C,m))===!0&&v(x,C?C.concat(O):[O])}),p.pop()}}if(!Y.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Bh(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(s){return t[s]})}function yd(e,t){this._pairs=[],e&&Cl(e,this,t)}const bb=yd.prototype;bb.append=function(t,n){this._pairs.push([t,n])};bb.toString=function(t){const n=t?function(s){return t.call(this,s,Bh)}:Bh;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function NS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function _b(e,t,n){if(!t)return e;const s=n&&n.encode||NS,r=n&&n.serialize;let i;if(r?i=r(t,n):i=Y.isURLSearchParams(t)?t.toString():new yd(t,n).toString(s),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Ih{constructor(){this.handlers=[]}use(t,n,s){return this.handlers.push({fulfilled:t,rejected:n,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Y.forEach(this.handlers,function(s){s!==null&&t(s)})}}const yb={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},BS=typeof URLSearchParams<"u"?URLSearchParams:yd,IS=typeof FormData<"u"?FormData:null,PS=typeof Blob<"u"?Blob:null,LS={isBrowser:!0,classes:{URLSearchParams:BS,FormData:IS,Blob:PS},protocols:["http","https","file","blob","url","data"]},wd=typeof window<"u"&&typeof document<"u",DS=(e=>wd&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),RS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",VS=wd&&window.location.href||"http://localhost",MS=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:wd,hasStandardBrowserEnv:DS,hasStandardBrowserWebWorkerEnv:RS,origin:VS},Symbol.toStringTag,{value:"Module"})),jn={...MS,...LS};function FS(e,t){return Cl(e,new jn.classes.URLSearchParams,Object.assign({visitor:function(n,s,r,i){return jn.isNode&&Y.isBuffer(n)?(this.append(s,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function HS(e){return Y.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function jS(e){const t={},n=Object.keys(e);let s;const r=n.length;let i;for(s=0;s=n.length;return o=!o&&Y.isArray(r)?r.length:o,u?(Y.hasOwnProp(r,o)?r[o]=[r[o],s]:r[o]=s,!l):((!r[o]||!Y.isObject(r[o]))&&(r[o]=[]),t(n,s,r[o],i)&&Y.isArray(r[o])&&(r[o]=jS(r[o])),!l)}if(Y.isFormData(e)&&Y.isFunction(e.entries)){const n={};return Y.forEachEntry(e,(s,r)=>{t(HS(s),r,n,0)}),n}return null}function zS(e,t,n){if(Y.isString(e))try{return(t||JSON.parse)(e),Y.trim(e)}catch(s){if(s.name!=="SyntaxError")throw s}return(n||JSON.stringify)(e)}const Lo={transitional:yb,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const s=n.getContentType()||"",r=s.indexOf("application/json")>-1,i=Y.isObject(t);if(i&&Y.isHTMLForm(t)&&(t=new FormData(t)),Y.isFormData(t))return r?JSON.stringify(wb(t)):t;if(Y.isArrayBuffer(t)||Y.isBuffer(t)||Y.isStream(t)||Y.isFile(t)||Y.isBlob(t)||Y.isReadableStream(t))return t;if(Y.isArrayBufferView(t))return t.buffer;if(Y.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(s.indexOf("application/x-www-form-urlencoded")>-1)return FS(t,this.formSerializer).toString();if((l=Y.isFileList(t))||s.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return Cl(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||r?(n.setContentType("application/json",!1),zS(t)):t}],transformResponse:[function(t){const n=this.transitional||Lo.transitional,s=n&&n.forcedJSONParsing,r=this.responseType==="json";if(Y.isResponse(t)||Y.isReadableStream(t))return t;if(t&&Y.isString(t)&&(s&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(l){if(o)throw l.name==="SyntaxError"?Ge.from(l,Ge.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:jn.classes.FormData,Blob:jn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Y.forEach(["delete","get","head","post","put","patch"],e=>{Lo.headers[e]={}});const US=Y.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),qS=e=>{const t={};let n,s,r;return e&&e.split(` +`).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),s=o.substring(r+1).trim(),!(!n||t[n]&&US[n])&&(n==="set-cookie"?t[n]?t[n].push(s):t[n]=[s]:t[n]=t[n]?t[n]+", "+s:s)}),t},Ph=Symbol("internals");function Yi(e){return e&&String(e).trim().toLowerCase()}function $a(e){return e===!1||e==null?e:Y.isArray(e)?e.map($a):String(e)}function WS(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=n.exec(e);)t[s[1]]=s[2];return t}const KS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ru(e,t,n,s,r){if(Y.isFunction(s))return s.call(this,t,n);if(r&&(t=n),!!Y.isString(t)){if(Y.isString(s))return t.indexOf(s)!==-1;if(Y.isRegExp(s))return s.test(t)}}function GS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,s)=>n.toUpperCase()+s)}function YS(e,t){const n=Y.toCamelCase(" "+t);["get","set","has"].forEach(s=>{Object.defineProperty(e,s+n,{value:function(r,i,o){return this[s].call(this,t,r,i,o)},configurable:!0})})}class sn{constructor(t){t&&this.set(t)}set(t,n,s){const r=this;function i(l,u,d){const c=Yi(u);if(!c)throw new Error("header name must be a non-empty string");const p=Y.findKey(r,c);(!p||r[p]===void 0||d===!0||d===void 0&&r[p]!==!1)&&(r[p||u]=$a(l))}const o=(l,u)=>Y.forEach(l,(d,c)=>i(d,c,u));if(Y.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(Y.isString(t)&&(t=t.trim())&&!KS(t))o(qS(t),n);else if(Y.isHeaders(t))for(const[l,u]of t.entries())i(u,l,s);else t!=null&&i(n,t,s);return this}get(t,n){if(t=Yi(t),t){const s=Y.findKey(this,t);if(s){const r=this[s];if(!n)return r;if(n===!0)return WS(r);if(Y.isFunction(n))return n.call(this,r,s);if(Y.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Yi(t),t){const s=Y.findKey(this,t);return!!(s&&this[s]!==void 0&&(!n||Ru(this,this[s],s,n)))}return!1}delete(t,n){const s=this;let r=!1;function i(o){if(o=Yi(o),o){const l=Y.findKey(s,o);l&&(!n||Ru(s,s[l],l,n))&&(delete s[l],r=!0)}}return Y.isArray(t)?t.forEach(i):i(t),r}clear(t){const n=Object.keys(this);let s=n.length,r=!1;for(;s--;){const i=n[s];(!t||Ru(this,this[i],i,t,!0))&&(delete this[i],r=!0)}return r}normalize(t){const n=this,s={};return Y.forEach(this,(r,i)=>{const o=Y.findKey(s,i);if(o){n[o]=$a(r),delete n[i];return}const l=t?GS(i):String(i).trim();l!==i&&delete n[i],n[l]=$a(r),s[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Y.forEach(this,(s,r)=>{s!=null&&s!==!1&&(n[r]=t&&Y.isArray(s)?s.join(", "):s)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const s=new this(t);return n.forEach(r=>s.set(r)),s}static accessor(t){const s=(this[Ph]=this[Ph]={accessors:{}}).accessors,r=this.prototype;function i(o){const l=Yi(o);s[l]||(YS(r,o),s[l]=!0)}return Y.isArray(t)?t.forEach(i):i(t),this}}sn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Y.reduceDescriptors(sn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(s){this[n]=s}}});Y.freezeMethods(sn);function Vu(e,t){const n=this||Lo,s=t||n,r=sn.from(s.headers);let i=s.data;return Y.forEach(e,function(l){i=l.call(n,i,r.normalize(),t?t.status:void 0)}),r.normalize(),i}function Eb(e){return!!(e&&e.__CANCEL__)}function Ni(e,t,n){Ge.call(this,e??"canceled",Ge.ERR_CANCELED,t,n),this.name="CanceledError"}Y.inherits(Ni,Ge,{__CANCEL__:!0});function Tb(e,t,n){const s=n.config.validateStatus;!n.status||!s||s(n.status)?e(n):t(new Ge("Request failed with status code "+n.status,[Ge.ERR_BAD_REQUEST,Ge.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function XS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function JS(e,t){e=e||10;const n=new Array(e),s=new Array(e);let r=0,i=0,o;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),c=s[i];o||(o=d),n[r]=u,s[r]=d;let p=i,m=0;for(;p!==r;)m+=n[p++],p=p%e;if(r=(r+1)%e,r===i&&(i=(i+1)%e),d-os)return r&&(clearTimeout(r),r=null),n=l,e.apply(null,arguments);r||(r=setTimeout(()=>(r=null,n=Date.now(),e.apply(null,arguments)),s-(l-n)))}}const Ga=(e,t,n=3)=>{let s=0;const r=JS(50,250);return QS(i=>{const o=i.loaded,l=i.lengthComputable?i.total:void 0,u=o-s,d=r(u),c=o<=l;s=o;const p={loaded:o,total:l,progress:l?o/l:void 0,bytes:u,rate:d||void 0,estimated:d&&l&&c?(l-o)/d:void 0,event:i,lengthComputable:l!=null};p[t?"download":"upload"]=!0,e(p)},n)},ZS=jn.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let s;function r(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return s=r(window.location.href),function(o){const l=Y.isString(o)?r(o):o;return l.protocol===s.protocol&&l.host===s.host}}():function(){return function(){return!0}}(),eA=jn.hasStandardBrowserEnv?{write(e,t,n,s,r,i){const o=[e+"="+encodeURIComponent(t)];Y.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Y.isString(s)&&o.push("path="+s),Y.isString(r)&&o.push("domain="+r),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function tA(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function nA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Cb(e,t){return e&&!tA(t)?nA(e,t):t}const Lh=e=>e instanceof sn?{...e}:e;function Br(e,t){t=t||{};const n={};function s(d,c,p){return Y.isPlainObject(d)&&Y.isPlainObject(c)?Y.merge.call({caseless:p},d,c):Y.isPlainObject(c)?Y.merge({},c):Y.isArray(c)?c.slice():c}function r(d,c,p){if(Y.isUndefined(c)){if(!Y.isUndefined(d))return s(void 0,d,p)}else return s(d,c,p)}function i(d,c){if(!Y.isUndefined(c))return s(void 0,c)}function o(d,c){if(Y.isUndefined(c)){if(!Y.isUndefined(d))return s(void 0,d)}else return s(void 0,c)}function l(d,c,p){if(p in t)return s(d,c);if(p in e)return s(void 0,d)}const u={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(d,c)=>r(Lh(d),Lh(c),!0)};return Y.forEach(Object.keys(Object.assign({},e,t)),function(c){const p=u[c]||r,m=p(e[c],t[c],c);Y.isUndefined(m)&&p!==l||(n[c]=m)}),n}const Sb=e=>{const t=Br({},e);let{data:n,withXSRFToken:s,xsrfHeaderName:r,xsrfCookieName:i,headers:o,auth:l}=t;t.headers=o=sn.from(o),t.url=_b(Cb(t.baseURL,t.url),e.params,e.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(Y.isFormData(n)){if(jn.hasStandardBrowserEnv||jn.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((u=o.getContentType())!==!1){const[d,...c]=u?u.split(";").map(p=>p.trim()).filter(Boolean):[];o.setContentType([d||"multipart/form-data",...c].join("; "))}}if(jn.hasStandardBrowserEnv&&(s&&Y.isFunction(s)&&(s=s(t)),s||s!==!1&&ZS(t.url))){const d=r&&i&&eA.read(i);d&&o.set(r,d)}return t},sA=typeof XMLHttpRequest<"u",rA=sA&&function(e){return new Promise(function(n,s){const r=Sb(e);let i=r.data;const o=sn.from(r.headers).normalize();let{responseType:l}=r,u;function d(){r.cancelToken&&r.cancelToken.unsubscribe(u),r.signal&&r.signal.removeEventListener("abort",u)}let c=new XMLHttpRequest;c.open(r.method.toUpperCase(),r.url,!0),c.timeout=r.timeout;function p(){if(!c)return;const v=sn.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),C={data:!l||l==="text"||l==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:v,config:e,request:c};Tb(function(x){n(x),d()},function(x){s(x),d()},C),c=null}"onloadend"in c?c.onloadend=p:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(p)},c.onabort=function(){c&&(s(new Ge("Request aborted",Ge.ECONNABORTED,r,c)),c=null)},c.onerror=function(){s(new Ge("Network Error",Ge.ERR_NETWORK,r,c)),c=null},c.ontimeout=function(){let w=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const C=r.transitional||yb;r.timeoutErrorMessage&&(w=r.timeoutErrorMessage),s(new Ge(w,C.clarifyTimeoutError?Ge.ETIMEDOUT:Ge.ECONNABORTED,r,c)),c=null},i===void 0&&o.setContentType(null),"setRequestHeader"in c&&Y.forEach(o.toJSON(),function(w,C){c.setRequestHeader(C,w)}),Y.isUndefined(r.withCredentials)||(c.withCredentials=!!r.withCredentials),l&&l!=="json"&&(c.responseType=r.responseType),typeof r.onDownloadProgress=="function"&&c.addEventListener("progress",Ga(r.onDownloadProgress,!0)),typeof r.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",Ga(r.onUploadProgress)),(r.cancelToken||r.signal)&&(u=v=>{c&&(s(!v||v.type?new Ni(null,e,c):v),c.abort(),c=null)},r.cancelToken&&r.cancelToken.subscribe(u),r.signal&&(r.signal.aborted?u():r.signal.addEventListener("abort",u)));const m=XS(r.url);if(m&&jn.protocols.indexOf(m)===-1){s(new Ge("Unsupported protocol "+m+":",Ge.ERR_BAD_REQUEST,e));return}c.send(i||null)})},iA=(e,t)=>{let n=new AbortController,s;const r=function(u){if(!s){s=!0,o();const d=u instanceof Error?u:this.reason;n.abort(d instanceof Ge?d:new Ni(d instanceof Error?d.message:d))}};let i=t&&setTimeout(()=>{r(new Ge(`timeout ${t} of ms exceeded`,Ge.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(u=>{u&&(u.removeEventListener?u.removeEventListener("abort",r):u.unsubscribe(r))}),e=null)};e.forEach(u=>u&&u.addEventListener&&u.addEventListener("abort",r));const{signal:l}=n;return l.unsubscribe=o,[l,()=>{i&&clearTimeout(i),i=null}]},oA=function*(e,t){let n=e.byteLength;if(!t||n{const i=aA(e,t,r);let o=0;return new ReadableStream({type:"bytes",async pull(l){const{done:u,value:d}=await i.next();if(u){l.close(),s();return}let c=d.byteLength;n&&n(o+=c),l.enqueue(new Uint8Array(d))},cancel(l){return s(l),i.return()}},{highWaterMark:2})},Rh=(e,t)=>{const n=e!=null;return s=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:s}))},Sl=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Ab=Sl&&typeof ReadableStream=="function",Cc=Sl&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),lA=Ab&&(()=>{let e=!1;const t=new Request(jn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),Vh=64*1024,Sc=Ab&&!!(()=>{try{return Y.isReadableStream(new Response("").body)}catch{}})(),Ya={stream:Sc&&(e=>e.body)};Sl&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ya[t]&&(Ya[t]=Y.isFunction(e[t])?n=>n[t]():(n,s)=>{throw new Ge(`Response type '${t}' is not supported`,Ge.ERR_NOT_SUPPORT,s)})})})(new Response);const uA=async e=>{if(e==null)return 0;if(Y.isBlob(e))return e.size;if(Y.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(Y.isArrayBufferView(e))return e.byteLength;if(Y.isURLSearchParams(e)&&(e=e+""),Y.isString(e))return(await Cc(e)).byteLength},cA=async(e,t)=>{const n=Y.toFiniteNumber(e.getContentLength());return n??uA(t)},dA=Sl&&(async e=>{let{url:t,method:n,data:s,signal:r,cancelToken:i,timeout:o,onDownloadProgress:l,onUploadProgress:u,responseType:d,headers:c,withCredentials:p="same-origin",fetchOptions:m}=Sb(e);d=d?(d+"").toLowerCase():"text";let[v,w]=r||i||o?iA([r,i],o):[],C,k;const x=()=>{!C&&setTimeout(()=>{v&&v.unsubscribe()}),C=!0};let O;try{if(u&&lA&&n!=="get"&&n!=="head"&&(O=await cA(c,s))!==0){let L=new Request(t,{method:"POST",body:s,duplex:"half"}),j;Y.isFormData(s)&&(j=L.headers.get("content-type"))&&c.setContentType(j),L.body&&(s=Dh(L.body,Vh,Rh(O,Ga(u)),null,Cc))}Y.isString(p)||(p=p?"cors":"omit"),k=new Request(t,{...m,signal:v,method:n.toUpperCase(),headers:c.normalize().toJSON(),body:s,duplex:"half",withCredentials:p});let I=await fetch(k);const N=Sc&&(d==="stream"||d==="response");if(Sc&&(l||N)){const L={};["status","statusText","headers"].forEach(F=>{L[F]=I[F]});const j=Y.toFiniteNumber(I.headers.get("content-length"));I=new Response(Dh(I.body,Vh,l&&Rh(j,Ga(l,!0)),N&&x,Cc),L)}d=d||"text";let B=await Ya[Y.findKey(Ya,d)||"text"](I,e);return!N&&x(),w&&w(),await new Promise((L,j)=>{Tb(L,j,{data:B,headers:sn.from(I.headers),status:I.status,statusText:I.statusText,config:e,request:k})})}catch(I){throw x(),I&&I.name==="TypeError"&&/fetch/i.test(I.message)?Object.assign(new Ge("Network Error",Ge.ERR_NETWORK,e,k),{cause:I.cause||I}):Ge.from(I,I&&I.code,e,k)}}),Ac={http:OS,xhr:rA,fetch:dA};Y.forEach(Ac,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Mh=e=>`- ${e}`,fA=e=>Y.isFunction(e)||e===null||e===!1,xb={getAdapter:e=>{e=Y.isArray(e)?e:[e];const{length:t}=e;let n,s;const r={};for(let i=0;i`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : +`+i.map(Mh).join(` +`):" "+Mh(i[0]):"as no adapter specified";throw new Ge("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return s},adapters:Ac};function Mu(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ni(null,e)}function Fh(e){return Mu(e),e.headers=sn.from(e.headers),e.data=Vu.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),xb.getAdapter(e.adapter||Lo.adapter)(e).then(function(s){return Mu(e),s.data=Vu.call(e,e.transformResponse,s),s.headers=sn.from(s.headers),s},function(s){return Eb(s)||(Mu(e),s&&s.response&&(s.response.data=Vu.call(e,e.transformResponse,s.response),s.response.headers=sn.from(s.response.headers))),Promise.reject(s)})}const Ob="1.7.2",Ed={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Ed[e]=function(s){return typeof s===e||"a"+(t<1?"n ":" ")+e}});const Hh={};Ed.transitional=function(t,n,s){function r(i,o){return"[Axios v"+Ob+"] Transitional option '"+i+"'"+o+(s?". "+s:"")}return(i,o,l)=>{if(t===!1)throw new Ge(r(o," has been removed"+(n?" in "+n:"")),Ge.ERR_DEPRECATED);return n&&!Hh[o]&&(Hh[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,l):!0}};function pA(e,t,n){if(typeof e!="object")throw new Ge("options must be an object",Ge.ERR_BAD_OPTION_VALUE);const s=Object.keys(e);let r=s.length;for(;r-- >0;){const i=s[r],o=t[i];if(o){const l=e[i],u=l===void 0||o(l,i,e);if(u!==!0)throw new Ge("option "+i+" must be "+u,Ge.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ge("Unknown option "+i,Ge.ERR_BAD_OPTION)}}const xc={assertOptions:pA,validators:Ed},Ls=xc.validators;class Ar{constructor(t){this.defaults=t,this.interceptors={request:new Ih,response:new Ih}}async request(t,n){try{return await this._request(t,n)}catch(s){if(s instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const i=r.stack?r.stack.replace(/^.+\n/,""):"";try{s.stack?i&&!String(s.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(s.stack+=` +`+i):s.stack=i}catch{}}throw s}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Br(this.defaults,n);const{transitional:s,paramsSerializer:r,headers:i}=n;s!==void 0&&xc.assertOptions(s,{silentJSONParsing:Ls.transitional(Ls.boolean),forcedJSONParsing:Ls.transitional(Ls.boolean),clarifyTimeoutError:Ls.transitional(Ls.boolean)},!1),r!=null&&(Y.isFunction(r)?n.paramsSerializer={serialize:r}:xc.assertOptions(r,{encode:Ls.function,serialize:Ls.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&Y.merge(i.common,i[n.method]);i&&Y.forEach(["delete","get","head","post","put","patch","common"],w=>{delete i[w]}),n.headers=sn.concat(o,i);const l=[];let u=!0;this.interceptors.request.forEach(function(C){typeof C.runWhen=="function"&&C.runWhen(n)===!1||(u=u&&C.synchronous,l.unshift(C.fulfilled,C.rejected))});const d=[];this.interceptors.response.forEach(function(C){d.push(C.fulfilled,C.rejected)});let c,p=0,m;if(!u){const w=[Fh.bind(this),void 0];for(w.unshift.apply(w,l),w.push.apply(w,d),m=w.length,c=Promise.resolve(n);p{if(!s._listeners)return;let i=s._listeners.length;for(;i-- >0;)s._listeners[i](r);s._listeners=null}),this.promise.then=r=>{let i;const o=new Promise(l=>{s.subscribe(l),i=l}).then(r);return o.cancel=function(){s.unsubscribe(i)},o},t(function(i,o,l){s.reason||(s.reason=new Ni(i,o,l),n(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Td(function(r){t=r}),cancel:t}}}function hA(e){return function(n){return e.apply(null,n)}}function mA(e){return Y.isObject(e)&&e.isAxiosError===!0}const Oc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Oc).forEach(([e,t])=>{Oc[t]=e});function kb(e){const t=new Ar(e),n=ab(Ar.prototype.request,t);return Y.extend(n,Ar.prototype,t,{allOwnKeys:!0}),Y.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return kb(Br(e,r))},n}const xt=kb(Lo);xt.Axios=Ar;xt.CanceledError=Ni;xt.CancelToken=Td;xt.isCancel=Eb;xt.VERSION=Ob;xt.toFormData=Cl;xt.AxiosError=Ge;xt.Cancel=xt.CanceledError;xt.all=function(t){return Promise.all(t)};xt.spread=hA;xt.isAxiosError=mA;xt.mergeConfig=Br;xt.AxiosHeaders=sn;xt.formToJSON=e=>wb(Y.isHTMLForm(e)?new FormData(e):e);xt.getAdapter=xb.getAdapter;xt.HttpStatusCode=Oc;xt.default=xt;const gA="modulepreload",vA=function(e){return"/"+e},jh={},vr=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),o=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.all(n.map(l=>{if(l=vA(l),l in jh)return;jh[l]=!0;const u=l.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":gA,u||(c.as="script",c.crossOrigin=""),c.href=l,o&&c.setAttribute("nonce",o),document.head.appendChild(c),u)return new Promise((p,m)=>{c.addEventListener("load",p),c.addEventListener("error",()=>m(new Error(`Unable to preload CSS for ${l}`)))})}))}return r.then(()=>t()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})},$b=HC({history:gC(),routes:[{path:"/web",name:"rootOssList",component:()=>vr(()=>import("./OssList-BiiASFl1.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/web/oss/list",name:"ossList",component:()=>vr(()=>import("./OssList-BiiASFl1.js"),__vite__mapDeps([0,1,2,3,4]))},{path:"/web/workflowStage/list",name:"workflowStageList",component:()=>vr(()=>import("./WorkflowStageList-CxXBB1gI.js"),__vite__mapDeps([5,1,2,3]))},{path:"/web/eventListener/list",name:"eventListenerList",component:()=>vr(()=>import("./EventListenerList-DoBwtMSB.js"),__vite__mapDeps([6,1,2,3,7,8]))},{path:"/web/workflow/list",name:"workflowList",component:()=>vr(()=>import("./WorkflowList-_g7datXD.js"),__vite__mapDeps([9,1,2,3,7,8]))},{path:"/web/workflow/new",name:"workflowNew",component:()=>vr(()=>import("./WorkflowForm-NvV96v6Y.js"),__vite__mapDeps([10,4,2,3,7,8,11]))},{path:"/web/workflow/detail/:workflowIdx",name:"workflowDetail",component:()=>vr(()=>import("./WorkflowForm-NvV96v6Y.js"),__vite__mapDeps([10,4,2,3,7,8,11]))}]}),bA=MT("user",{state:()=>({accessToken:"",workspaceInfo:{id:"",name:"",description:"",created_at:"",updated_at:""},projectInfo:{id:"",ns_id:"",mci_id:"",cluster_id:"",name:"",description:"",created_at:"",updated_at:""},operationId:""}),actions:{setUser(e){this.accessToken=e.accessToken,this.workspaceInfo=e.workspaceInfo,this.projectInfo=e.projectInfo,this.operationId=e.operationId}}});$b.beforeEach(async(e,t,n)=>{console.log("## to ### : ",e),console.log("## from ### : ",t),window.addEventListener("message",async function(s){let r;s.data.accessToken===void 0?r={accessToken:"accesstokenExample",workspaceInfo:{id:"8b2df1f9-b937-4861-b5ce-855a41c346bc",name:"workspace2",description:"workspace2 desc",created_at:"2024-06-18T00:10:16.192337Z",updated_at:"2024-06-18T00:10:16.192337Z"},projectInfo:{id:"1e88f4ea-d052-4314-80a4-9ac3f6691feb",ns_id:"no01",mci_id:"mci01",cluster_id:"cluster01",name:"no01",description:"no01 desc",created_at:"2024-06-18T00:28:57.094105Z",updated_at:"2024-06-18T00:28:57.094105Z"},operationId:"op1"}:r=s.data;try{console.log(r),bA().setUser(r)}catch(i){console.error("Error in processing message:",i)}}),n()});var _A=Object.defineProperty,zh=Object.getOwnPropertySymbols,yA=Object.prototype.hasOwnProperty,wA=Object.prototype.propertyIsEnumerable,Uh=(e,t,n)=>t in e?_A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Nb=(e,t)=>{for(var n in t||(t={}))yA.call(t,n)&&Uh(e,n,t[n]);if(zh)for(var n of zh(t))wA.call(t,n)&&Uh(e,n,t[n]);return e},Al=e=>typeof e=="function",xl=e=>typeof e=="string",Bb=e=>xl(e)&&e.trim().length>0,EA=e=>typeof e=="number",yr=e=>typeof e>"u",xo=e=>typeof e=="object"&&e!==null,TA=e=>is(e,"tag")&&Bb(e.tag),Ib=e=>window.TouchEvent&&e instanceof TouchEvent,Pb=e=>is(e,"component")&&Lb(e.component),CA=e=>Al(e)||xo(e),Lb=e=>!yr(e)&&(xl(e)||CA(e)||Pb(e)),qh=e=>xo(e)&&["height","width","right","left","top","bottom"].every(t=>EA(e[t])),is=(e,t)=>(xo(e)||Al(e))&&t in e,SA=(e=>()=>e++)(0);function Fu(e){return Ib(e)?e.targetTouches[0].clientX:e.clientX}function Wh(e){return Ib(e)?e.targetTouches[0].clientY:e.clientY}var AA=e=>{yr(e.remove)?e.parentNode&&e.parentNode.removeChild(e):e.remove()},Do=e=>Pb(e)?Do(e.component):TA(e)?Z({render(){return e}}):typeof e=="string"?e:it(b(e)),xA=e=>{if(typeof e=="string")return e;const t=is(e,"props")&&xo(e.props)?e.props:{},n=is(e,"listeners")&&xo(e.listeners)?e.listeners:{};return{component:Do(e),props:t,listeners:n}},OA=()=>typeof window<"u",Cd=class{constructor(){this.allHandlers={}}getHandlers(e){return this.allHandlers[e]||[]}on(e,t){const n=this.getHandlers(e);n.push(t),this.allHandlers[e]=n}off(e,t){const n=this.getHandlers(e);n.splice(n.indexOf(t)>>>0,1)}emit(e,t){this.getHandlers(e).forEach(s=>s(t))}},kA=e=>["on","off","emit"].every(t=>is(e,t)&&Al(e[t])),dn;(function(e){e.SUCCESS="success",e.ERROR="error",e.WARNING="warning",e.INFO="info",e.DEFAULT="default"})(dn||(dn={}));var Xa;(function(e){e.TOP_LEFT="top-left",e.TOP_CENTER="top-center",e.TOP_RIGHT="top-right",e.BOTTOM_LEFT="bottom-left",e.BOTTOM_CENTER="bottom-center",e.BOTTOM_RIGHT="bottom-right"})(Xa||(Xa={}));var fn;(function(e){e.ADD="add",e.DISMISS="dismiss",e.UPDATE="update",e.CLEAR="clear",e.UPDATE_DEFAULTS="update_defaults"})(fn||(fn={}));var Fn="Vue-Toastification",Mn={type:{type:String,default:dn.DEFAULT},classNames:{type:[String,Array],default:()=>[]},trueBoolean:{type:Boolean,default:!0}},Db={type:Mn.type,customIcon:{type:[String,Boolean,Object,Function],default:!0}},Na={component:{type:[String,Object,Function,Boolean],default:"button"},classNames:Mn.classNames,showOnHover:{type:Boolean,default:!1},ariaLabel:{type:String,default:"close"}},kc={timeout:{type:[Number,Boolean],default:5e3},hideProgressBar:{type:Boolean,default:!1},isRunning:{type:Boolean,default:!1}},Rb={transition:{type:[Object,String],default:`${Fn}__bounce`}},$A={position:{type:String,default:Xa.TOP_RIGHT},draggable:Mn.trueBoolean,draggablePercent:{type:Number,default:.6},pauseOnFocusLoss:Mn.trueBoolean,pauseOnHover:Mn.trueBoolean,closeOnClick:Mn.trueBoolean,timeout:kc.timeout,hideProgressBar:kc.hideProgressBar,toastClassName:Mn.classNames,bodyClassName:Mn.classNames,icon:Db.customIcon,closeButton:Na.component,closeButtonClassName:Na.classNames,showCloseButtonOnHover:Na.showOnHover,accessibility:{type:Object,default:()=>({toastRole:"alert",closeButtonLabel:"close"})},rtl:{type:Boolean,default:!1},eventBus:{type:Object,required:!1,default:()=>new Cd}},NA={id:{type:[String,Number],required:!0,default:0},type:Mn.type,content:{type:[String,Object,Function],required:!0,default:""},onClick:{type:Function,default:void 0},onClose:{type:Function,default:void 0}},BA={container:{type:[Object,Function],default:()=>document.body},newestOnTop:Mn.trueBoolean,maxToasts:{type:Number,default:20},transition:Rb.transition,toastDefaults:Object,filterBeforeCreate:{type:Function,default:e=>e},filterToasts:{type:Function,default:e=>e},containerClassName:Mn.classNames,onMounted:Function,shareAppContext:[Boolean,Object]},Es={CORE_TOAST:$A,TOAST:NA,CONTAINER:BA,PROGRESS_BAR:kc,ICON:Db,TRANSITION:Rb,CLOSE_BUTTON:Na},Vb=Z({name:"VtProgressBar",props:Es.PROGRESS_BAR,data(){return{hasClass:!0}},computed:{style(){return{animationDuration:`${this.timeout}ms`,animationPlayState:this.isRunning?"running":"paused",opacity:this.hideProgressBar?0:1}},cpClass(){return this.hasClass?`${Fn}__progress-bar`:""}},watch:{timeout(){this.hasClass=!1,this.$nextTick(()=>this.hasClass=!0)}},mounted(){this.$el.addEventListener("animationend",this.animationEnded)},beforeUnmount(){this.$el.removeEventListener("animationend",this.animationEnded)},methods:{animationEnded(){this.$emit("close-toast")}}});function IA(e,t){return A(),H("div",{style:Lt(e.style),class:ne(e.cpClass)},null,6)}Vb.render=IA;var PA=Vb,Mb=Z({name:"VtCloseButton",props:Es.CLOSE_BUTTON,computed:{buttonComponent(){return this.component!==!1?Do(this.component):"button"},classes(){const e=[`${Fn}__close-button`];return this.showOnHover&&e.push("show-on-hover"),e.concat(this.classNames)}}}),LA=Fe(" × ");function DA(e,t){return A(),re(Ve(e.buttonComponent),Le({"aria-label":e.ariaLabel,class:e.classes},e.$attrs),{default:me(()=>[LA]),_:1},16,["aria-label","class"])}Mb.render=DA;var RA=Mb,Fb={},VA={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"check-circle",class:"svg-inline--fa fa-check-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},MA=_e("path",{fill:"currentColor",d:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z"},null,-1),FA=[MA];function HA(e,t){return A(),H("svg",VA,FA)}Fb.render=HA;var jA=Fb,Hb={},zA={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"info-circle",class:"svg-inline--fa fa-info-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},UA=_e("path",{fill:"currentColor",d:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z"},null,-1),qA=[UA];function WA(e,t){return A(),H("svg",zA,qA)}Hb.render=WA;var Kh=Hb,jb={},KA={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-circle",class:"svg-inline--fa fa-exclamation-circle fa-w-16",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},GA=_e("path",{fill:"currentColor",d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),YA=[GA];function XA(e,t){return A(),H("svg",KA,YA)}jb.render=XA;var JA=jb,zb={},QA={"aria-hidden":"true",focusable:"false","data-prefix":"fas","data-icon":"exclamation-triangle",class:"svg-inline--fa fa-exclamation-triangle fa-w-18",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512"},ZA=_e("path",{fill:"currentColor",d:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},null,-1),ex=[ZA];function tx(e,t){return A(),H("svg",QA,ex)}zb.render=tx;var nx=zb,Ub=Z({name:"VtIcon",props:Es.ICON,computed:{customIconChildren(){return is(this.customIcon,"iconChildren")?this.trimValue(this.customIcon.iconChildren):""},customIconClass(){return xl(this.customIcon)?this.trimValue(this.customIcon):is(this.customIcon,"iconClass")?this.trimValue(this.customIcon.iconClass):""},customIconTag(){return is(this.customIcon,"iconTag")?this.trimValue(this.customIcon.iconTag,"i"):"i"},hasCustomIcon(){return this.customIconClass.length>0},component(){return this.hasCustomIcon?this.customIconTag:Lb(this.customIcon)?Do(this.customIcon):this.iconTypeComponent},iconTypeComponent(){return{[dn.DEFAULT]:Kh,[dn.INFO]:Kh,[dn.SUCCESS]:jA,[dn.ERROR]:nx,[dn.WARNING]:JA}[this.type]},iconClasses(){const e=[`${Fn}__icon`];return this.hasCustomIcon?e.concat(this.customIconClass):e}},methods:{trimValue(e,t=""){return Bb(e)?e.trim():t}}});function sx(e,t){return A(),re(Ve(e.component),{class:ne(e.iconClasses)},{default:me(()=>[Fe(Ee(e.customIconChildren),1)]),_:1},8,["class"])}Ub.render=sx;var rx=Ub,qb=Z({name:"VtToast",components:{ProgressBar:PA,CloseButton:RA,Icon:rx},inheritAttrs:!1,props:Object.assign({},Es.CORE_TOAST,Es.TOAST),data(){return{isRunning:!0,disableTransitions:!1,beingDragged:!1,dragStart:0,dragPos:{x:0,y:0},dragRect:{}}},computed:{classes(){const e=[`${Fn}__toast`,`${Fn}__toast--${this.type}`,`${this.position}`].concat(this.toastClassName);return this.disableTransitions&&e.push("disable-transition"),this.rtl&&e.push(`${Fn}__toast--rtl`),e},bodyClasses(){return[`${Fn}__toast-${xl(this.content)?"body":"component-body"}`].concat(this.bodyClassName)},draggableStyle(){return this.dragStart===this.dragPos.x?{}:this.beingDragged?{transform:`translateX(${this.dragDelta}px)`,opacity:1-Math.abs(this.dragDelta/this.removalDistance)}:{transition:"transform 0.2s, opacity 0.2s",transform:"translateX(0)",opacity:1}},dragDelta(){return this.beingDragged?this.dragPos.x-this.dragStart:0},removalDistance(){return qh(this.dragRect)?(this.dragRect.right-this.dragRect.left)*this.draggablePercent:0}},mounted(){this.draggable&&this.draggableSetup(),this.pauseOnFocusLoss&&this.focusSetup()},beforeUnmount(){this.draggable&&this.draggableCleanup(),this.pauseOnFocusLoss&&this.focusCleanup()},methods:{hasProp:is,getVueComponentFromObj:Do,closeToast(){this.eventBus.emit(fn.DISMISS,this.id)},clickHandler(){this.onClick&&this.onClick(this.closeToast),this.closeOnClick&&(!this.beingDragged||this.dragStart===this.dragPos.x)&&this.closeToast()},timeoutHandler(){this.closeToast()},hoverPause(){this.pauseOnHover&&(this.isRunning=!1)},hoverPlay(){this.pauseOnHover&&(this.isRunning=!0)},focusPause(){this.isRunning=!1},focusPlay(){this.isRunning=!0},focusSetup(){addEventListener("blur",this.focusPause),addEventListener("focus",this.focusPlay)},focusCleanup(){removeEventListener("blur",this.focusPause),removeEventListener("focus",this.focusPlay)},draggableSetup(){const e=this.$el;e.addEventListener("touchstart",this.onDragStart,{passive:!0}),e.addEventListener("mousedown",this.onDragStart),addEventListener("touchmove",this.onDragMove,{passive:!1}),addEventListener("mousemove",this.onDragMove),addEventListener("touchend",this.onDragEnd),addEventListener("mouseup",this.onDragEnd)},draggableCleanup(){const e=this.$el;e.removeEventListener("touchstart",this.onDragStart),e.removeEventListener("mousedown",this.onDragStart),removeEventListener("touchmove",this.onDragMove),removeEventListener("mousemove",this.onDragMove),removeEventListener("touchend",this.onDragEnd),removeEventListener("mouseup",this.onDragEnd)},onDragStart(e){this.beingDragged=!0,this.dragPos={x:Fu(e),y:Wh(e)},this.dragStart=Fu(e),this.dragRect=this.$el.getBoundingClientRect()},onDragMove(e){this.beingDragged&&(e.preventDefault(),this.isRunning&&(this.isRunning=!1),this.dragPos={x:Fu(e),y:Wh(e)})},onDragEnd(){this.beingDragged&&(Math.abs(this.dragDelta)>=this.removalDistance?(this.disableTransitions=!0,this.$nextTick(()=>this.closeToast())):setTimeout(()=>{this.beingDragged=!1,qh(this.dragRect)&&this.pauseOnHover&&this.dragRect.bottom>=this.dragPos.y&&this.dragPos.y>=this.dragRect.top&&this.dragRect.left<=this.dragPos.x&&this.dragPos.x<=this.dragRect.right?this.isRunning=!1:this.isRunning=!0}))}}}),ix=["role"];function ox(e,t){const n=Cr("Icon"),s=Cr("CloseButton"),r=Cr("ProgressBar");return A(),H("div",{class:ne(e.classes),style:Lt(e.draggableStyle),onClick:t[0]||(t[0]=(...i)=>e.clickHandler&&e.clickHandler(...i)),onMouseenter:t[1]||(t[1]=(...i)=>e.hoverPause&&e.hoverPause(...i)),onMouseleave:t[2]||(t[2]=(...i)=>e.hoverPlay&&e.hoverPlay(...i))},[e.icon?(A(),re(n,{key:0,"custom-icon":e.icon,type:e.type},null,8,["custom-icon","type"])):xe("v-if",!0),_e("div",{role:e.accessibility.toastRole||"alert",class:ne(e.bodyClasses)},[typeof e.content=="string"?(A(),H(Re,{key:0},[Fe(Ee(e.content),1)],2112)):(A(),re(Ve(e.getVueComponentFromObj(e.content)),Le({key:1,"toast-id":e.id},e.hasProp(e.content,"props")?e.content.props:{},r1(e.hasProp(e.content,"listeners")?e.content.listeners:{}),{onCloseToast:e.closeToast}),null,16,["toast-id","onCloseToast"]))],10,ix),e.closeButton?(A(),re(s,{key:1,component:e.closeButton,"class-names":e.closeButtonClassName,"show-on-hover":e.showCloseButtonOnHover,"aria-label":e.accessibility.closeButtonLabel,onClick:vl(e.closeToast,["stop"])},null,8,["component","class-names","show-on-hover","aria-label","onClick"])):xe("v-if",!0),e.timeout?(A(),re(r,{key:2,"is-running":e.isRunning,"hide-progress-bar":e.hideProgressBar,timeout:e.timeout,onCloseToast:e.timeoutHandler},null,8,["is-running","hide-progress-bar","timeout","onCloseToast"])):xe("v-if",!0)],38)}qb.render=ox;var ax=qb,Wb=Z({name:"VtTransition",props:Es.TRANSITION,emits:["leave"],methods:{hasProp:is,leave(e){e instanceof HTMLElement&&(e.style.left=e.offsetLeft+"px",e.style.top=e.offsetTop+"px",e.style.width=getComputedStyle(e).width,e.style.position="absolute")}}});function lx(e,t){return A(),re(mT,{tag:"div","enter-active-class":e.transition.enter?e.transition.enter:`${e.transition}-enter-active`,"move-class":e.transition.move?e.transition.move:`${e.transition}-move`,"leave-active-class":e.transition.leave?e.transition.leave:`${e.transition}-leave-active`,onLeave:e.leave},{default:me(()=>[U(e.$slots,"default")]),_:3},8,["enter-active-class","move-class","leave-active-class","onLeave"])}Wb.render=lx;var ux=Wb,Kb=Z({name:"VueToastification",devtools:{hide:!0},components:{Toast:ax,VtTransition:ux},props:Object.assign({},Es.CORE_TOAST,Es.CONTAINER,Es.TRANSITION),data(){return{count:0,positions:Object.values(Xa),toasts:{},defaults:{}}},computed:{toastArray(){return Object.values(this.toasts)},filteredToasts(){return this.defaults.filterToasts(this.toastArray)}},beforeMount(){const e=this.eventBus;e.on(fn.ADD,this.addToast),e.on(fn.CLEAR,this.clearToasts),e.on(fn.DISMISS,this.dismissToast),e.on(fn.UPDATE,this.updateToast),e.on(fn.UPDATE_DEFAULTS,this.updateDefaults),this.defaults=this.$props},mounted(){this.setup(this.container)},methods:{async setup(e){Al(e)&&(e=await e()),AA(this.$el),e.appendChild(this.$el)},setToast(e){yr(e.id)||(this.toasts[e.id]=e)},addToast(e){e.content=xA(e.content);const t=Object.assign({},this.defaults,e.type&&this.defaults.toastDefaults&&this.defaults.toastDefaults[e.type],e),n=this.defaults.filterBeforeCreate(t,this.toastArray);n&&this.setToast(n)},dismissToast(e){const t=this.toasts[e];!yr(t)&&!yr(t.onClose)&&t.onClose(),delete this.toasts[e]},clearToasts(){Object.keys(this.toasts).forEach(e=>{this.dismissToast(e)})},getPositionToasts(e){const t=this.filteredToasts.filter(n=>n.position===e).slice(0,this.defaults.maxToasts);return this.defaults.newestOnTop?t.reverse():t},updateDefaults(e){yr(e.container)||this.setup(e.container),this.defaults=Object.assign({},this.defaults,e)},updateToast({id:e,options:t,create:n}){this.toasts[e]?(t.timeout&&t.timeout===this.toasts[e].timeout&&t.timeout++,this.setToast(Object.assign({},this.toasts[e],t))):n&&this.addToast(Object.assign({},{id:e},t))},getClasses(e){return[`${Fn}__container`,e].concat(this.defaults.containerClassName)}}});function cx(e,t){const n=Cr("Toast"),s=Cr("VtTransition");return A(),H("div",null,[(A(!0),H(Re,null,ht(e.positions,r=>(A(),H("div",{key:r},[Ye(s,{transition:e.defaults.transition,class:ne(e.getClasses(r))},{default:me(()=>[(A(!0),H(Re,null,ht(e.getPositionToasts(r),i=>(A(),re(n,Le({key:i.id},i),null,16))),128))]),_:2},1032,["transition","class"])]))),128))])}Kb.render=cx;var dx=Kb,Gh=(e={},t=!0)=>{const n=e.eventBus=e.eventBus||new Cd;t&&hn(()=>{const i=Uv(dx,Nb({},e)),o=i.mount(document.createElement("div")),l=e.onMounted;if(yr(l)||l(o,i),e.shareAppContext){const u=e.shareAppContext;u===!0?console.warn(`[${Fn}] App to share context with was not provided.`):(i._context.components=u._context.components,i._context.directives=u._context.directives,i._context.mixins=u._context.mixins,i._context.provides=u._context.provides,i.config.globalProperties=u.config.globalProperties)}});const s=(i,o)=>{const l=Object.assign({},{id:SA(),type:dn.DEFAULT},o,{content:i});return n.emit(fn.ADD,l),l.id};s.clear=()=>n.emit(fn.CLEAR,void 0),s.updateDefaults=i=>{n.emit(fn.UPDATE_DEFAULTS,i)},s.dismiss=i=>{n.emit(fn.DISMISS,i)};function r(i,{content:o,options:l},u=!1){const d=Object.assign({},l,{content:o});n.emit(fn.UPDATE,{id:i,options:d,create:u})}return s.update=r,s.success=(i,o)=>s(i,Object.assign({},o,{type:dn.SUCCESS})),s.info=(i,o)=>s(i,Object.assign({},o,{type:dn.INFO})),s.error=(i,o)=>s(i,Object.assign({},o,{type:dn.ERROR})),s.warning=(i,o)=>s(i,Object.assign({},o,{type:dn.WARNING})),s},fx=()=>{const e=()=>console.warn(`[${Fn}] This plugin does not support SSR!`);return new Proxy(e,{get(){return e}})};function Gb(e){return OA()?kA(e)?Gh({eventBus:e},!1):Gh(e,!0):fx()}var Yb=Symbol("VueToastification"),Xb=new Cd,px=(e,t)=>{(t==null?void 0:t.shareAppContext)===!0&&(t.shareAppContext=e);const n=Gb(Nb({eventBus:Xb},t));e.provide(Yb,n)},ZR=e=>{const t=Bo()?Ct(Yb,void 0):void 0;return t||Gb(Xb)},hx=px,mx=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function eV(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gx={exports:{}};/*! + * Bootstrap v5.3.3 (https://getbootstrap.com/) + * Copyright 2011-2024 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */(function(e,t){(function(n,s){e.exports=s()})(mx,function(){const n=new Map,s={set(h,a,f){n.has(h)||n.set(h,new Map);const y=n.get(h);y.has(a)||y.size===0?y.set(a,f):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(y.keys())[0]}.`)},get:(h,a)=>n.has(h)&&n.get(h).get(a)||null,remove(h,a){if(!n.has(h))return;const f=n.get(h);f.delete(a),f.size===0&&n.delete(h)}},r="transitionend",i=h=>(h&&window.CSS&&window.CSS.escape&&(h=h.replace(/#([^\s"#']+)/g,(a,f)=>`#${CSS.escape(f)}`)),h),o=h=>{h.dispatchEvent(new Event(r))},l=h=>!(!h||typeof h!="object")&&(h.jquery!==void 0&&(h=h[0]),h.nodeType!==void 0),u=h=>l(h)?h.jquery?h[0]:h:typeof h=="string"&&h.length>0?document.querySelector(i(h)):null,d=h=>{if(!l(h)||h.getClientRects().length===0)return!1;const a=getComputedStyle(h).getPropertyValue("visibility")==="visible",f=h.closest("details:not([open])");if(!f)return a;if(f!==h){const y=h.closest("summary");if(y&&y.parentNode!==f||y===null)return!1}return a},c=h=>!h||h.nodeType!==Node.ELEMENT_NODE||!!h.classList.contains("disabled")||(h.disabled!==void 0?h.disabled:h.hasAttribute("disabled")&&h.getAttribute("disabled")!=="false"),p=h=>{if(!document.documentElement.attachShadow)return null;if(typeof h.getRootNode=="function"){const a=h.getRootNode();return a instanceof ShadowRoot?a:null}return h instanceof ShadowRoot?h:h.parentNode?p(h.parentNode):null},m=()=>{},v=h=>{h.offsetHeight},w=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,C=[],k=()=>document.documentElement.dir==="rtl",x=h=>{var a;a=()=>{const f=w();if(f){const y=h.NAME,P=f.fn[y];f.fn[y]=h.jQueryInterface,f.fn[y].Constructor=h,f.fn[y].noConflict=()=>(f.fn[y]=P,h.jQueryInterface)}},document.readyState==="loading"?(C.length||document.addEventListener("DOMContentLoaded",()=>{for(const f of C)f()}),C.push(a)):a()},O=(h,a=[],f=h)=>typeof h=="function"?h(...a):f,I=(h,a,f=!0)=>{if(!f)return void O(h);const y=(G=>{if(!G)return 0;let{transitionDuration:ee,transitionDelay:pe}=window.getComputedStyle(G);const Ce=Number.parseFloat(ee),Se=Number.parseFloat(pe);return Ce||Se?(ee=ee.split(",")[0],pe=pe.split(",")[0],1e3*(Number.parseFloat(ee)+Number.parseFloat(pe))):0})(a)+5;let P=!1;const V=({target:G})=>{G===a&&(P=!0,a.removeEventListener(r,V),O(h))};a.addEventListener(r,V),setTimeout(()=>{P||o(a)},y)},N=(h,a,f,y)=>{const P=h.length;let V=h.indexOf(a);return V===-1?!f&&y?h[P-1]:h[0]:(V+=f?1:-1,y&&(V=(V+P)%P),h[Math.max(0,Math.min(V,P-1))])},B=/[^.]*(?=\..*)\.|.*/,L=/\..*/,j=/::\d+$/,F={};let $=1;const M={mouseenter:"mouseover",mouseleave:"mouseout"},Q=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function X(h,a){return a&&`${a}::${$++}`||h.uidEvent||$++}function ae(h){const a=X(h);return h.uidEvent=a,F[a]=F[a]||{},F[a]}function Oe(h,a,f=null){return Object.values(h).find(y=>y.callable===a&&y.delegationSelector===f)}function ge(h,a,f){const y=typeof a=="string",P=y?f:a||f;let V=Xe(h);return Q.has(V)||(V=h),[y,P,V]}function be(h,a,f,y,P){if(typeof a!="string"||!h)return;let[V,G,ee]=ge(a,f,y);a in M&&(G=(Ue=>function(je){if(!je.relatedTarget||je.relatedTarget!==je.delegateTarget&&!je.delegateTarget.contains(je.relatedTarget))return Ue.call(this,je)})(G));const pe=ae(h),Ce=pe[ee]||(pe[ee]={}),Se=Oe(Ce,G,V?f:null);if(Se)return void(Se.oneOff=Se.oneOff&&P);const ye=X(G,a.replace(B,"")),Je=V?function(Me,Ue,je){return function qe(ft){const _t=Me.querySelectorAll(Ue);for(let{target:et}=ft;et&&et!==this;et=et.parentNode)for(const ot of _t)if(ot===et)return He(ft,{delegateTarget:et}),qe.oneOff&&K.off(Me,ft.type,Ue,je),je.apply(et,[ft])}}(h,f,G):function(Me,Ue){return function je(qe){return He(qe,{delegateTarget:Me}),je.oneOff&&K.off(Me,qe.type,Ue),Ue.apply(Me,[qe])}}(h,G);Je.delegationSelector=V?f:null,Je.callable=G,Je.oneOff=P,Je.uidEvent=ye,Ce[ye]=Je,h.addEventListener(ee,Je,V)}function fe(h,a,f,y,P){const V=Oe(a[f],y,P);V&&(h.removeEventListener(f,V,!!P),delete a[f][V.uidEvent])}function $e(h,a,f,y){const P=a[f]||{};for(const[V,G]of Object.entries(P))V.includes(y)&&fe(h,a,f,G.callable,G.delegationSelector)}function Xe(h){return h=h.replace(L,""),M[h]||h}const K={on(h,a,f,y){be(h,a,f,y,!1)},one(h,a,f,y){be(h,a,f,y,!0)},off(h,a,f,y){if(typeof a!="string"||!h)return;const[P,V,G]=ge(a,f,y),ee=G!==a,pe=ae(h),Ce=pe[G]||{},Se=a.startsWith(".");if(V===void 0){if(Se)for(const ye of Object.keys(pe))$e(h,pe,ye,a.slice(1));for(const[ye,Je]of Object.entries(Ce)){const Me=ye.replace(j,"");ee&&!a.includes(Me)||fe(h,pe,G,Je.callable,Je.delegationSelector)}}else{if(!Object.keys(Ce).length)return;fe(h,pe,G,V,P?f:null)}},trigger(h,a,f){if(typeof a!="string"||!h)return null;const y=w();let P=null,V=!0,G=!0,ee=!1;a!==Xe(a)&&y&&(P=y.Event(a,f),y(h).trigger(P),V=!P.isPropagationStopped(),G=!P.isImmediatePropagationStopped(),ee=P.isDefaultPrevented());const pe=He(new Event(a,{bubbles:V,cancelable:!0}),f);return ee&&pe.preventDefault(),G&&h.dispatchEvent(pe),pe.defaultPrevented&&P&&P.preventDefault(),pe}};function He(h,a={}){for(const[f,y]of Object.entries(a))try{h[f]=y}catch{Object.defineProperty(h,f,{configurable:!0,get:()=>y})}return h}function oe(h){if(h==="true")return!0;if(h==="false")return!1;if(h===Number(h).toString())return Number(h);if(h===""||h==="null")return null;if(typeof h!="string")return h;try{return JSON.parse(decodeURIComponent(h))}catch{return h}}function le(h){return h.replace(/[A-Z]/g,a=>`-${a.toLowerCase()}`)}const Ae={setDataAttribute(h,a,f){h.setAttribute(`data-bs-${le(a)}`,f)},removeDataAttribute(h,a){h.removeAttribute(`data-bs-${le(a)}`)},getDataAttributes(h){if(!h)return{};const a={},f=Object.keys(h.dataset).filter(y=>y.startsWith("bs")&&!y.startsWith("bsConfig"));for(const y of f){let P=y.replace(/^bs/,"");P=P.charAt(0).toLowerCase()+P.slice(1,P.length),a[P]=oe(h.dataset[y])}return a},getDataAttribute:(h,a)=>oe(h.getAttribute(`data-bs-${le(a)}`))};class Ne{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(a){return a=this._mergeConfigObj(a),a=this._configAfterMerge(a),this._typeCheckConfig(a),a}_configAfterMerge(a){return a}_mergeConfigObj(a,f){const y=l(f)?Ae.getDataAttribute(f,"config"):{};return{...this.constructor.Default,...typeof y=="object"?y:{},...l(f)?Ae.getDataAttributes(f):{},...typeof a=="object"?a:{}}}_typeCheckConfig(a,f=this.constructor.DefaultType){for(const[P,V]of Object.entries(f)){const G=a[P],ee=l(G)?"element":(y=G)==null?`${y}`:Object.prototype.toString.call(y).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(V).test(ee))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${P}" provided type "${ee}" but expected type "${V}".`)}var y}}class ue extends Ne{constructor(a,f){super(),(a=u(a))&&(this._element=a,this._config=this._getConfig(f),s.set(this._element,this.constructor.DATA_KEY,this))}dispose(){s.remove(this._element,this.constructor.DATA_KEY),K.off(this._element,this.constructor.EVENT_KEY);for(const a of Object.getOwnPropertyNames(this))this[a]=null}_queueCallback(a,f,y=!0){I(a,f,y)}_getConfig(a){return a=this._mergeConfigObj(a,this._element),a=this._configAfterMerge(a),this._typeCheckConfig(a),a}static getInstance(a){return s.get(u(a),this.DATA_KEY)}static getOrCreateInstance(a,f={}){return this.getInstance(a)||new this(a,typeof f=="object"?f:null)}static get VERSION(){return"5.3.3"}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(a){return`${a}${this.EVENT_KEY}`}}const z=h=>{let a=h.getAttribute("data-bs-target");if(!a||a==="#"){let f=h.getAttribute("href");if(!f||!f.includes("#")&&!f.startsWith("."))return null;f.includes("#")&&!f.startsWith("#")&&(f=`#${f.split("#")[1]}`),a=f&&f!=="#"?f.trim():null}return a?a.split(",").map(f=>i(f)).join(","):null},q={find:(h,a=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(a,h)),findOne:(h,a=document.documentElement)=>Element.prototype.querySelector.call(a,h),children:(h,a)=>[].concat(...h.children).filter(f=>f.matches(a)),parents(h,a){const f=[];let y=h.parentNode.closest(a);for(;y;)f.push(y),y=y.parentNode.closest(a);return f},prev(h,a){let f=h.previousElementSibling;for(;f;){if(f.matches(a))return[f];f=f.previousElementSibling}return[]},next(h,a){let f=h.nextElementSibling;for(;f;){if(f.matches(a))return[f];f=f.nextElementSibling}return[]},focusableChildren(h){const a=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(f=>`${f}:not([tabindex^="-"])`).join(",");return this.find(a,h).filter(f=>!c(f)&&d(f))},getSelectorFromElement(h){const a=z(h);return a&&q.findOne(a)?a:null},getElementFromSelector(h){const a=z(h);return a?q.findOne(a):null},getMultipleElementsFromSelector(h){const a=z(h);return a?q.find(a):[]}},de=(h,a="hide")=>{const f=`click.dismiss${h.EVENT_KEY}`,y=h.NAME;K.on(document,f,`[data-bs-dismiss="${y}"]`,function(P){if(["A","AREA"].includes(this.tagName)&&P.preventDefault(),c(this))return;const V=q.getElementFromSelector(this)||this.closest(`.${y}`);h.getOrCreateInstance(V)[a]()})},Te=".bs.alert",Qe=`close${Te}`,tt=`closed${Te}`;class g extends ue{static get NAME(){return"alert"}close(){if(K.trigger(this._element,Qe).defaultPrevented)return;this._element.classList.remove("show");const a=this._element.classList.contains("fade");this._queueCallback(()=>this._destroyElement(),this._element,a)}_destroyElement(){this._element.remove(),K.trigger(this._element,tt),this.dispose()}static jQueryInterface(a){return this.each(function(){const f=g.getOrCreateInstance(this);if(typeof a=="string"){if(f[a]===void 0||a.startsWith("_")||a==="constructor")throw new TypeError(`No method named "${a}"`);f[a](this)}})}}de(g,"close"),x(g);const T='[data-bs-toggle="button"]';class D extends ue{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(a){return this.each(function(){const f=D.getOrCreateInstance(this);a==="toggle"&&f[a]()})}}K.on(document,"click.bs.button.data-api",T,h=>{h.preventDefault();const a=h.target.closest(T);D.getOrCreateInstance(a).toggle()}),x(D);const R=".bs.swipe",W=`touchstart${R}`,J=`touchmove${R}`,he=`touchend${R}`,ie=`pointerdown${R}`,ce=`pointerup${R}`,se={endCallback:null,leftCallback:null,rightCallback:null},Ie={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class ve extends Ne{constructor(a,f){super(),this._element=a,a&&ve.isSupported()&&(this._config=this._getConfig(f),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return se}static get DefaultType(){return Ie}static get NAME(){return"swipe"}dispose(){K.off(this._element,R)}_start(a){this._supportPointerEvents?this._eventIsPointerPenTouch(a)&&(this._deltaX=a.clientX):this._deltaX=a.touches[0].clientX}_end(a){this._eventIsPointerPenTouch(a)&&(this._deltaX=a.clientX-this._deltaX),this._handleSwipe(),O(this._config.endCallback)}_move(a){this._deltaX=a.touches&&a.touches.length>1?0:a.touches[0].clientX-this._deltaX}_handleSwipe(){const a=Math.abs(this._deltaX);if(a<=40)return;const f=a/this._deltaX;this._deltaX=0,f&&O(f>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(K.on(this._element,ie,a=>this._start(a)),K.on(this._element,ce,a=>this._end(a)),this._element.classList.add("pointer-event")):(K.on(this._element,W,a=>this._start(a)),K.on(this._element,J,a=>this._move(a)),K.on(this._element,he,a=>this._end(a)))}_eventIsPointerPenTouch(a){return this._supportPointerEvents&&(a.pointerType==="pen"||a.pointerType==="touch")}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const we=".bs.carousel",De=".data-api",We="next",nt="prev",st="left",Nt="right",Bt=`slide${we}`,jt=`slid${we}`,zt=`keydown${we}`,nr=`mouseenter${we}`,zo=`mouseleave${we}`,Ut=`dragstart${we}`,yn=`load${we}${De}`,Uo=`click${we}${De}`,Xd="carousel",qo="active",Jd=".active",Qd=".carousel-item",t0=Jd+Qd,n0={ArrowLeft:Nt,ArrowRight:st},s0={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},r0={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Vr extends ue{constructor(a,f){super(a,f),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=q.findOne(".carousel-indicators",this._element),this._addEventListeners(),this._config.ride===Xd&&this.cycle()}static get Default(){return s0}static get DefaultType(){return r0}static get NAME(){return"carousel"}next(){this._slide(We)}nextWhenVisible(){!document.hidden&&d(this._element)&&this.next()}prev(){this._slide(nt)}pause(){this._isSliding&&o(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){this._config.ride&&(this._isSliding?K.one(this._element,jt,()=>this.cycle()):this.cycle())}to(a){const f=this._getItems();if(a>f.length-1||a<0)return;if(this._isSliding)return void K.one(this._element,jt,()=>this.to(a));const y=this._getItemIndex(this._getActive());if(y===a)return;const P=a>y?We:nt;this._slide(P,f[a])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(a){return a.defaultInterval=a.interval,a}_addEventListeners(){this._config.keyboard&&K.on(this._element,zt,a=>this._keydown(a)),this._config.pause==="hover"&&(K.on(this._element,nr,()=>this.pause()),K.on(this._element,zo,()=>this._maybeEnableCycle())),this._config.touch&&ve.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const f of q.find(".carousel-item img",this._element))K.on(f,Ut,y=>y.preventDefault());const a={leftCallback:()=>this._slide(this._directionToOrder(st)),rightCallback:()=>this._slide(this._directionToOrder(Nt)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),500+this._config.interval))}};this._swipeHelper=new ve(this._element,a)}_keydown(a){if(/input|textarea/i.test(a.target.tagName))return;const f=n0[a.key];f&&(a.preventDefault(),this._slide(this._directionToOrder(f)))}_getItemIndex(a){return this._getItems().indexOf(a)}_setActiveIndicatorElement(a){if(!this._indicatorsElement)return;const f=q.findOne(Jd,this._indicatorsElement);f.classList.remove(qo),f.removeAttribute("aria-current");const y=q.findOne(`[data-bs-slide-to="${a}"]`,this._indicatorsElement);y&&(y.classList.add(qo),y.setAttribute("aria-current","true"))}_updateInterval(){const a=this._activeElement||this._getActive();if(!a)return;const f=Number.parseInt(a.getAttribute("data-bs-interval"),10);this._config.interval=f||this._config.defaultInterval}_slide(a,f=null){if(this._isSliding)return;const y=this._getActive(),P=a===We,V=f||N(this._getItems(),y,P,this._config.wrap);if(V===y)return;const G=this._getItemIndex(V),ee=ye=>K.trigger(this._element,ye,{relatedTarget:V,direction:this._orderToDirection(a),from:this._getItemIndex(y),to:G});if(ee(Bt).defaultPrevented||!y||!V)return;const pe=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(G),this._activeElement=V;const Ce=P?"carousel-item-start":"carousel-item-end",Se=P?"carousel-item-next":"carousel-item-prev";V.classList.add(Se),v(V),y.classList.add(Ce),V.classList.add(Ce),this._queueCallback(()=>{V.classList.remove(Ce,Se),V.classList.add(qo),y.classList.remove(qo,Se,Ce),this._isSliding=!1,ee(jt)},y,this._isAnimated()),pe&&this.cycle()}_isAnimated(){return this._element.classList.contains("slide")}_getActive(){return q.findOne(t0,this._element)}_getItems(){return q.find(Qd,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(a){return k()?a===st?nt:We:a===st?We:nt}_orderToDirection(a){return k()?a===nt?st:Nt:a===nt?Nt:st}static jQueryInterface(a){return this.each(function(){const f=Vr.getOrCreateInstance(this,a);if(typeof a!="number"){if(typeof a=="string"){if(f[a]===void 0||a.startsWith("_")||a==="constructor")throw new TypeError(`No method named "${a}"`);f[a]()}}else f.to(a)})}}K.on(document,Uo,"[data-bs-slide], [data-bs-slide-to]",function(h){const a=q.getElementFromSelector(this);if(!a||!a.classList.contains(Xd))return;h.preventDefault();const f=Vr.getOrCreateInstance(a),y=this.getAttribute("data-bs-slide-to");return y?(f.to(y),void f._maybeEnableCycle()):Ae.getDataAttribute(this,"slide")==="next"?(f.next(),void f._maybeEnableCycle()):(f.prev(),void f._maybeEnableCycle())}),K.on(window,yn,()=>{const h=q.find('[data-bs-ride="carousel"]');for(const a of h)Vr.getOrCreateInstance(a)}),x(Vr);const Vi=".bs.collapse",i0=`show${Vi}`,o0=`shown${Vi}`,a0=`hide${Vi}`,l0=`hidden${Vi}`,u0=`click${Vi}.data-api`,zl="show",Mr="collapse",Wo="collapsing",c0=`:scope .${Mr} .${Mr}`,Ul='[data-bs-toggle="collapse"]',d0={parent:null,toggle:!0},f0={parent:"(null|element)",toggle:"boolean"};class Fr extends ue{constructor(a,f){super(a,f),this._isTransitioning=!1,this._triggerArray=[];const y=q.find(Ul);for(const P of y){const V=q.getSelectorFromElement(P),G=q.find(V).filter(ee=>ee===this._element);V!==null&&G.length&&this._triggerArray.push(P)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return d0}static get DefaultType(){return f0}static get NAME(){return"collapse"}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let a=[];if(this._config.parent&&(a=this._getFirstLevelChildren(".collapse.show, .collapse.collapsing").filter(P=>P!==this._element).map(P=>Fr.getOrCreateInstance(P,{toggle:!1}))),a.length&&a[0]._isTransitioning||K.trigger(this._element,i0).defaultPrevented)return;for(const P of a)P.hide();const f=this._getDimension();this._element.classList.remove(Mr),this._element.classList.add(Wo),this._element.style[f]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const y=`scroll${f[0].toUpperCase()+f.slice(1)}`;this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Wo),this._element.classList.add(Mr,zl),this._element.style[f]="",K.trigger(this._element,o0)},this._element,!0),this._element.style[f]=`${this._element[y]}px`}hide(){if(this._isTransitioning||!this._isShown()||K.trigger(this._element,a0).defaultPrevented)return;const a=this._getDimension();this._element.style[a]=`${this._element.getBoundingClientRect()[a]}px`,v(this._element),this._element.classList.add(Wo),this._element.classList.remove(Mr,zl);for(const f of this._triggerArray){const y=q.getElementFromSelector(f);y&&!this._isShown(y)&&this._addAriaAndCollapsedClass([f],!1)}this._isTransitioning=!0,this._element.style[a]="",this._queueCallback(()=>{this._isTransitioning=!1,this._element.classList.remove(Wo),this._element.classList.add(Mr),K.trigger(this._element,l0)},this._element,!0)}_isShown(a=this._element){return a.classList.contains(zl)}_configAfterMerge(a){return a.toggle=!!a.toggle,a.parent=u(a.parent),a}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const a=this._getFirstLevelChildren(Ul);for(const f of a){const y=q.getElementFromSelector(f);y&&this._addAriaAndCollapsedClass([f],this._isShown(y))}}_getFirstLevelChildren(a){const f=q.find(c0,this._config.parent);return q.find(a,this._config.parent).filter(y=>!f.includes(y))}_addAriaAndCollapsedClass(a,f){if(a.length)for(const y of a)y.classList.toggle("collapsed",!f),y.setAttribute("aria-expanded",f)}static jQueryInterface(a){const f={};return typeof a=="string"&&/show|hide/.test(a)&&(f.toggle=!1),this.each(function(){const y=Fr.getOrCreateInstance(this,f);if(typeof a=="string"){if(y[a]===void 0)throw new TypeError(`No method named "${a}"`);y[a]()}})}}K.on(document,u0,Ul,function(h){(h.target.tagName==="A"||h.delegateTarget&&h.delegateTarget.tagName==="A")&&h.preventDefault();for(const a of q.getMultipleElementsFromSelector(this))Fr.getOrCreateInstance(a,{toggle:!1}).toggle()}),x(Fr);var qt="top",an="bottom",ln="right",Wt="left",Ko="auto",Hr=[qt,an,ln,Wt],sr="start",jr="end",Zd="clippingParents",ql="viewport",zr="popper",ef="reference",Wl=Hr.reduce(function(h,a){return h.concat([a+"-"+sr,a+"-"+jr])},[]),Kl=[].concat(Hr,[Ko]).reduce(function(h,a){return h.concat([a,a+"-"+sr,a+"-"+jr])},[]),tf="beforeRead",nf="read",sf="afterRead",rf="beforeMain",of="main",af="afterMain",lf="beforeWrite",uf="write",cf="afterWrite",df=[tf,nf,sf,rf,of,af,lf,uf,cf];function Yn(h){return h?(h.nodeName||"").toLowerCase():null}function un(h){if(h==null)return window;if(h.toString()!=="[object Window]"){var a=h.ownerDocument;return a&&a.defaultView||window}return h}function rr(h){return h instanceof un(h).Element||h instanceof Element}function wn(h){return h instanceof un(h).HTMLElement||h instanceof HTMLElement}function Gl(h){return typeof ShadowRoot<"u"&&(h instanceof un(h).ShadowRoot||h instanceof ShadowRoot)}const Yl={name:"applyStyles",enabled:!0,phase:"write",fn:function(h){var a=h.state;Object.keys(a.elements).forEach(function(f){var y=a.styles[f]||{},P=a.attributes[f]||{},V=a.elements[f];wn(V)&&Yn(V)&&(Object.assign(V.style,y),Object.keys(P).forEach(function(G){var ee=P[G];ee===!1?V.removeAttribute(G):V.setAttribute(G,ee===!0?"":ee)}))})},effect:function(h){var a=h.state,f={popper:{position:a.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(a.elements.popper.style,f.popper),a.styles=f,a.elements.arrow&&Object.assign(a.elements.arrow.style,f.arrow),function(){Object.keys(a.elements).forEach(function(y){var P=a.elements[y],V=a.attributes[y]||{},G=Object.keys(a.styles.hasOwnProperty(y)?a.styles[y]:f[y]).reduce(function(ee,pe){return ee[pe]="",ee},{});wn(P)&&Yn(P)&&(Object.assign(P.style,G),Object.keys(V).forEach(function(ee){P.removeAttribute(ee)}))})}},requires:["computeStyles"]};function Xn(h){return h.split("-")[0]}var ir=Math.max,Go=Math.min,Ur=Math.round;function Xl(){var h=navigator.userAgentData;return h!=null&&h.brands&&Array.isArray(h.brands)?h.brands.map(function(a){return a.brand+"/"+a.version}).join(" "):navigator.userAgent}function ff(){return!/^((?!chrome|android).)*safari/i.test(Xl())}function qr(h,a,f){a===void 0&&(a=!1),f===void 0&&(f=!1);var y=h.getBoundingClientRect(),P=1,V=1;a&&wn(h)&&(P=h.offsetWidth>0&&Ur(y.width)/h.offsetWidth||1,V=h.offsetHeight>0&&Ur(y.height)/h.offsetHeight||1);var G=(rr(h)?un(h):window).visualViewport,ee=!ff()&&f,pe=(y.left+(ee&&G?G.offsetLeft:0))/P,Ce=(y.top+(ee&&G?G.offsetTop:0))/V,Se=y.width/P,ye=y.height/V;return{width:Se,height:ye,top:Ce,right:pe+Se,bottom:Ce+ye,left:pe,x:pe,y:Ce}}function Jl(h){var a=qr(h),f=h.offsetWidth,y=h.offsetHeight;return Math.abs(a.width-f)<=1&&(f=a.width),Math.abs(a.height-y)<=1&&(y=a.height),{x:h.offsetLeft,y:h.offsetTop,width:f,height:y}}function pf(h,a){var f=a.getRootNode&&a.getRootNode();if(h.contains(a))return!0;if(f&&Gl(f)){var y=a;do{if(y&&h.isSameNode(y))return!0;y=y.parentNode||y.host}while(y)}return!1}function us(h){return un(h).getComputedStyle(h)}function p0(h){return["table","td","th"].indexOf(Yn(h))>=0}function $s(h){return((rr(h)?h.ownerDocument:h.document)||window.document).documentElement}function Yo(h){return Yn(h)==="html"?h:h.assignedSlot||h.parentNode||(Gl(h)?h.host:null)||$s(h)}function hf(h){return wn(h)&&us(h).position!=="fixed"?h.offsetParent:null}function Mi(h){for(var a=un(h),f=hf(h);f&&p0(f)&&us(f).position==="static";)f=hf(f);return f&&(Yn(f)==="html"||Yn(f)==="body"&&us(f).position==="static")?a:f||function(y){var P=/firefox/i.test(Xl());if(/Trident/i.test(Xl())&&wn(y)&&us(y).position==="fixed")return null;var V=Yo(y);for(Gl(V)&&(V=V.host);wn(V)&&["html","body"].indexOf(Yn(V))<0;){var G=us(V);if(G.transform!=="none"||G.perspective!=="none"||G.contain==="paint"||["transform","perspective"].indexOf(G.willChange)!==-1||P&&G.willChange==="filter"||P&&G.filter&&G.filter!=="none")return V;V=V.parentNode}return null}(h)||a}function Ql(h){return["top","bottom"].indexOf(h)>=0?"x":"y"}function Fi(h,a,f){return ir(h,Go(a,f))}function mf(h){return Object.assign({},{top:0,right:0,bottom:0,left:0},h)}function gf(h,a){return a.reduce(function(f,y){return f[y]=h,f},{})}const vf={name:"arrow",enabled:!0,phase:"main",fn:function(h){var a,f=h.state,y=h.name,P=h.options,V=f.elements.arrow,G=f.modifiersData.popperOffsets,ee=Xn(f.placement),pe=Ql(ee),Ce=[Wt,ln].indexOf(ee)>=0?"height":"width";if(V&&G){var Se=function(pt,ut){return mf(typeof(pt=typeof pt=="function"?pt(Object.assign({},ut.rects,{placement:ut.placement})):pt)!="number"?pt:gf(pt,Hr))}(P.padding,f),ye=Jl(V),Je=pe==="y"?qt:Wt,Me=pe==="y"?an:ln,Ue=f.rects.reference[Ce]+f.rects.reference[pe]-G[pe]-f.rects.popper[Ce],je=G[pe]-f.rects.reference[pe],qe=Mi(V),ft=qe?pe==="y"?qe.clientHeight||0:qe.clientWidth||0:0,_t=Ue/2-je/2,et=Se[Je],ot=ft-ye[Ce]-Se[Me],Ze=ft/2-ye[Ce]/2+_t,rt=Fi(et,Ze,ot),lt=pe;f.modifiersData[y]=((a={})[lt]=rt,a.centerOffset=rt-Ze,a)}},effect:function(h){var a=h.state,f=h.options.element,y=f===void 0?"[data-popper-arrow]":f;y!=null&&(typeof y!="string"||(y=a.elements.popper.querySelector(y)))&&pf(a.elements.popper,y)&&(a.elements.arrow=y)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Wr(h){return h.split("-")[1]}var h0={top:"auto",right:"auto",bottom:"auto",left:"auto"};function bf(h){var a,f=h.popper,y=h.popperRect,P=h.placement,V=h.variation,G=h.offsets,ee=h.position,pe=h.gpuAcceleration,Ce=h.adaptive,Se=h.roundOffsets,ye=h.isFixed,Je=G.x,Me=Je===void 0?0:Je,Ue=G.y,je=Ue===void 0?0:Ue,qe=typeof Se=="function"?Se({x:Me,y:je}):{x:Me,y:je};Me=qe.x,je=qe.y;var ft=G.hasOwnProperty("x"),_t=G.hasOwnProperty("y"),et=Wt,ot=qt,Ze=window;if(Ce){var rt=Mi(f),lt="clientHeight",pt="clientWidth";rt===un(f)&&us(rt=$s(f)).position!=="static"&&ee==="absolute"&&(lt="scrollHeight",pt="scrollWidth"),(P===qt||(P===Wt||P===ln)&&V===jr)&&(ot=an,je-=(ye&&rt===Ze&&Ze.visualViewport?Ze.visualViewport.height:rt[lt])-y.height,je*=pe?1:-1),P!==Wt&&(P!==qt&&P!==an||V!==jr)||(et=ln,Me-=(ye&&rt===Ze&&Ze.visualViewport?Ze.visualViewport.width:rt[pt])-y.width,Me*=pe?1:-1)}var ut,St=Object.assign({position:ee},Ce&&h0),cn=Se===!0?function(Vn,Kt){var Tn=Vn.x,Cn=Vn.y,Et=Kt.devicePixelRatio||1;return{x:Ur(Tn*Et)/Et||0,y:Ur(Cn*Et)/Et||0}}({x:Me,y:je},un(f)):{x:Me,y:je};return Me=cn.x,je=cn.y,pe?Object.assign({},St,((ut={})[ot]=_t?"0":"",ut[et]=ft?"0":"",ut.transform=(Ze.devicePixelRatio||1)<=1?"translate("+Me+"px, "+je+"px)":"translate3d("+Me+"px, "+je+"px, 0)",ut)):Object.assign({},St,((a={})[ot]=_t?je+"px":"",a[et]=ft?Me+"px":"",a.transform="",a))}const Zl={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(h){var a=h.state,f=h.options,y=f.gpuAcceleration,P=y===void 0||y,V=f.adaptive,G=V===void 0||V,ee=f.roundOffsets,pe=ee===void 0||ee,Ce={placement:Xn(a.placement),variation:Wr(a.placement),popper:a.elements.popper,popperRect:a.rects.popper,gpuAcceleration:P,isFixed:a.options.strategy==="fixed"};a.modifiersData.popperOffsets!=null&&(a.styles.popper=Object.assign({},a.styles.popper,bf(Object.assign({},Ce,{offsets:a.modifiersData.popperOffsets,position:a.options.strategy,adaptive:G,roundOffsets:pe})))),a.modifiersData.arrow!=null&&(a.styles.arrow=Object.assign({},a.styles.arrow,bf(Object.assign({},Ce,{offsets:a.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:pe})))),a.attributes.popper=Object.assign({},a.attributes.popper,{"data-popper-placement":a.placement})},data:{}};var Xo={passive:!0};const eu={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(h){var a=h.state,f=h.instance,y=h.options,P=y.scroll,V=P===void 0||P,G=y.resize,ee=G===void 0||G,pe=un(a.elements.popper),Ce=[].concat(a.scrollParents.reference,a.scrollParents.popper);return V&&Ce.forEach(function(Se){Se.addEventListener("scroll",f.update,Xo)}),ee&&pe.addEventListener("resize",f.update,Xo),function(){V&&Ce.forEach(function(Se){Se.removeEventListener("scroll",f.update,Xo)}),ee&&pe.removeEventListener("resize",f.update,Xo)}},data:{}};var m0={left:"right",right:"left",bottom:"top",top:"bottom"};function Jo(h){return h.replace(/left|right|bottom|top/g,function(a){return m0[a]})}var g0={start:"end",end:"start"};function _f(h){return h.replace(/start|end/g,function(a){return g0[a]})}function tu(h){var a=un(h);return{scrollLeft:a.pageXOffset,scrollTop:a.pageYOffset}}function nu(h){return qr($s(h)).left+tu(h).scrollLeft}function su(h){var a=us(h),f=a.overflow,y=a.overflowX,P=a.overflowY;return/auto|scroll|overlay|hidden/.test(f+P+y)}function yf(h){return["html","body","#document"].indexOf(Yn(h))>=0?h.ownerDocument.body:wn(h)&&su(h)?h:yf(Yo(h))}function Hi(h,a){var f;a===void 0&&(a=[]);var y=yf(h),P=y===((f=h.ownerDocument)==null?void 0:f.body),V=un(y),G=P?[V].concat(V.visualViewport||[],su(y)?y:[]):y,ee=a.concat(G);return P?ee:ee.concat(Hi(Yo(G)))}function ru(h){return Object.assign({},h,{left:h.x,top:h.y,right:h.x+h.width,bottom:h.y+h.height})}function wf(h,a,f){return a===ql?ru(function(y,P){var V=un(y),G=$s(y),ee=V.visualViewport,pe=G.clientWidth,Ce=G.clientHeight,Se=0,ye=0;if(ee){pe=ee.width,Ce=ee.height;var Je=ff();(Je||!Je&&P==="fixed")&&(Se=ee.offsetLeft,ye=ee.offsetTop)}return{width:pe,height:Ce,x:Se+nu(y),y:ye}}(h,f)):rr(a)?function(y,P){var V=qr(y,!1,P==="fixed");return V.top=V.top+y.clientTop,V.left=V.left+y.clientLeft,V.bottom=V.top+y.clientHeight,V.right=V.left+y.clientWidth,V.width=y.clientWidth,V.height=y.clientHeight,V.x=V.left,V.y=V.top,V}(a,f):ru(function(y){var P,V=$s(y),G=tu(y),ee=(P=y.ownerDocument)==null?void 0:P.body,pe=ir(V.scrollWidth,V.clientWidth,ee?ee.scrollWidth:0,ee?ee.clientWidth:0),Ce=ir(V.scrollHeight,V.clientHeight,ee?ee.scrollHeight:0,ee?ee.clientHeight:0),Se=-G.scrollLeft+nu(y),ye=-G.scrollTop;return us(ee||V).direction==="rtl"&&(Se+=ir(V.clientWidth,ee?ee.clientWidth:0)-pe),{width:pe,height:Ce,x:Se,y:ye}}($s(h)))}function Ef(h){var a,f=h.reference,y=h.element,P=h.placement,V=P?Xn(P):null,G=P?Wr(P):null,ee=f.x+f.width/2-y.width/2,pe=f.y+f.height/2-y.height/2;switch(V){case qt:a={x:ee,y:f.y-y.height};break;case an:a={x:ee,y:f.y+f.height};break;case ln:a={x:f.x+f.width,y:pe};break;case Wt:a={x:f.x-y.width,y:pe};break;default:a={x:f.x,y:f.y}}var Ce=V?Ql(V):null;if(Ce!=null){var Se=Ce==="y"?"height":"width";switch(G){case sr:a[Ce]=a[Ce]-(f[Se]/2-y[Se]/2);break;case jr:a[Ce]=a[Ce]+(f[Se]/2-y[Se]/2)}}return a}function Kr(h,a){a===void 0&&(a={});var f=a,y=f.placement,P=y===void 0?h.placement:y,V=f.strategy,G=V===void 0?h.strategy:V,ee=f.boundary,pe=ee===void 0?Zd:ee,Ce=f.rootBoundary,Se=Ce===void 0?ql:Ce,ye=f.elementContext,Je=ye===void 0?zr:ye,Me=f.altBoundary,Ue=Me!==void 0&&Me,je=f.padding,qe=je===void 0?0:je,ft=mf(typeof qe!="number"?qe:gf(qe,Hr)),_t=Je===zr?ef:zr,et=h.rects.popper,ot=h.elements[Ue?_t:Je],Ze=function(Kt,Tn,Cn,Et){var Jn=Tn==="clippingParents"?function(vt){var Gt=Hi(Yo(vt)),Sn=["absolute","fixed"].indexOf(us(vt).position)>=0&&wn(vt)?Mi(vt):vt;return rr(Sn)?Gt.filter(function(Bs){return rr(Bs)&&pf(Bs,Sn)&&Yn(Bs)!=="body"}):[]}(Kt):[].concat(Tn),Qn=[].concat(Jn,[Cn]),Xr=Qn[0],It=Qn.reduce(function(vt,Gt){var Sn=wf(Kt,Gt,Et);return vt.top=ir(Sn.top,vt.top),vt.right=Go(Sn.right,vt.right),vt.bottom=Go(Sn.bottom,vt.bottom),vt.left=ir(Sn.left,vt.left),vt},wf(Kt,Xr,Et));return It.width=It.right-It.left,It.height=It.bottom-It.top,It.x=It.left,It.y=It.top,It}(rr(ot)?ot:ot.contextElement||$s(h.elements.popper),pe,Se,G),rt=qr(h.elements.reference),lt=Ef({reference:rt,element:et,strategy:"absolute",placement:P}),pt=ru(Object.assign({},et,lt)),ut=Je===zr?pt:rt,St={top:Ze.top-ut.top+ft.top,bottom:ut.bottom-Ze.bottom+ft.bottom,left:Ze.left-ut.left+ft.left,right:ut.right-Ze.right+ft.right},cn=h.modifiersData.offset;if(Je===zr&&cn){var Vn=cn[P];Object.keys(St).forEach(function(Kt){var Tn=[ln,an].indexOf(Kt)>=0?1:-1,Cn=[qt,an].indexOf(Kt)>=0?"y":"x";St[Kt]+=Vn[Cn]*Tn})}return St}function v0(h,a){a===void 0&&(a={});var f=a,y=f.placement,P=f.boundary,V=f.rootBoundary,G=f.padding,ee=f.flipVariations,pe=f.allowedAutoPlacements,Ce=pe===void 0?Kl:pe,Se=Wr(y),ye=Se?ee?Wl:Wl.filter(function(Ue){return Wr(Ue)===Se}):Hr,Je=ye.filter(function(Ue){return Ce.indexOf(Ue)>=0});Je.length===0&&(Je=ye);var Me=Je.reduce(function(Ue,je){return Ue[je]=Kr(h,{placement:je,boundary:P,rootBoundary:V,padding:G})[Xn(je)],Ue},{});return Object.keys(Me).sort(function(Ue,je){return Me[Ue]-Me[je]})}const Tf={name:"flip",enabled:!0,phase:"main",fn:function(h){var a=h.state,f=h.options,y=h.name;if(!a.modifiersData[y]._skip){for(var P=f.mainAxis,V=P===void 0||P,G=f.altAxis,ee=G===void 0||G,pe=f.fallbackPlacements,Ce=f.padding,Se=f.boundary,ye=f.rootBoundary,Je=f.altBoundary,Me=f.flipVariations,Ue=Me===void 0||Me,je=f.allowedAutoPlacements,qe=a.options.placement,ft=Xn(qe),_t=pe||(ft!==qe&&Ue?function(vt){if(Xn(vt)===Ko)return[];var Gt=Jo(vt);return[_f(vt),Gt,_f(Gt)]}(qe):[Jo(qe)]),et=[qe].concat(_t).reduce(function(vt,Gt){return vt.concat(Xn(Gt)===Ko?v0(a,{placement:Gt,boundary:Se,rootBoundary:ye,padding:Ce,flipVariations:Ue,allowedAutoPlacements:je}):Gt)},[]),ot=a.rects.reference,Ze=a.rects.popper,rt=new Map,lt=!0,pt=et[0],ut=0;ut=0,Tn=Kt?"width":"height",Cn=Kr(a,{placement:St,boundary:Se,rootBoundary:ye,altBoundary:Je,padding:Ce}),Et=Kt?Vn?ln:Wt:Vn?an:qt;ot[Tn]>Ze[Tn]&&(Et=Jo(Et));var Jn=Jo(Et),Qn=[];if(V&&Qn.push(Cn[cn]<=0),ee&&Qn.push(Cn[Et]<=0,Cn[Jn]<=0),Qn.every(function(vt){return vt})){pt=St,lt=!1;break}rt.set(St,Qn)}if(lt)for(var Xr=function(vt){var Gt=et.find(function(Sn){var Bs=rt.get(Sn);if(Bs)return Bs.slice(0,vt).every(function(oa){return oa})});if(Gt)return pt=Gt,"break"},It=Ue?3:1;It>0&&Xr(It)!=="break";It--);a.placement!==pt&&(a.modifiersData[y]._skip=!0,a.placement=pt,a.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Cf(h,a,f){return f===void 0&&(f={x:0,y:0}),{top:h.top-a.height-f.y,right:h.right-a.width+f.x,bottom:h.bottom-a.height+f.y,left:h.left-a.width-f.x}}function Sf(h){return[qt,ln,an,Wt].some(function(a){return h[a]>=0})}const Af={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(h){var a=h.state,f=h.name,y=a.rects.reference,P=a.rects.popper,V=a.modifiersData.preventOverflow,G=Kr(a,{elementContext:"reference"}),ee=Kr(a,{altBoundary:!0}),pe=Cf(G,y),Ce=Cf(ee,P,V),Se=Sf(pe),ye=Sf(Ce);a.modifiersData[f]={referenceClippingOffsets:pe,popperEscapeOffsets:Ce,isReferenceHidden:Se,hasPopperEscaped:ye},a.attributes.popper=Object.assign({},a.attributes.popper,{"data-popper-reference-hidden":Se,"data-popper-escaped":ye})}},xf={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(h){var a=h.state,f=h.options,y=h.name,P=f.offset,V=P===void 0?[0,0]:P,G=Kl.reduce(function(Se,ye){return Se[ye]=function(Je,Me,Ue){var je=Xn(Je),qe=[Wt,qt].indexOf(je)>=0?-1:1,ft=typeof Ue=="function"?Ue(Object.assign({},Me,{placement:Je})):Ue,_t=ft[0],et=ft[1];return _t=_t||0,et=(et||0)*qe,[Wt,ln].indexOf(je)>=0?{x:et,y:_t}:{x:_t,y:et}}(ye,a.rects,V),Se},{}),ee=G[a.placement],pe=ee.x,Ce=ee.y;a.modifiersData.popperOffsets!=null&&(a.modifiersData.popperOffsets.x+=pe,a.modifiersData.popperOffsets.y+=Ce),a.modifiersData[y]=G}},iu={name:"popperOffsets",enabled:!0,phase:"read",fn:function(h){var a=h.state,f=h.name;a.modifiersData[f]=Ef({reference:a.rects.reference,element:a.rects.popper,strategy:"absolute",placement:a.placement})},data:{}},Of={name:"preventOverflow",enabled:!0,phase:"main",fn:function(h){var a=h.state,f=h.options,y=h.name,P=f.mainAxis,V=P===void 0||P,G=f.altAxis,ee=G!==void 0&&G,pe=f.boundary,Ce=f.rootBoundary,Se=f.altBoundary,ye=f.padding,Je=f.tether,Me=Je===void 0||Je,Ue=f.tetherOffset,je=Ue===void 0?0:Ue,qe=Kr(a,{boundary:pe,rootBoundary:Ce,padding:ye,altBoundary:Se}),ft=Xn(a.placement),_t=Wr(a.placement),et=!_t,ot=Ql(ft),Ze=ot==="x"?"y":"x",rt=a.modifiersData.popperOffsets,lt=a.rects.reference,pt=a.rects.popper,ut=typeof je=="function"?je(Object.assign({},a.rects,{placement:a.placement})):je,St=typeof ut=="number"?{mainAxis:ut,altAxis:ut}:Object.assign({mainAxis:0,altAxis:0},ut),cn=a.modifiersData.offset?a.modifiersData.offset[a.placement]:null,Vn={x:0,y:0};if(rt){if(V){var Kt,Tn=ot==="y"?qt:Wt,Cn=ot==="y"?an:ln,Et=ot==="y"?"height":"width",Jn=rt[ot],Qn=Jn+qe[Tn],Xr=Jn-qe[Cn],It=Me?-pt[Et]/2:0,vt=_t===sr?lt[Et]:pt[Et],Gt=_t===sr?-pt[Et]:-lt[Et],Sn=a.elements.arrow,Bs=Me&&Sn?Jl(Sn):{width:0,height:0},oa=a.modifiersData["arrow#persistent"]?a.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},hp=oa[Tn],mp=oa[Cn],aa=Fi(0,lt[Et],Bs[Et]),Ww=et?lt[Et]/2-It-aa-hp-St.mainAxis:vt-aa-hp-St.mainAxis,Kw=et?-lt[Et]/2+It+aa+mp+St.mainAxis:Gt+aa+mp+St.mainAxis,bu=a.elements.arrow&&Mi(a.elements.arrow),Gw=bu?ot==="y"?bu.clientTop||0:bu.clientLeft||0:0,gp=(Kt=cn==null?void 0:cn[ot])!=null?Kt:0,Yw=Jn+Kw-gp,vp=Fi(Me?Go(Qn,Jn+Ww-gp-Gw):Qn,Jn,Me?ir(Xr,Yw):Xr);rt[ot]=vp,Vn[ot]=vp-Jn}if(ee){var bp,Xw=ot==="x"?qt:Wt,Jw=ot==="x"?an:ln,pr=rt[Ze],la=Ze==="y"?"height":"width",_p=pr+qe[Xw],yp=pr-qe[Jw],_u=[qt,Wt].indexOf(ft)!==-1,wp=(bp=cn==null?void 0:cn[Ze])!=null?bp:0,Ep=_u?_p:pr-lt[la]-pt[la]-wp+St.altAxis,Tp=_u?pr+lt[la]+pt[la]-wp-St.altAxis:yp,Cp=Me&&_u?function(Qw,Zw,yu){var Sp=Fi(Qw,Zw,yu);return Sp>yu?yu:Sp}(Ep,pr,Tp):Fi(Me?Ep:_p,pr,Me?Tp:yp);rt[Ze]=Cp,Vn[Ze]=Cp-pr}a.modifiersData[y]=Vn}},requiresIfExists:["offset"]};function b0(h,a,f){f===void 0&&(f=!1);var y,P,V=wn(a),G=wn(a)&&function(ye){var Je=ye.getBoundingClientRect(),Me=Ur(Je.width)/ye.offsetWidth||1,Ue=Ur(Je.height)/ye.offsetHeight||1;return Me!==1||Ue!==1}(a),ee=$s(a),pe=qr(h,G,f),Ce={scrollLeft:0,scrollTop:0},Se={x:0,y:0};return(V||!V&&!f)&&((Yn(a)!=="body"||su(ee))&&(Ce=(y=a)!==un(y)&&wn(y)?{scrollLeft:(P=y).scrollLeft,scrollTop:P.scrollTop}:tu(y)),wn(a)?((Se=qr(a,!0)).x+=a.clientLeft,Se.y+=a.clientTop):ee&&(Se.x=nu(ee))),{x:pe.left+Ce.scrollLeft-Se.x,y:pe.top+Ce.scrollTop-Se.y,width:pe.width,height:pe.height}}function _0(h){var a=new Map,f=new Set,y=[];function P(V){f.add(V.name),[].concat(V.requires||[],V.requiresIfExists||[]).forEach(function(G){if(!f.has(G)){var ee=a.get(G);ee&&P(ee)}}),y.push(V)}return h.forEach(function(V){a.set(V.name,V)}),h.forEach(function(V){f.has(V.name)||P(V)}),y}var kf={placement:"bottom",modifiers:[],strategy:"absolute"};function $f(){for(var h=arguments.length,a=new Array(h),f=0;fNumber.parseInt(f,10)):typeof a=="function"?f=>a(f,this._element):a}_getPopperConfig(){const a={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Ae.setDataAttribute(this._menu,"popper","static"),a.modifiers=[{name:"applyStyles",enabled:!1}]),{...a,...O(this._config.popperConfig,[a])}}_selectMenuItem({key:a,target:f}){const y=q.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(P=>d(P));y.length&&N(y,f,a===If,!y.includes(f)).focus()}static jQueryInterface(a){return this.each(function(){const f=Rn.getOrCreateInstance(this,a);if(typeof a=="string"){if(f[a]===void 0)throw new TypeError(`No method named "${a}"`);f[a]()}})}static clearMenus(a){if(a.button===2||a.type==="keyup"&&a.key!=="Tab")return;const f=q.find(O0);for(const y of f){const P=Rn.getInstance(y);if(!P||P._config.autoClose===!1)continue;const V=a.composedPath(),G=V.includes(P._menu);if(V.includes(P._element)||P._config.autoClose==="inside"&&!G||P._config.autoClose==="outside"&&G||P._menu.contains(a.target)&&(a.type==="keyup"&&a.key==="Tab"||/input|select|option|textarea|form/i.test(a.target.tagName)))continue;const ee={relatedTarget:P._element};a.type==="click"&&(ee.clickEvent=a),P._completeHide(ee)}}static dataApiKeydownHandler(a){const f=/input|textarea/i.test(a.target.tagName),y=a.key==="Escape",P=[E0,If].includes(a.key);if(!P&&!y||f&&!y)return;a.preventDefault();const V=this.matches(ar)?this:q.prev(this,ar)[0]||q.next(this,ar)[0]||q.findOne(ar,a.delegateTarget.parentNode),G=Rn.getOrCreateInstance(V);if(P)return a.stopPropagation(),G.show(),void G._selectMenuItem(a);G._isShown()&&(a.stopPropagation(),G.hide(),V.focus())}}K.on(document,Lf,ar,Rn.dataApiKeydownHandler),K.on(document,Lf,Zo,Rn.dataApiKeydownHandler),K.on(document,Pf,Rn.clearMenus),K.on(document,x0,Rn.clearMenus),K.on(document,Pf,ar,function(h){h.preventDefault(),Rn.getOrCreateInstance(this).toggle()}),x(Rn);const Df="backdrop",Rf="show",Vf=`mousedown.bs.${Df}`,R0={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},V0={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class Mf extends Ne{constructor(a){super(),this._config=this._getConfig(a),this._isAppended=!1,this._element=null}static get Default(){return R0}static get DefaultType(){return V0}static get NAME(){return Df}show(a){if(!this._config.isVisible)return void O(a);this._append();const f=this._getElement();this._config.isAnimated&&v(f),f.classList.add(Rf),this._emulateAnimation(()=>{O(a)})}hide(a){this._config.isVisible?(this._getElement().classList.remove(Rf),this._emulateAnimation(()=>{this.dispose(),O(a)})):O(a)}dispose(){this._isAppended&&(K.off(this._element,Vf),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const a=document.createElement("div");a.className=this._config.className,this._config.isAnimated&&a.classList.add("fade"),this._element=a}return this._element}_configAfterMerge(a){return a.rootElement=u(a.rootElement),a}_append(){if(this._isAppended)return;const a=this._getElement();this._config.rootElement.append(a),K.on(a,Vf,()=>{O(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(a){I(a,this._getElement(),this._config.isAnimated)}}const ea=".bs.focustrap",M0=`focusin${ea}`,F0=`keydown.tab${ea}`,Ff="backward",H0={autofocus:!0,trapElement:null},j0={autofocus:"boolean",trapElement:"element"};class Hf extends Ne{constructor(a){super(),this._config=this._getConfig(a),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return H0}static get DefaultType(){return j0}static get NAME(){return"focustrap"}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),K.off(document,ea),K.on(document,M0,a=>this._handleFocusin(a)),K.on(document,F0,a=>this._handleKeydown(a)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,K.off(document,ea))}_handleFocusin(a){const{trapElement:f}=this._config;if(a.target===document||a.target===f||f.contains(a.target))return;const y=q.focusableChildren(f);y.length===0?f.focus():this._lastTabNavDirection===Ff?y[y.length-1].focus():y[0].focus()}_handleKeydown(a){a.key==="Tab"&&(this._lastTabNavDirection=a.shiftKey?Ff:"forward")}}const jf=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",zf=".sticky-top",ta="padding-right",Uf="margin-right";class lu{constructor(){this._element=document.body}getWidth(){const a=document.documentElement.clientWidth;return Math.abs(window.innerWidth-a)}hide(){const a=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,ta,f=>f+a),this._setElementAttributes(jf,ta,f=>f+a),this._setElementAttributes(zf,Uf,f=>f-a)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,ta),this._resetElementAttributes(jf,ta),this._resetElementAttributes(zf,Uf)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(a,f,y){const P=this.getWidth();this._applyManipulationCallback(a,V=>{if(V!==this._element&&window.innerWidth>V.clientWidth+P)return;this._saveInitialAttribute(V,f);const G=window.getComputedStyle(V).getPropertyValue(f);V.style.setProperty(f,`${y(Number.parseFloat(G))}px`)})}_saveInitialAttribute(a,f){const y=a.style.getPropertyValue(f);y&&Ae.setDataAttribute(a,f,y)}_resetElementAttributes(a,f){this._applyManipulationCallback(a,y=>{const P=Ae.getDataAttribute(y,f);P!==null?(Ae.removeDataAttribute(y,f),y.style.setProperty(f,P)):y.style.removeProperty(f)})}_applyManipulationCallback(a,f){if(l(a))f(a);else for(const y of q.find(a,this._element))f(y)}}const En=".bs.modal",z0=`hide${En}`,U0=`hidePrevented${En}`,qf=`hidden${En}`,Wf=`show${En}`,q0=`shown${En}`,W0=`resize${En}`,K0=`click.dismiss${En}`,G0=`mousedown.dismiss${En}`,Y0=`keydown.dismiss${En}`,X0=`click${En}.data-api`,Kf="modal-open",Gf="show",uu="modal-static",J0={backdrop:!0,focus:!0,keyboard:!0},Q0={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class lr extends ue{constructor(a,f){super(a,f),this._dialog=q.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new lu,this._addEventListeners()}static get Default(){return J0}static get DefaultType(){return Q0}static get NAME(){return"modal"}toggle(a){return this._isShown?this.hide():this.show(a)}show(a){this._isShown||this._isTransitioning||K.trigger(this._element,Wf,{relatedTarget:a}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(Kf),this._adjustDialog(),this._backdrop.show(()=>this._showElement(a)))}hide(){this._isShown&&!this._isTransitioning&&(K.trigger(this._element,z0).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(Gf),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated())))}dispose(){K.off(window,En),K.off(this._dialog,En),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Mf({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Hf({trapElement:this._element})}_showElement(a){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const f=q.findOne(".modal-body",this._dialog);f&&(f.scrollTop=0),v(this._element),this._element.classList.add(Gf),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,K.trigger(this._element,q0,{relatedTarget:a})},this._dialog,this._isAnimated())}_addEventListeners(){K.on(this._element,Y0,a=>{a.key==="Escape"&&(this._config.keyboard?this.hide():this._triggerBackdropTransition())}),K.on(window,W0,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),K.on(this._element,G0,a=>{K.one(this._element,K0,f=>{this._element===a.target&&this._element===f.target&&(this._config.backdrop!=="static"?this._config.backdrop&&this.hide():this._triggerBackdropTransition())})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Kf),this._resetAdjustments(),this._scrollBar.reset(),K.trigger(this._element,qf)})}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(K.trigger(this._element,U0).defaultPrevented)return;const a=this._element.scrollHeight>document.documentElement.clientHeight,f=this._element.style.overflowY;f==="hidden"||this._element.classList.contains(uu)||(a||(this._element.style.overflowY="hidden"),this._element.classList.add(uu),this._queueCallback(()=>{this._element.classList.remove(uu),this._queueCallback(()=>{this._element.style.overflowY=f},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const a=this._element.scrollHeight>document.documentElement.clientHeight,f=this._scrollBar.getWidth(),y=f>0;if(y&&!a){const P=k()?"paddingLeft":"paddingRight";this._element.style[P]=`${f}px`}if(!y&&a){const P=k()?"paddingRight":"paddingLeft";this._element.style[P]=`${f}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(a,f){return this.each(function(){const y=lr.getOrCreateInstance(this,a);if(typeof a=="string"){if(y[a]===void 0)throw new TypeError(`No method named "${a}"`);y[a](f)}})}}K.on(document,X0,'[data-bs-toggle="modal"]',function(h){const a=q.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&h.preventDefault(),K.one(a,Wf,y=>{y.defaultPrevented||K.one(a,qf,()=>{d(this)&&this.focus()})});const f=q.findOne(".modal.show");f&&lr.getInstance(f).hide(),lr.getOrCreateInstance(a).toggle(this)}),de(lr),x(lr);const cs=".bs.offcanvas",Yf=".data-api",Z0=`load${cs}${Yf}`,Xf="show",Jf="showing",Qf="hiding",Zf=".offcanvas.show",ew=`show${cs}`,tw=`shown${cs}`,nw=`hide${cs}`,ep=`hidePrevented${cs}`,tp=`hidden${cs}`,sw=`resize${cs}`,rw=`click${cs}${Yf}`,iw=`keydown.dismiss${cs}`,ow={backdrop:!0,keyboard:!0,scroll:!1},aw={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class ds extends ue{constructor(a,f){super(a,f),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return ow}static get DefaultType(){return aw}static get NAME(){return"offcanvas"}toggle(a){return this._isShown?this.hide():this.show(a)}show(a){this._isShown||K.trigger(this._element,ew,{relatedTarget:a}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new lu().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Jf),this._queueCallback(()=>{this._config.scroll&&!this._config.backdrop||this._focustrap.activate(),this._element.classList.add(Xf),this._element.classList.remove(Jf),K.trigger(this._element,tw,{relatedTarget:a})},this._element,!0))}hide(){this._isShown&&(K.trigger(this._element,nw).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Qf),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(Xf,Qf),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new lu().reset(),K.trigger(this._element,tp)},this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const a=!!this._config.backdrop;return new Mf({className:"offcanvas-backdrop",isVisible:a,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:a?()=>{this._config.backdrop!=="static"?this.hide():K.trigger(this._element,ep)}:null})}_initializeFocusTrap(){return new Hf({trapElement:this._element})}_addEventListeners(){K.on(this._element,iw,a=>{a.key==="Escape"&&(this._config.keyboard?this.hide():K.trigger(this._element,ep))})}static jQueryInterface(a){return this.each(function(){const f=ds.getOrCreateInstance(this,a);if(typeof a=="string"){if(f[a]===void 0||a.startsWith("_")||a==="constructor")throw new TypeError(`No method named "${a}"`);f[a](this)}})}}K.on(document,rw,'[data-bs-toggle="offcanvas"]',function(h){const a=q.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&h.preventDefault(),c(this))return;K.one(a,tp,()=>{d(this)&&this.focus()});const f=q.findOne(Zf);f&&f!==a&&ds.getInstance(f).hide(),ds.getOrCreateInstance(a).toggle(this)}),K.on(window,Z0,()=>{for(const h of q.find(Zf))ds.getOrCreateInstance(h).show()}),K.on(window,sw,()=>{for(const h of q.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(h).position!=="fixed"&&ds.getOrCreateInstance(h).hide()}),de(ds),x(ds);const np={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},lw=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),uw=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,cw=(h,a)=>{const f=h.nodeName.toLowerCase();return a.includes(f)?!lw.has(f)||!!uw.test(h.nodeValue):a.filter(y=>y instanceof RegExp).some(y=>y.test(f))},dw={allowList:np,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},fw={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},pw={entry:"(string|element|function|null)",selector:"(string|element)"};class hw extends Ne{constructor(a){super(),this._config=this._getConfig(a)}static get Default(){return dw}static get DefaultType(){return fw}static get NAME(){return"TemplateFactory"}getContent(){return Object.values(this._config.content).map(a=>this._resolvePossibleFunction(a)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(a){return this._checkContent(a),this._config.content={...this._config.content,...a},this}toHtml(){const a=document.createElement("div");a.innerHTML=this._maybeSanitize(this._config.template);for(const[P,V]of Object.entries(this._config.content))this._setContent(a,V,P);const f=a.children[0],y=this._resolvePossibleFunction(this._config.extraClass);return y&&f.classList.add(...y.split(" ")),f}_typeCheckConfig(a){super._typeCheckConfig(a),this._checkContent(a.content)}_checkContent(a){for(const[f,y]of Object.entries(a))super._typeCheckConfig({selector:f,entry:y},pw)}_setContent(a,f,y){const P=q.findOne(y,a);P&&((f=this._resolvePossibleFunction(f))?l(f)?this._putElementInTemplate(u(f),P):this._config.html?P.innerHTML=this._maybeSanitize(f):P.textContent=f:P.remove())}_maybeSanitize(a){return this._config.sanitize?function(f,y,P){if(!f.length)return f;if(P&&typeof P=="function")return P(f);const V=new window.DOMParser().parseFromString(f,"text/html"),G=[].concat(...V.body.querySelectorAll("*"));for(const ee of G){const pe=ee.nodeName.toLowerCase();if(!Object.keys(y).includes(pe)){ee.remove();continue}const Ce=[].concat(...ee.attributes),Se=[].concat(y["*"]||[],y[pe]||[]);for(const ye of Ce)cw(ye,Se)||ee.removeAttribute(ye.nodeName)}return V.body.innerHTML}(a,this._config.allowList,this._config.sanitizeFn):a}_resolvePossibleFunction(a){return O(a,[this])}_putElementInTemplate(a,f){if(this._config.html)return f.innerHTML="",void f.append(a);f.textContent=a.textContent}}const mw=new Set(["sanitize","allowList","sanitizeFn"]),cu="fade",na="show",sp=".modal",rp="hide.bs.modal",ji="hover",du="focus",gw={AUTO:"auto",TOP:"top",RIGHT:k()?"left":"right",BOTTOM:"bottom",LEFT:k()?"right":"left"},vw={allowList:np,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},bw={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class ur extends ue{constructor(a,f){if(Nf===void 0)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(a,f),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return vw}static get DefaultType(){return bw}static get NAME(){return"tooltip"}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){this._isEnabled&&(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()?this._leave():this._enter())}dispose(){clearTimeout(this._timeout),K.off(this._element.closest(sp),rp,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!this._isWithContent()||!this._isEnabled)return;const a=K.trigger(this._element,this.constructor.eventName("show")),f=(p(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(a.defaultPrevented||!f)return;this._disposePopper();const y=this._getTipElement();this._element.setAttribute("aria-describedby",y.getAttribute("id"));const{container:P}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(P.append(y),K.trigger(this._element,this.constructor.eventName("inserted"))),this._popper=this._createPopper(y),y.classList.add(na),"ontouchstart"in document.documentElement)for(const V of[].concat(...document.body.children))K.on(V,"mouseover",m);this._queueCallback(()=>{K.trigger(this._element,this.constructor.eventName("shown")),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(this._isShown()&&!K.trigger(this._element,this.constructor.eventName("hide")).defaultPrevented){if(this._getTipElement().classList.remove(na),"ontouchstart"in document.documentElement)for(const a of[].concat(...document.body.children))K.off(a,"mouseover",m);this._activeTrigger.click=!1,this._activeTrigger[du]=!1,this._activeTrigger[ji]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),K.trigger(this._element,this.constructor.eventName("hidden")))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(a){const f=this._getTemplateFactory(a).toHtml();if(!f)return null;f.classList.remove(cu,na),f.classList.add(`bs-${this.constructor.NAME}-auto`);const y=(P=>{do P+=Math.floor(1e6*Math.random());while(document.getElementById(P));return P})(this.constructor.NAME).toString();return f.setAttribute("id",y),this._isAnimated()&&f.classList.add(cu),f}setContent(a){this._newContent=a,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(a){return this._templateFactory?this._templateFactory.changeContent(a):this._templateFactory=new hw({...this._config,content:a,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{".tooltip-inner":this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(a){return this.constructor.getOrCreateInstance(a.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(cu)}_isShown(){return this.tip&&this.tip.classList.contains(na)}_createPopper(a){const f=O(this._config.placement,[this,a,this._element]),y=gw[f.toUpperCase()];return ou(this._element,a,this._getPopperConfig(y))}_getOffset(){const{offset:a}=this._config;return typeof a=="string"?a.split(",").map(f=>Number.parseInt(f,10)):typeof a=="function"?f=>a(f,this._element):a}_resolvePossibleFunction(a){return O(a,[this._element])}_getPopperConfig(a){const f={placement:a,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:y=>{this._getTipElement().setAttribute("data-popper-placement",y.state.placement)}}]};return{...f,...O(this._config.popperConfig,[f])}}_setListeners(){const a=this._config.trigger.split(" ");for(const f of a)if(f==="click")K.on(this._element,this.constructor.eventName("click"),this._config.selector,y=>{this._initializeOnDelegatedTarget(y).toggle()});else if(f!=="manual"){const y=f===ji?this.constructor.eventName("mouseenter"):this.constructor.eventName("focusin"),P=f===ji?this.constructor.eventName("mouseleave"):this.constructor.eventName("focusout");K.on(this._element,y,this._config.selector,V=>{const G=this._initializeOnDelegatedTarget(V);G._activeTrigger[V.type==="focusin"?du:ji]=!0,G._enter()}),K.on(this._element,P,this._config.selector,V=>{const G=this._initializeOnDelegatedTarget(V);G._activeTrigger[V.type==="focusout"?du:ji]=G._element.contains(V.relatedTarget),G._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},K.on(this._element.closest(sp),rp,this._hideModalHandler)}_fixTitle(){const a=this._element.getAttribute("title");a&&(this._element.getAttribute("aria-label")||this._element.textContent.trim()||this._element.setAttribute("aria-label",a),this._element.setAttribute("data-bs-original-title",a),this._element.removeAttribute("title"))}_enter(){this._isShown()||this._isHovered?this._isHovered=!0:(this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show))}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(a,f){clearTimeout(this._timeout),this._timeout=setTimeout(a,f)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(a){const f=Ae.getDataAttributes(this._element);for(const y of Object.keys(f))mw.has(y)&&delete f[y];return a={...f,...typeof a=="object"&&a?a:{}},a=this._mergeConfigObj(a),a=this._configAfterMerge(a),this._typeCheckConfig(a),a}_configAfterMerge(a){return a.container=a.container===!1?document.body:u(a.container),typeof a.delay=="number"&&(a.delay={show:a.delay,hide:a.delay}),typeof a.title=="number"&&(a.title=a.title.toString()),typeof a.content=="number"&&(a.content=a.content.toString()),a}_getDelegateConfig(){const a={};for(const[f,y]of Object.entries(this._config))this.constructor.Default[f]!==y&&(a[f]=y);return a.selector=!1,a.trigger="manual",a}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(a){return this.each(function(){const f=ur.getOrCreateInstance(this,a);if(typeof a=="string"){if(f[a]===void 0)throw new TypeError(`No method named "${a}"`);f[a]()}})}}x(ur);const _w={...ur.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},yw={...ur.DefaultType,content:"(null|string|element|function)"};class sa extends ur{static get Default(){return _w}static get DefaultType(){return yw}static get NAME(){return"popover"}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{".popover-header":this._getTitle(),".popover-body":this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(a){return this.each(function(){const f=sa.getOrCreateInstance(this,a);if(typeof a=="string"){if(f[a]===void 0)throw new TypeError(`No method named "${a}"`);f[a]()}})}}x(sa);const fu=".bs.scrollspy",ww=`activate${fu}`,ip=`click${fu}`,Ew=`load${fu}.data-api`,Yr="active",pu="[href]",op=".nav-link",Tw=`${op}, .nav-item > ${op}, .list-group-item`,Cw={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},Sw={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class zi extends ue{constructor(a,f){super(a,f),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Cw}static get DefaultType(){return Sw}static get NAME(){return"scrollspy"}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const a of this._observableSections.values())this._observer.observe(a)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(a){return a.target=u(a.target)||document.body,a.rootMargin=a.offset?`${a.offset}px 0px -30%`:a.rootMargin,typeof a.threshold=="string"&&(a.threshold=a.threshold.split(",").map(f=>Number.parseFloat(f))),a}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(K.off(this._config.target,ip),K.on(this._config.target,ip,pu,a=>{const f=this._observableSections.get(a.target.hash);if(f){a.preventDefault();const y=this._rootElement||window,P=f.offsetTop-this._element.offsetTop;if(y.scrollTo)return void y.scrollTo({top:P,behavior:"smooth"});y.scrollTop=P}}))}_getNewObserver(){const a={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(f=>this._observerCallback(f),a)}_observerCallback(a){const f=G=>this._targetLinks.get(`#${G.target.id}`),y=G=>{this._previousScrollData.visibleEntryTop=G.target.offsetTop,this._process(f(G))},P=(this._rootElement||document.documentElement).scrollTop,V=P>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=P;for(const G of a){if(!G.isIntersecting){this._activeTarget=null,this._clearActiveClass(f(G));continue}const ee=G.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(V&&ee){if(y(G),!P)return}else V||ee||y(G)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const a=q.find(pu,this._config.target);for(const f of a){if(!f.hash||c(f))continue;const y=q.findOne(decodeURI(f.hash),this._element);d(y)&&(this._targetLinks.set(decodeURI(f.hash),f),this._observableSections.set(f.hash,y))}}_process(a){this._activeTarget!==a&&(this._clearActiveClass(this._config.target),this._activeTarget=a,a.classList.add(Yr),this._activateParents(a),K.trigger(this._element,ww,{relatedTarget:a}))}_activateParents(a){if(a.classList.contains("dropdown-item"))q.findOne(".dropdown-toggle",a.closest(".dropdown")).classList.add(Yr);else for(const f of q.parents(a,".nav, .list-group"))for(const y of q.prev(f,Tw))y.classList.add(Yr)}_clearActiveClass(a){a.classList.remove(Yr);const f=q.find(`${pu}.${Yr}`,a);for(const y of f)y.classList.remove(Yr)}static jQueryInterface(a){return this.each(function(){const f=zi.getOrCreateInstance(this,a);if(typeof a=="string"){if(f[a]===void 0||a.startsWith("_")||a==="constructor")throw new TypeError(`No method named "${a}"`);f[a]()}})}}K.on(window,Ew,()=>{for(const h of q.find('[data-bs-spy="scroll"]'))zi.getOrCreateInstance(h)}),x(zi);const cr=".bs.tab",Aw=`hide${cr}`,xw=`hidden${cr}`,Ow=`show${cr}`,kw=`shown${cr}`,$w=`click${cr}`,Nw=`keydown${cr}`,Bw=`load${cr}`,Iw="ArrowLeft",ap="ArrowRight",Pw="ArrowUp",lp="ArrowDown",hu="Home",up="End",dr="active",cp="fade",mu="show",dp=".dropdown-toggle",gu=`:not(${dp})`,fp='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',vu=`.nav-link${gu}, .list-group-item${gu}, [role="tab"]${gu}, ${fp}`,Lw=`.${dr}[data-bs-toggle="tab"], .${dr}[data-bs-toggle="pill"], .${dr}[data-bs-toggle="list"]`;class fr extends ue{constructor(a){super(a),this._parent=this._element.closest('.list-group, .nav, [role="tablist"]'),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),K.on(this._element,Nw,f=>this._keydown(f)))}static get NAME(){return"tab"}show(){const a=this._element;if(this._elemIsActive(a))return;const f=this._getActiveElem(),y=f?K.trigger(f,Aw,{relatedTarget:a}):null;K.trigger(a,Ow,{relatedTarget:f}).defaultPrevented||y&&y.defaultPrevented||(this._deactivate(f,a),this._activate(a,f))}_activate(a,f){a&&(a.classList.add(dr),this._activate(q.getElementFromSelector(a)),this._queueCallback(()=>{a.getAttribute("role")==="tab"?(a.removeAttribute("tabindex"),a.setAttribute("aria-selected",!0),this._toggleDropDown(a,!0),K.trigger(a,kw,{relatedTarget:f})):a.classList.add(mu)},a,a.classList.contains(cp)))}_deactivate(a,f){a&&(a.classList.remove(dr),a.blur(),this._deactivate(q.getElementFromSelector(a)),this._queueCallback(()=>{a.getAttribute("role")==="tab"?(a.setAttribute("aria-selected",!1),a.setAttribute("tabindex","-1"),this._toggleDropDown(a,!1),K.trigger(a,xw,{relatedTarget:f})):a.classList.remove(mu)},a,a.classList.contains(cp)))}_keydown(a){if(![Iw,ap,Pw,lp,hu,up].includes(a.key))return;a.stopPropagation(),a.preventDefault();const f=this._getChildren().filter(P=>!c(P));let y;if([hu,up].includes(a.key))y=f[a.key===hu?0:f.length-1];else{const P=[ap,lp].includes(a.key);y=N(f,a.target,P,!0)}y&&(y.focus({preventScroll:!0}),fr.getOrCreateInstance(y).show())}_getChildren(){return q.find(vu,this._parent)}_getActiveElem(){return this._getChildren().find(a=>this._elemIsActive(a))||null}_setInitialAttributes(a,f){this._setAttributeIfNotExists(a,"role","tablist");for(const y of f)this._setInitialAttributesOnChild(y)}_setInitialAttributesOnChild(a){a=this._getInnerElement(a);const f=this._elemIsActive(a),y=this._getOuterElement(a);a.setAttribute("aria-selected",f),y!==a&&this._setAttributeIfNotExists(y,"role","presentation"),f||a.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(a,"role","tab"),this._setInitialAttributesOnTargetPanel(a)}_setInitialAttributesOnTargetPanel(a){const f=q.getElementFromSelector(a);f&&(this._setAttributeIfNotExists(f,"role","tabpanel"),a.id&&this._setAttributeIfNotExists(f,"aria-labelledby",`${a.id}`))}_toggleDropDown(a,f){const y=this._getOuterElement(a);if(!y.classList.contains("dropdown"))return;const P=(V,G)=>{const ee=q.findOne(V,y);ee&&ee.classList.toggle(G,f)};P(dp,dr),P(".dropdown-menu",mu),y.setAttribute("aria-expanded",f)}_setAttributeIfNotExists(a,f,y){a.hasAttribute(f)||a.setAttribute(f,y)}_elemIsActive(a){return a.classList.contains(dr)}_getInnerElement(a){return a.matches(vu)?a:q.findOne(vu,a)}_getOuterElement(a){return a.closest(".nav-item, .list-group-item")||a}static jQueryInterface(a){return this.each(function(){const f=fr.getOrCreateInstance(this);if(typeof a=="string"){if(f[a]===void 0||a.startsWith("_")||a==="constructor")throw new TypeError(`No method named "${a}"`);f[a]()}})}}K.on(document,$w,fp,function(h){["A","AREA"].includes(this.tagName)&&h.preventDefault(),c(this)||fr.getOrCreateInstance(this).show()}),K.on(window,Bw,()=>{for(const h of q.find(Lw))fr.getOrCreateInstance(h)}),x(fr);const Ns=".bs.toast",Dw=`mouseover${Ns}`,Rw=`mouseout${Ns}`,Vw=`focusin${Ns}`,Mw=`focusout${Ns}`,Fw=`hide${Ns}`,Hw=`hidden${Ns}`,jw=`show${Ns}`,zw=`shown${Ns}`,pp="hide",ra="show",ia="showing",Uw={animation:"boolean",autohide:"boolean",delay:"number"},qw={animation:!0,autohide:!0,delay:5e3};class Ui extends ue{constructor(a,f){super(a,f),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return qw}static get DefaultType(){return Uw}static get NAME(){return"toast"}show(){K.trigger(this._element,jw).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(pp),v(this._element),this._element.classList.add(ra,ia),this._queueCallback(()=>{this._element.classList.remove(ia),K.trigger(this._element,zw),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this.isShown()&&(K.trigger(this._element,Fw).defaultPrevented||(this._element.classList.add(ia),this._queueCallback(()=>{this._element.classList.add(pp),this._element.classList.remove(ia,ra),K.trigger(this._element,Hw)},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(ra),super.dispose()}isShown(){return this._element.classList.contains(ra)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(a,f){switch(a.type){case"mouseover":case"mouseout":this._hasMouseInteraction=f;break;case"focusin":case"focusout":this._hasKeyboardInteraction=f}if(f)return void this._clearTimeout();const y=a.relatedTarget;this._element===y||this._element.contains(y)||this._maybeScheduleHide()}_setListeners(){K.on(this._element,Dw,a=>this._onInteraction(a,!0)),K.on(this._element,Rw,a=>this._onInteraction(a,!1)),K.on(this._element,Vw,a=>this._onInteraction(a,!0)),K.on(this._element,Mw,a=>this._onInteraction(a,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(a){return this.each(function(){const f=Ui.getOrCreateInstance(this,a);if(typeof a=="string"){if(f[a]===void 0)throw new TypeError(`No method named "${a}"`);f[a](this)}})}}return de(Ui),x(Ui),{Alert:g,Button:D,Carousel:Vr,Collapse:Fr,Dropdown:Rn,Modal:lr,Offcanvas:ds,Popover:sa,ScrollSpy:zi,Tab:fr,Toast:Ui,Tooltip:ur}})})(gx);var Qt="top",mn="bottom",gn="right",Zt="left",Ol="auto",Bi=[Qt,mn,gn,Zt],Ir="start",vi="end",Jb="clippingParents",Sd="viewport",ri="popper",Qb="reference",$c=Bi.reduce(function(e,t){return e.concat([t+"-"+Ir,t+"-"+vi])},[]),Ad=[].concat(Bi,[Ol]).reduce(function(e,t){return e.concat([t,t+"-"+Ir,t+"-"+vi])},[]),Zb="beforeRead",e_="read",t_="afterRead",n_="beforeMain",s_="main",r_="afterMain",i_="beforeWrite",o_="write",a_="afterWrite",l_=[Zb,e_,t_,n_,s_,r_,i_,o_,a_];function as(e){return e?(e.nodeName||"").toLowerCase():null}function vn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Pr(e){var t=vn(e).Element;return e instanceof t||e instanceof Element}function Bn(e){var t=vn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xd(e){if(typeof ShadowRoot>"u")return!1;var t=vn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function vx(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var s=t.styles[n]||{},r=t.attributes[n]||{},i=t.elements[n];!Bn(i)||!as(i)||(Object.assign(i.style,s),Object.keys(r).forEach(function(o){var l=r[o];l===!1?i.removeAttribute(o):i.setAttribute(o,l===!0?"":l)}))})}function bx(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(s){var r=t.elements[s],i=t.attributes[s]||{},o=Object.keys(t.styles.hasOwnProperty(s)?t.styles[s]:n[s]),l=o.reduce(function(u,d){return u[d]="",u},{});!Bn(r)||!as(r)||(Object.assign(r.style,l),Object.keys(i).forEach(function(u){r.removeAttribute(u)}))})}}const Od={name:"applyStyles",enabled:!0,phase:"write",fn:vx,effect:bx,requires:["computeStyles"]};function os(e){return e.split("-")[0]}var xr=Math.max,Ja=Math.min,bi=Math.round;function Nc(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function u_(){return!/^((?!chrome|android).)*safari/i.test(Nc())}function _i(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var s=e.getBoundingClientRect(),r=1,i=1;t&&Bn(e)&&(r=e.offsetWidth>0&&bi(s.width)/e.offsetWidth||1,i=e.offsetHeight>0&&bi(s.height)/e.offsetHeight||1);var o=Pr(e)?vn(e):window,l=o.visualViewport,u=!u_()&&n,d=(s.left+(u&&l?l.offsetLeft:0))/r,c=(s.top+(u&&l?l.offsetTop:0))/i,p=s.width/r,m=s.height/i;return{width:p,height:m,top:c,right:d+p,bottom:c+m,left:d,x:d,y:c}}function kd(e){var t=_i(e),n=e.offsetWidth,s=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-s)<=1&&(s=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:s}}function c_(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&xd(n)){var s=t;do{if(s&&e.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function As(e){return vn(e).getComputedStyle(e)}function _x(e){return["table","td","th"].indexOf(as(e))>=0}function Zs(e){return((Pr(e)?e.ownerDocument:e.document)||window.document).documentElement}function kl(e){return as(e)==="html"?e:e.assignedSlot||e.parentNode||(xd(e)?e.host:null)||Zs(e)}function Yh(e){return!Bn(e)||As(e).position==="fixed"?null:e.offsetParent}function yx(e){var t=/firefox/i.test(Nc()),n=/Trident/i.test(Nc());if(n&&Bn(e)){var s=As(e);if(s.position==="fixed")return null}var r=kl(e);for(xd(r)&&(r=r.host);Bn(r)&&["html","body"].indexOf(as(r))<0;){var i=As(r);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return r;r=r.parentNode}return null}function Ro(e){for(var t=vn(e),n=Yh(e);n&&_x(n)&&As(n).position==="static";)n=Yh(n);return n&&(as(n)==="html"||as(n)==="body"&&As(n).position==="static")?t:n||yx(e)||t}function $d(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function po(e,t,n){return xr(e,Ja(t,n))}function wx(e,t,n){var s=po(e,t,n);return s>n?n:s}function d_(){return{top:0,right:0,bottom:0,left:0}}function f_(e){return Object.assign({},d_(),e)}function p_(e,t){return t.reduce(function(n,s){return n[s]=e,n},{})}var Ex=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,f_(typeof t!="number"?t:p_(t,Bi))};function Tx(e){var t,n=e.state,s=e.name,r=e.options,i=n.elements.arrow,o=n.modifiersData.popperOffsets,l=os(n.placement),u=$d(l),d=[Zt,gn].indexOf(l)>=0,c=d?"height":"width";if(!(!i||!o)){var p=Ex(r.padding,n),m=kd(i),v=u==="y"?Qt:Zt,w=u==="y"?mn:gn,C=n.rects.reference[c]+n.rects.reference[u]-o[u]-n.rects.popper[c],k=o[u]-n.rects.reference[u],x=Ro(i),O=x?u==="y"?x.clientHeight||0:x.clientWidth||0:0,I=C/2-k/2,N=p[v],B=O-m[c]-p[w],L=O/2-m[c]/2+I,j=po(N,L,B),F=u;n.modifiersData[s]=(t={},t[F]=j,t.centerOffset=j-L,t)}}function Cx(e){var t=e.state,n=e.options,s=n.element,r=s===void 0?"[data-popper-arrow]":s;r!=null&&(typeof r=="string"&&(r=t.elements.popper.querySelector(r),!r)||c_(t.elements.popper,r)&&(t.elements.arrow=r))}const h_={name:"arrow",enabled:!0,phase:"main",fn:Tx,effect:Cx,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function yi(e){return e.split("-")[1]}var Sx={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Ax(e,t){var n=e.x,s=e.y,r=t.devicePixelRatio||1;return{x:bi(n*r)/r||0,y:bi(s*r)/r||0}}function Xh(e){var t,n=e.popper,s=e.popperRect,r=e.placement,i=e.variation,o=e.offsets,l=e.position,u=e.gpuAcceleration,d=e.adaptive,c=e.roundOffsets,p=e.isFixed,m=o.x,v=m===void 0?0:m,w=o.y,C=w===void 0?0:w,k=typeof c=="function"?c({x:v,y:C}):{x:v,y:C};v=k.x,C=k.y;var x=o.hasOwnProperty("x"),O=o.hasOwnProperty("y"),I=Zt,N=Qt,B=window;if(d){var L=Ro(n),j="clientHeight",F="clientWidth";if(L===vn(n)&&(L=Zs(n),As(L).position!=="static"&&l==="absolute"&&(j="scrollHeight",F="scrollWidth")),L=L,r===Qt||(r===Zt||r===gn)&&i===vi){N=mn;var $=p&&L===B&&B.visualViewport?B.visualViewport.height:L[j];C-=$-s.height,C*=u?1:-1}if(r===Zt||(r===Qt||r===mn)&&i===vi){I=gn;var M=p&&L===B&&B.visualViewport?B.visualViewport.width:L[F];v-=M-s.width,v*=u?1:-1}}var Q=Object.assign({position:l},d&&Sx),X=c===!0?Ax({x:v,y:C},vn(n)):{x:v,y:C};if(v=X.x,C=X.y,u){var ae;return Object.assign({},Q,(ae={},ae[N]=O?"0":"",ae[I]=x?"0":"",ae.transform=(B.devicePixelRatio||1)<=1?"translate("+v+"px, "+C+"px)":"translate3d("+v+"px, "+C+"px, 0)",ae))}return Object.assign({},Q,(t={},t[N]=O?C+"px":"",t[I]=x?v+"px":"",t.transform="",t))}function xx(e){var t=e.state,n=e.options,s=n.gpuAcceleration,r=s===void 0?!0:s,i=n.adaptive,o=i===void 0?!0:i,l=n.roundOffsets,u=l===void 0?!0:l,d={placement:os(t.placement),variation:yi(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:r,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Xh(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Xh(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Nd={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:xx,data:{}};var ha={passive:!0};function Ox(e){var t=e.state,n=e.instance,s=e.options,r=s.scroll,i=r===void 0?!0:r,o=s.resize,l=o===void 0?!0:o,u=vn(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&d.forEach(function(c){c.addEventListener("scroll",n.update,ha)}),l&&u.addEventListener("resize",n.update,ha),function(){i&&d.forEach(function(c){c.removeEventListener("scroll",n.update,ha)}),l&&u.removeEventListener("resize",n.update,ha)}}const Bd={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Ox,data:{}};var kx={left:"right",right:"left",bottom:"top",top:"bottom"};function Ba(e){return e.replace(/left|right|bottom|top/g,function(t){return kx[t]})}var $x={start:"end",end:"start"};function Jh(e){return e.replace(/start|end/g,function(t){return $x[t]})}function Id(e){var t=vn(e),n=t.pageXOffset,s=t.pageYOffset;return{scrollLeft:n,scrollTop:s}}function Pd(e){return _i(Zs(e)).left+Id(e).scrollLeft}function Nx(e,t){var n=vn(e),s=Zs(e),r=n.visualViewport,i=s.clientWidth,o=s.clientHeight,l=0,u=0;if(r){i=r.width,o=r.height;var d=u_();(d||!d&&t==="fixed")&&(l=r.offsetLeft,u=r.offsetTop)}return{width:i,height:o,x:l+Pd(e),y:u}}function Bx(e){var t,n=Zs(e),s=Id(e),r=(t=e.ownerDocument)==null?void 0:t.body,i=xr(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),o=xr(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),l=-s.scrollLeft+Pd(e),u=-s.scrollTop;return As(r||n).direction==="rtl"&&(l+=xr(n.clientWidth,r?r.clientWidth:0)-i),{width:i,height:o,x:l,y:u}}function Ld(e){var t=As(e),n=t.overflow,s=t.overflowX,r=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+s)}function m_(e){return["html","body","#document"].indexOf(as(e))>=0?e.ownerDocument.body:Bn(e)&&Ld(e)?e:m_(kl(e))}function ho(e,t){var n;t===void 0&&(t=[]);var s=m_(e),r=s===((n=e.ownerDocument)==null?void 0:n.body),i=vn(s),o=r?[i].concat(i.visualViewport||[],Ld(s)?s:[]):s,l=t.concat(o);return r?l:l.concat(ho(kl(o)))}function Bc(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ix(e,t){var n=_i(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Qh(e,t,n){return t===Sd?Bc(Nx(e,n)):Pr(t)?Ix(t,n):Bc(Bx(Zs(e)))}function Px(e){var t=ho(kl(e)),n=["absolute","fixed"].indexOf(As(e).position)>=0,s=n&&Bn(e)?Ro(e):e;return Pr(s)?t.filter(function(r){return Pr(r)&&c_(r,s)&&as(r)!=="body"}):[]}function Lx(e,t,n,s){var r=t==="clippingParents"?Px(e):[].concat(t),i=[].concat(r,[n]),o=i[0],l=i.reduce(function(u,d){var c=Qh(e,d,s);return u.top=xr(c.top,u.top),u.right=Ja(c.right,u.right),u.bottom=Ja(c.bottom,u.bottom),u.left=xr(c.left,u.left),u},Qh(e,o,s));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function g_(e){var t=e.reference,n=e.element,s=e.placement,r=s?os(s):null,i=s?yi(s):null,o=t.x+t.width/2-n.width/2,l=t.y+t.height/2-n.height/2,u;switch(r){case Qt:u={x:o,y:t.y-n.height};break;case mn:u={x:o,y:t.y+t.height};break;case gn:u={x:t.x+t.width,y:l};break;case Zt:u={x:t.x-n.width,y:l};break;default:u={x:t.x,y:t.y}}var d=r?$d(r):null;if(d!=null){var c=d==="y"?"height":"width";switch(i){case Ir:u[d]=u[d]-(t[c]/2-n[c]/2);break;case vi:u[d]=u[d]+(t[c]/2-n[c]/2);break}}return u}function wi(e,t){t===void 0&&(t={});var n=t,s=n.placement,r=s===void 0?e.placement:s,i=n.strategy,o=i===void 0?e.strategy:i,l=n.boundary,u=l===void 0?Jb:l,d=n.rootBoundary,c=d===void 0?Sd:d,p=n.elementContext,m=p===void 0?ri:p,v=n.altBoundary,w=v===void 0?!1:v,C=n.padding,k=C===void 0?0:C,x=f_(typeof k!="number"?k:p_(k,Bi)),O=m===ri?Qb:ri,I=e.rects.popper,N=e.elements[w?O:m],B=Lx(Pr(N)?N:N.contextElement||Zs(e.elements.popper),u,c,o),L=_i(e.elements.reference),j=g_({reference:L,element:I,strategy:"absolute",placement:r}),F=Bc(Object.assign({},I,j)),$=m===ri?F:L,M={top:B.top-$.top+x.top,bottom:$.bottom-B.bottom+x.bottom,left:B.left-$.left+x.left,right:$.right-B.right+x.right},Q=e.modifiersData.offset;if(m===ri&&Q){var X=Q[r];Object.keys(M).forEach(function(ae){var Oe=[gn,mn].indexOf(ae)>=0?1:-1,ge=[Qt,mn].indexOf(ae)>=0?"y":"x";M[ae]+=X[ge]*Oe})}return M}function Dx(e,t){t===void 0&&(t={});var n=t,s=n.placement,r=n.boundary,i=n.rootBoundary,o=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,d=u===void 0?Ad:u,c=yi(s),p=c?l?$c:$c.filter(function(w){return yi(w)===c}):Bi,m=p.filter(function(w){return d.indexOf(w)>=0});m.length===0&&(m=p);var v=m.reduce(function(w,C){return w[C]=wi(e,{placement:C,boundary:r,rootBoundary:i,padding:o})[os(C)],w},{});return Object.keys(v).sort(function(w,C){return v[w]-v[C]})}function Rx(e){if(os(e)===Ol)return[];var t=Ba(e);return[Jh(e),t,Jh(t)]}function Vx(e){var t=e.state,n=e.options,s=e.name;if(!t.modifiersData[s]._skip){for(var r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,l=o===void 0?!0:o,u=n.fallbackPlacements,d=n.padding,c=n.boundary,p=n.rootBoundary,m=n.altBoundary,v=n.flipVariations,w=v===void 0?!0:v,C=n.allowedAutoPlacements,k=t.options.placement,x=os(k),O=x===k,I=u||(O||!w?[Ba(k)]:Rx(k)),N=[k].concat(I).reduce(function(Ae,Ne){return Ae.concat(os(Ne)===Ol?Dx(t,{placement:Ne,boundary:c,rootBoundary:p,padding:d,flipVariations:w,allowedAutoPlacements:C}):Ne)},[]),B=t.rects.reference,L=t.rects.popper,j=new Map,F=!0,$=N[0],M=0;M=0,ge=Oe?"width":"height",be=wi(t,{placement:Q,boundary:c,rootBoundary:p,altBoundary:m,padding:d}),fe=Oe?ae?gn:Zt:ae?mn:Qt;B[ge]>L[ge]&&(fe=Ba(fe));var $e=Ba(fe),Xe=[];if(i&&Xe.push(be[X]<=0),l&&Xe.push(be[fe]<=0,be[$e]<=0),Xe.every(function(Ae){return Ae})){$=Q,F=!1;break}j.set(Q,Xe)}if(F)for(var K=w?3:1,He=function(Ne){var ue=N.find(function(z){var q=j.get(z);if(q)return q.slice(0,Ne).every(function(de){return de})});if(ue)return $=ue,"break"},oe=K;oe>0;oe--){var le=He(oe);if(le==="break")break}t.placement!==$&&(t.modifiersData[s]._skip=!0,t.placement=$,t.reset=!0)}}const v_={name:"flip",enabled:!0,phase:"main",fn:Vx,requiresIfExists:["offset"],data:{_skip:!1}};function Zh(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function em(e){return[Qt,gn,mn,Zt].some(function(t){return e[t]>=0})}function Mx(e){var t=e.state,n=e.name,s=t.rects.reference,r=t.rects.popper,i=t.modifiersData.preventOverflow,o=wi(t,{elementContext:"reference"}),l=wi(t,{altBoundary:!0}),u=Zh(o,s),d=Zh(l,r,i),c=em(u),p=em(d);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:d,isReferenceHidden:c,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":p})}const b_={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Mx};function Fx(e,t,n){var s=os(e),r=[Zt,Qt].indexOf(s)>=0?-1:1,i=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=i[0],l=i[1];return o=o||0,l=(l||0)*r,[Zt,gn].indexOf(s)>=0?{x:l,y:o}:{x:o,y:l}}function Hx(e){var t=e.state,n=e.options,s=e.name,r=n.offset,i=r===void 0?[0,0]:r,o=Ad.reduce(function(c,p){return c[p]=Fx(p,t.rects,i),c},{}),l=o[t.placement],u=l.x,d=l.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=d),t.modifiersData[s]=o}const __={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:Hx};function jx(e){var t=e.state,n=e.name;t.modifiersData[n]=g_({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Dd={name:"popperOffsets",enabled:!0,phase:"read",fn:jx,data:{}};function zx(e){return e==="x"?"y":"x"}function Ux(e){var t=e.state,n=e.options,s=e.name,r=n.mainAxis,i=r===void 0?!0:r,o=n.altAxis,l=o===void 0?!1:o,u=n.boundary,d=n.rootBoundary,c=n.altBoundary,p=n.padding,m=n.tether,v=m===void 0?!0:m,w=n.tetherOffset,C=w===void 0?0:w,k=wi(t,{boundary:u,rootBoundary:d,padding:p,altBoundary:c}),x=os(t.placement),O=yi(t.placement),I=!O,N=$d(x),B=zx(N),L=t.modifiersData.popperOffsets,j=t.rects.reference,F=t.rects.popper,$=typeof C=="function"?C(Object.assign({},t.rects,{placement:t.placement})):C,M=typeof $=="number"?{mainAxis:$,altAxis:$}:Object.assign({mainAxis:0,altAxis:0},$),Q=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,X={x:0,y:0};if(L){if(i){var ae,Oe=N==="y"?Qt:Zt,ge=N==="y"?mn:gn,be=N==="y"?"height":"width",fe=L[N],$e=fe+k[Oe],Xe=fe-k[ge],K=v?-F[be]/2:0,He=O===Ir?j[be]:F[be],oe=O===Ir?-F[be]:-j[be],le=t.elements.arrow,Ae=v&&le?kd(le):{width:0,height:0},Ne=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:d_(),ue=Ne[Oe],z=Ne[ge],q=po(0,j[be],Ae[be]),de=I?j[be]/2-K-q-ue-M.mainAxis:He-q-ue-M.mainAxis,Te=I?-j[be]/2+K+q+z+M.mainAxis:oe+q+z+M.mainAxis,Qe=t.elements.arrow&&Ro(t.elements.arrow),tt=Qe?N==="y"?Qe.clientTop||0:Qe.clientLeft||0:0,g=(ae=Q==null?void 0:Q[N])!=null?ae:0,T=fe+de-g-tt,D=fe+Te-g,R=po(v?Ja($e,T):$e,fe,v?xr(Xe,D):Xe);L[N]=R,X[N]=R-fe}if(l){var W,J=N==="x"?Qt:Zt,he=N==="x"?mn:gn,ie=L[B],ce=B==="y"?"height":"width",se=ie+k[J],Ie=ie-k[he],ve=[Qt,Zt].indexOf(x)!==-1,we=(W=Q==null?void 0:Q[B])!=null?W:0,De=ve?se:ie-j[ce]-F[ce]-we+M.altAxis,We=ve?ie+j[ce]+F[ce]-we-M.altAxis:Ie,nt=v&&ve?wx(De,ie,We):po(v?De:se,ie,v?We:Ie);L[B]=nt,X[B]=nt-ie}t.modifiersData[s]=X}}const y_={name:"preventOverflow",enabled:!0,phase:"main",fn:Ux,requiresIfExists:["offset"]};function qx(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Wx(e){return e===vn(e)||!Bn(e)?Id(e):qx(e)}function Kx(e){var t=e.getBoundingClientRect(),n=bi(t.width)/e.offsetWidth||1,s=bi(t.height)/e.offsetHeight||1;return n!==1||s!==1}function Gx(e,t,n){n===void 0&&(n=!1);var s=Bn(t),r=Bn(t)&&Kx(t),i=Zs(t),o=_i(e,r,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(s||!s&&!n)&&((as(t)!=="body"||Ld(i))&&(l=Wx(t)),Bn(t)?(u=_i(t,!0),u.x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=Pd(i))),{x:o.left+l.scrollLeft-u.x,y:o.top+l.scrollTop-u.y,width:o.width,height:o.height}}function Yx(e){var t=new Map,n=new Set,s=[];e.forEach(function(i){t.set(i.name,i)});function r(i){n.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(l){if(!n.has(l)){var u=t.get(l);u&&r(u)}}),s.push(i)}return e.forEach(function(i){n.has(i.name)||r(i)}),s}function Xx(e){var t=Yx(e);return l_.reduce(function(n,s){return n.concat(t.filter(function(r){return r.phase===s}))},[])}function Jx(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function Qx(e){var t=e.reduce(function(n,s){var r=n[s.name];return n[s.name]=r?Object.assign({},r,s,{options:Object.assign({},r.options,s.options),data:Object.assign({},r.data,s.data)}):s,n},{});return Object.keys(t).map(function(n){return t[n]})}var tm={placement:"bottom",modifiers:[],strategy:"absolute"};function nm(){for(var e=arguments.length,t=new Array(e),n=0;n(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^\s"#']+)/g,(t,n)=>`#${CSS.escape(n)}`)),e),iO=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/\s([a-z]+)/i)[1].toLowerCase(),oO=e=>{do e+=Math.floor(Math.random()*sO);while(document.getElementById(e));return e},aO=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);const s=Number.parseFloat(t),r=Number.parseFloat(n);return!s&&!r?0:(t=t.split(",")[0],n=n.split(",")[0],(Number.parseFloat(t)+Number.parseFloat(n))*rO)},T_=e=>{e.dispatchEvent(new Event(Ic))},Ts=e=>!e||typeof e!="object"?!1:(typeof e.jquery<"u"&&(e=e[0]),typeof e.nodeType<"u"),Gs=e=>Ts(e)?e.jquery?e[0]:e:typeof e=="string"&&e.length>0?document.querySelector(E_(e)):null,Ii=e=>{if(!Ts(e)||e.getClientRects().length===0)return!1;const t=getComputedStyle(e).getPropertyValue("visibility")==="visible",n=e.closest("details:not([open])");if(!n)return t;if(n!==e){const s=e.closest("summary");if(s&&s.parentNode!==n||s===null)return!1}return t},Ys=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains("disabled")?!0:typeof e.disabled<"u"?e.disabled:e.hasAttribute("disabled")&&e.getAttribute("disabled")!=="false",C_=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode=="function"){const t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?C_(e.parentNode):null},Qa=()=>{},Vo=e=>{e.offsetHeight},S_=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,ju=[],lO=e=>{document.readyState==="loading"?(ju.length||document.addEventListener("DOMContentLoaded",()=>{for(const t of ju)t()}),ju.push(e)):e()},Pn=()=>document.documentElement.dir==="rtl",Dn=e=>{lO(()=>{const t=S_();if(t){const n=e.NAME,s=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=s,e.jQueryInterface)}})},tn=(e,t=[],n=e)=>typeof e=="function"?e(...t):n,A_=(e,t,n=!0)=>{if(!n){tn(e);return}const r=aO(t)+5;let i=!1;const o=({target:l})=>{l===t&&(i=!0,t.removeEventListener(Ic,o),tn(e))};t.addEventListener(Ic,o),setTimeout(()=>{i||T_(t)},r)},Vd=(e,t,n,s)=>{const r=e.length;let i=e.indexOf(t);return i===-1?!n&&s?e[r-1]:e[0]:(i+=n?1:-1,s&&(i=(i+r)%r),e[Math.max(0,Math.min(i,r-1))])},uO=/[^.]*(?=\..*)\.|.*/,cO=/\..*/,dO=/::\d+$/,zu={};let sm=1;const x_={mouseenter:"mouseover",mouseleave:"mouseout"},fO=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O_(e,t){return t&&`${t}::${sm++}`||e.uidEvent||sm++}function k_(e){const t=O_(e);return e.uidEvent=t,zu[t]=zu[t]||{},zu[t]}function pO(e,t){return function n(s){return Md(s,{delegateTarget:e}),n.oneOff&&te.off(e,s.type,t),t.apply(e,[s])}}function hO(e,t,n){return function s(r){const i=e.querySelectorAll(t);for(let{target:o}=r;o&&o!==this;o=o.parentNode)for(const l of i)if(l===o)return Md(r,{delegateTarget:o}),s.oneOff&&te.off(e,r.type,t,n),n.apply(o,[r])}}function $_(e,t,n=null){return Object.values(e).find(s=>s.callable===t&&s.delegationSelector===n)}function N_(e,t,n){const s=typeof t=="string",r=s?n:t||n;let i=B_(e);return fO.has(i)||(i=e),[s,r,i]}function rm(e,t,n,s,r){if(typeof t!="string"||!e)return;let[i,o,l]=N_(t,n,s);t in x_&&(o=(w=>function(C){if(!C.relatedTarget||C.relatedTarget!==C.delegateTarget&&!C.delegateTarget.contains(C.relatedTarget))return w.call(this,C)})(o));const u=k_(e),d=u[l]||(u[l]={}),c=$_(d,o,i?n:null);if(c){c.oneOff=c.oneOff&&r;return}const p=O_(o,t.replace(uO,"")),m=i?hO(e,n,o):pO(e,o);m.delegationSelector=i?n:null,m.callable=o,m.oneOff=r,m.uidEvent=p,d[p]=m,e.addEventListener(l,m,i)}function Pc(e,t,n,s,r){const i=$_(t[n],s,r);i&&(e.removeEventListener(n,i,!!r),delete t[n][i.uidEvent])}function mO(e,t,n,s){const r=t[n]||{};for(const[i,o]of Object.entries(r))i.includes(s)&&Pc(e,t,n,o.callable,o.delegationSelector)}function B_(e){return e=e.replace(cO,""),x_[e]||e}const te={on(e,t,n,s){rm(e,t,n,s,!1)},one(e,t,n,s){rm(e,t,n,s,!0)},off(e,t,n,s){if(typeof t!="string"||!e)return;const[r,i,o]=N_(t,n,s),l=o!==t,u=k_(e),d=u[o]||{},c=t.startsWith(".");if(typeof i<"u"){if(!Object.keys(d).length)return;Pc(e,u,o,i,r?n:null);return}if(c)for(const p of Object.keys(u))mO(e,u,p,t.slice(1));for(const[p,m]of Object.entries(d)){const v=p.replace(dO,"");(!l||t.includes(v))&&Pc(e,u,o,m.callable,m.delegationSelector)}},trigger(e,t,n){if(typeof t!="string"||!e)return null;const s=S_(),r=B_(t),i=t!==r;let o=null,l=!0,u=!0,d=!1;i&&s&&(o=s.Event(t,n),s(e).trigger(o),l=!o.isPropagationStopped(),u=!o.isImmediatePropagationStopped(),d=o.isDefaultPrevented());const c=Md(new Event(t,{bubbles:l,cancelable:!0}),n);return d&&c.preventDefault(),u&&e.dispatchEvent(c),c.defaultPrevented&&o&&o.preventDefault(),c}};function Md(e,t={}){for(const[n,s]of Object.entries(t))try{e[n]=s}catch{Object.defineProperty(e,n,{configurable:!0,get(){return s}})}return e}function im(e){if(e==="true")return!0;if(e==="false")return!1;if(e===Number(e).toString())return Number(e);if(e===""||e==="null")return null;if(typeof e!="string")return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function Uu(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const Cs={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${Uu(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${Uu(t)}`)},getDataAttributes(e){if(!e)return{};const t={},n=Object.keys(e.dataset).filter(s=>s.startsWith("bs")&&!s.startsWith("bsConfig"));for(const s of n){let r=s.replace(/^bs/,"");r=r.charAt(0).toLowerCase()+r.slice(1,r.length),t[r]=im(e.dataset[s])}return t},getDataAttribute(e,t){return im(e.getAttribute(`data-bs-${Uu(t)}`))}};class Mo{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}_getConfig(t){return t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t}_mergeConfigObj(t,n){const s=Ts(n)?Cs.getDataAttribute(n,"config"):{};return{...this.constructor.Default,...typeof s=="object"?s:{},...Ts(n)?Cs.getDataAttributes(n):{},...typeof t=="object"?t:{}}}_typeCheckConfig(t,n=this.constructor.DefaultType){for(const[s,r]of Object.entries(n)){const i=t[s],o=Ts(i)?"element":iO(i);if(!new RegExp(r).test(o))throw new TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${s}" provided type "${o}" but expected type "${r}".`)}}}const gO="5.3.3";class Gn extends Mo{constructor(t,n){super(),t=Gs(t),t&&(this._element=t,this._config=this._getConfig(n),Hu.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Hu.remove(this._element,this.constructor.DATA_KEY),te.off(this._element,this.constructor.EVENT_KEY);for(const t of Object.getOwnPropertyNames(this))this[t]=null}_queueCallback(t,n,s=!0){A_(t,n,s)}_getConfig(t){return t=this._mergeConfigObj(t,this._element),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}static getInstance(t){return Hu.get(Gs(t),this.DATA_KEY)}static getOrCreateInstance(t,n={}){return this.getInstance(t)||new this(t,typeof n=="object"?n:null)}static get VERSION(){return gO}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(t){return`${t}${this.EVENT_KEY}`}}const qu=e=>{let t=e.getAttribute("data-bs-target");if(!t||t==="#"){let n=e.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),t=n&&n!=="#"?n.trim():null}return t?t.split(",").map(n=>E_(n)).join(","):null},Pe={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(n=>n.matches(t))},parents(e,t){const n=[];let s=e.parentNode.closest(t);for(;s;)n.push(s),s=s.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){const t=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map(n=>`${n}:not([tabindex^="-"])`).join(",");return this.find(t,e).filter(n=>!Ys(n)&&Ii(n))},getSelectorFromElement(e){const t=qu(e);return t&&Pe.findOne(t)?t:null},getElementFromSelector(e){const t=qu(e);return t?Pe.findOne(t):null},getMultipleElementsFromSelector(e){const t=qu(e);return t?Pe.find(t):[]}},Nl=(e,t="hide")=>{const n=`click.dismiss${e.EVENT_KEY}`,s=e.NAME;te.on(document,n,`[data-bs-dismiss="${s}"]`,function(r){if(["A","AREA"].includes(this.tagName)&&r.preventDefault(),Ys(this))return;const i=Pe.getElementFromSelector(this)||this.closest(`.${s}`);e.getOrCreateInstance(i)[t]()})},vO="alert",bO="bs.alert",I_=`.${bO}`,_O=`close${I_}`,yO=`closed${I_}`,wO="fade",EO="show";class Bl extends Gn{static get NAME(){return vO}close(){if(te.trigger(this._element,_O).defaultPrevented)return;this._element.classList.remove(EO);const n=this._element.classList.contains(wO);this._queueCallback(()=>this._destroyElement(),this._element,n)}_destroyElement(){this._element.remove(),te.trigger(this._element,yO),this.dispose()}static jQueryInterface(t){return this.each(function(){const n=Bl.getOrCreateInstance(this);if(typeof t=="string"){if(n[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);n[t](this)}})}}Nl(Bl,"close");Dn(Bl);const TO="button",CO="bs.button",SO=`.${CO}`,AO=".data-api",xO="active",om='[data-bs-toggle="button"]',OO=`click${SO}${AO}`;class Il extends Gn{static get NAME(){return TO}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(xO))}static jQueryInterface(t){return this.each(function(){const n=Il.getOrCreateInstance(this);t==="toggle"&&n[t]()})}}te.on(document,OO,om,e=>{e.preventDefault();const t=e.target.closest(om);Il.getOrCreateInstance(t).toggle()});Dn(Il);const kO="swipe",Pi=".bs.swipe",$O=`touchstart${Pi}`,NO=`touchmove${Pi}`,BO=`touchend${Pi}`,IO=`pointerdown${Pi}`,PO=`pointerup${Pi}`,LO="touch",DO="pen",RO="pointer-event",VO=40,MO={endCallback:null,leftCallback:null,rightCallback:null},FO={endCallback:"(function|null)",leftCallback:"(function|null)",rightCallback:"(function|null)"};class Za extends Mo{constructor(t,n){super(),this._element=t,!(!t||!Za.isSupported())&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return MO}static get DefaultType(){return FO}static get NAME(){return kO}dispose(){te.off(this._element,Pi)}_start(t){if(!this._supportPointerEvents){this._deltaX=t.touches[0].clientX;return}this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX)}_end(t){this._eventIsPointerPenTouch(t)&&(this._deltaX=t.clientX-this._deltaX),this._handleSwipe(),tn(this._config.endCallback)}_move(t){this._deltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this._deltaX}_handleSwipe(){const t=Math.abs(this._deltaX);if(t<=VO)return;const n=t/this._deltaX;this._deltaX=0,n&&tn(n>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(te.on(this._element,IO,t=>this._start(t)),te.on(this._element,PO,t=>this._end(t)),this._element.classList.add(RO)):(te.on(this._element,$O,t=>this._start(t)),te.on(this._element,NO,t=>this._move(t)),te.on(this._element,BO,t=>this._end(t)))}_eventIsPointerPenTouch(t){return this._supportPointerEvents&&(t.pointerType===DO||t.pointerType===LO)}static isSupported(){return"ontouchstart"in document.documentElement||navigator.maxTouchPoints>0}}const HO="carousel",jO="bs.carousel",er=`.${jO}`,P_=".data-api",zO="ArrowLeft",UO="ArrowRight",qO=500,Xi="next",Zr="prev",ii="left",Ia="right",WO=`slide${er}`,Wu=`slid${er}`,KO=`keydown${er}`,GO=`mouseenter${er}`,YO=`mouseleave${er}`,XO=`dragstart${er}`,JO=`load${er}${P_}`,QO=`click${er}${P_}`,L_="carousel",ma="active",ZO="slide",ek="carousel-item-end",tk="carousel-item-start",nk="carousel-item-next",sk="carousel-item-prev",D_=".active",R_=".carousel-item",rk=D_+R_,ik=".carousel-item img",ok=".carousel-indicators",ak="[data-bs-slide], [data-bs-slide-to]",lk='[data-bs-ride="carousel"]',uk={[zO]:Ia,[UO]:ii},ck={interval:5e3,keyboard:!0,pause:"hover",ride:!1,touch:!0,wrap:!0},dk={interval:"(number|boolean)",keyboard:"boolean",pause:"(string|boolean)",ride:"(boolean|string)",touch:"boolean",wrap:"boolean"};class Li extends Gn{constructor(t,n){super(t,n),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=Pe.findOne(ok,this._element),this._addEventListeners(),this._config.ride===L_&&this.cycle()}static get Default(){return ck}static get DefaultType(){return dk}static get NAME(){return HO}next(){this._slide(Xi)}nextWhenVisible(){!document.hidden&&Ii(this._element)&&this.next()}prev(){this._slide(Zr)}pause(){this._isSliding&&T_(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){te.one(this._element,Wu,()=>this.cycle());return}this.cycle()}}to(t){const n=this._getItems();if(t>n.length-1||t<0)return;if(this._isSliding){te.one(this._element,Wu,()=>this.to(t));return}const s=this._getItemIndex(this._getActive());if(s===t)return;const r=t>s?Xi:Zr;this._slide(r,n[t])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(t){return t.defaultInterval=t.interval,t}_addEventListeners(){this._config.keyboard&&te.on(this._element,KO,t=>this._keydown(t)),this._config.pause==="hover"&&(te.on(this._element,GO,()=>this.pause()),te.on(this._element,YO,()=>this._maybeEnableCycle())),this._config.touch&&Za.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(const s of Pe.find(ik,this._element))te.on(s,XO,r=>r.preventDefault());const n={leftCallback:()=>this._slide(this._directionToOrder(ii)),rightCallback:()=>this._slide(this._directionToOrder(Ia)),endCallback:()=>{this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),qO+this._config.interval))}};this._swipeHelper=new Za(this._element,n)}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const n=uk[t.key];n&&(t.preventDefault(),this._slide(this._directionToOrder(n)))}_getItemIndex(t){return this._getItems().indexOf(t)}_setActiveIndicatorElement(t){if(!this._indicatorsElement)return;const n=Pe.findOne(D_,this._indicatorsElement);n.classList.remove(ma),n.removeAttribute("aria-current");const s=Pe.findOne(`[data-bs-slide-to="${t}"]`,this._indicatorsElement);s&&(s.classList.add(ma),s.setAttribute("aria-current","true"))}_updateInterval(){const t=this._activeElement||this._getActive();if(!t)return;const n=Number.parseInt(t.getAttribute("data-bs-interval"),10);this._config.interval=n||this._config.defaultInterval}_slide(t,n=null){if(this._isSliding)return;const s=this._getActive(),r=t===Xi,i=n||Vd(this._getItems(),s,r,this._config.wrap);if(i===s)return;const o=this._getItemIndex(i),l=v=>te.trigger(this._element,v,{relatedTarget:i,direction:this._orderToDirection(t),from:this._getItemIndex(s),to:o});if(l(WO).defaultPrevented||!s||!i)return;const d=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(o),this._activeElement=i;const c=r?tk:ek,p=r?nk:sk;i.classList.add(p),Vo(i),s.classList.add(c),i.classList.add(c);const m=()=>{i.classList.remove(c,p),i.classList.add(ma),s.classList.remove(ma,p,c),this._isSliding=!1,l(Wu)};this._queueCallback(m,s,this._isAnimated()),d&&this.cycle()}_isAnimated(){return this._element.classList.contains(ZO)}_getActive(){return Pe.findOne(rk,this._element)}_getItems(){return Pe.find(R_,this._element)}_clearInterval(){this._interval&&(clearInterval(this._interval),this._interval=null)}_directionToOrder(t){return Pn()?t===ii?Zr:Xi:t===ii?Xi:Zr}_orderToDirection(t){return Pn()?t===Zr?ii:Ia:t===Zr?Ia:ii}static jQueryInterface(t){return this.each(function(){const n=Li.getOrCreateInstance(this,t);if(typeof t=="number"){n.to(t);return}if(typeof t=="string"){if(n[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);n[t]()}})}}te.on(document,QO,ak,function(e){const t=Pe.getElementFromSelector(this);if(!t||!t.classList.contains(L_))return;e.preventDefault();const n=Li.getOrCreateInstance(t),s=this.getAttribute("data-bs-slide-to");if(s){n.to(s),n._maybeEnableCycle();return}if(Cs.getDataAttribute(this,"slide")==="next"){n.next(),n._maybeEnableCycle();return}n.prev(),n._maybeEnableCycle()});te.on(window,JO,()=>{const e=Pe.find(lk);for(const t of e)Li.getOrCreateInstance(t)});Dn(Li);const fk="collapse",pk="bs.collapse",Fo=`.${pk}`,hk=".data-api",mk=`show${Fo}`,gk=`shown${Fo}`,vk=`hide${Fo}`,bk=`hidden${Fo}`,_k=`click${Fo}${hk}`,Ku="show",li="collapse",ga="collapsing",yk="collapsed",wk=`:scope .${li} .${li}`,Ek="collapse-horizontal",Tk="width",Ck="height",Sk=".collapse.show, .collapse.collapsing",Lc='[data-bs-toggle="collapse"]',Ak={parent:null,toggle:!0},xk={parent:"(null|element)",toggle:"boolean"};class Ei extends Gn{constructor(t,n){super(t,n),this._isTransitioning=!1,this._triggerArray=[];const s=Pe.find(Lc);for(const r of s){const i=Pe.getSelectorFromElement(r),o=Pe.find(i).filter(l=>l===this._element);i!==null&&o.length&&this._triggerArray.push(r)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ak}static get DefaultType(){return xk}static get NAME(){return fk}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(Sk).filter(l=>l!==this._element).map(l=>Ei.getOrCreateInstance(l,{toggle:!1}))),t.length&&t[0]._isTransitioning||te.trigger(this._element,mk).defaultPrevented)return;for(const l of t)l.hide();const s=this._getDimension();this._element.classList.remove(li),this._element.classList.add(ga),this._element.style[s]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const r=()=>{this._isTransitioning=!1,this._element.classList.remove(ga),this._element.classList.add(li,Ku),this._element.style[s]="",te.trigger(this._element,gk)},o=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback(r,this._element,!0),this._element.style[s]=`${this._element[o]}px`}hide(){if(this._isTransitioning||!this._isShown()||te.trigger(this._element,vk).defaultPrevented)return;const n=this._getDimension();this._element.style[n]=`${this._element.getBoundingClientRect()[n]}px`,Vo(this._element),this._element.classList.add(ga),this._element.classList.remove(li,Ku);for(const r of this._triggerArray){const i=Pe.getElementFromSelector(r);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([r],!1)}this._isTransitioning=!0;const s=()=>{this._isTransitioning=!1,this._element.classList.remove(ga),this._element.classList.add(li),te.trigger(this._element,bk)};this._element.style[n]="",this._queueCallback(s,this._element,!0)}_isShown(t=this._element){return t.classList.contains(Ku)}_configAfterMerge(t){return t.toggle=!!t.toggle,t.parent=Gs(t.parent),t}_getDimension(){return this._element.classList.contains(Ek)?Tk:Ck}_initializeChildren(){if(!this._config.parent)return;const t=this._getFirstLevelChildren(Lc);for(const n of t){const s=Pe.getElementFromSelector(n);s&&this._addAriaAndCollapsedClass([n],this._isShown(s))}}_getFirstLevelChildren(t){const n=Pe.find(wk,this._config.parent);return Pe.find(t,this._config.parent).filter(s=>!n.includes(s))}_addAriaAndCollapsedClass(t,n){if(t.length)for(const s of t)s.classList.toggle(yk,!n),s.setAttribute("aria-expanded",n)}static jQueryInterface(t){const n={};return typeof t=="string"&&/show|hide/.test(t)&&(n.toggle=!1),this.each(function(){const s=Ei.getOrCreateInstance(this,n);if(typeof t=="string"){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t]()}})}}te.on(document,_k,Lc,function(e){(e.target.tagName==="A"||e.delegateTarget&&e.delegateTarget.tagName==="A")&&e.preventDefault();for(const t of Pe.getMultipleElementsFromSelector(this))Ei.getOrCreateInstance(t,{toggle:!1}).toggle()});Dn(Ei);const am="dropdown",Ok="bs.dropdown",Lr=`.${Ok}`,Fd=".data-api",kk="Escape",lm="Tab",$k="ArrowUp",um="ArrowDown",Nk=2,Bk=`hide${Lr}`,Ik=`hidden${Lr}`,Pk=`show${Lr}`,Lk=`shown${Lr}`,V_=`click${Lr}${Fd}`,M_=`keydown${Lr}${Fd}`,Dk=`keyup${Lr}${Fd}`,oi="show",Rk="dropup",Vk="dropend",Mk="dropstart",Fk="dropup-center",Hk="dropdown-center",wr='[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)',jk=`${wr}.${oi}`,Pa=".dropdown-menu",zk=".navbar",Uk=".navbar-nav",qk=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Wk=Pn()?"top-end":"top-start",Kk=Pn()?"top-start":"top-end",Gk=Pn()?"bottom-end":"bottom-start",Yk=Pn()?"bottom-start":"bottom-end",Xk=Pn()?"left-start":"right-start",Jk=Pn()?"right-start":"left-start",Qk="top",Zk="bottom",e$={autoClose:!0,boundary:"clippingParents",display:"dynamic",offset:[0,2],popperConfig:null,reference:"toggle"},t$={autoClose:"(boolean|string)",boundary:"(string|element)",display:"string",offset:"(array|string|function)",popperConfig:"(null|object|function)",reference:"(string|element|object)"};class zn extends Gn{constructor(t,n){super(t,n),this._popper=null,this._parent=this._element.parentNode,this._menu=Pe.next(this._element,Pa)[0]||Pe.prev(this._element,Pa)[0]||Pe.findOne(Pa,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return e$}static get DefaultType(){return t$}static get NAME(){return am}toggle(){return this._isShown()?this.hide():this.show()}show(){if(Ys(this._element)||this._isShown())return;const t={relatedTarget:this._element};if(!te.trigger(this._element,Pk,t).defaultPrevented){if(this._createPopper(),"ontouchstart"in document.documentElement&&!this._parent.closest(Uk))for(const s of[].concat(...document.body.children))te.on(s,"mouseover",Qa);this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(oi),this._element.classList.add(oi),te.trigger(this._element,Lk,t)}}hide(){if(Ys(this._element)||!this._isShown())return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){if(!te.trigger(this._element,Bk,t).defaultPrevented){if("ontouchstart"in document.documentElement)for(const s of[].concat(...document.body.children))te.off(s,"mouseover",Qa);this._popper&&this._popper.destroy(),this._menu.classList.remove(oi),this._element.classList.remove(oi),this._element.setAttribute("aria-expanded","false"),Cs.removeDataAttribute(this._menu,"popper"),te.trigger(this._element,Ik,t)}}_getConfig(t){if(t=super._getConfig(t),typeof t.reference=="object"&&!Ts(t.reference)&&typeof t.reference.getBoundingClientRect!="function")throw new TypeError(`${am.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(){if(typeof w_>"u")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let t=this._element;this._config.reference==="parent"?t=this._parent:Ts(this._config.reference)?t=Gs(this._config.reference):typeof this._config.reference=="object"&&(t=this._config.reference);const n=this._getPopperConfig();this._popper=Rd(t,this._menu,n)}_isShown(){return this._menu.classList.contains(oi)}_getPlacement(){const t=this._parent;if(t.classList.contains(Vk))return Xk;if(t.classList.contains(Mk))return Jk;if(t.classList.contains(Fk))return Qk;if(t.classList.contains(Hk))return Zk;const n=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return t.classList.contains(Rk)?n?Kk:Wk:n?Yk:Gk}_detectNavbar(){return this._element.closest(zk)!==null}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(n=>Number.parseInt(n,10)):typeof t=="function"?n=>t(n,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return(this._inNavbar||this._config.display==="static")&&(Cs.setDataAttribute(this._menu,"popper","static"),t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,...tn(this._config.popperConfig,[t])}}_selectMenuItem({key:t,target:n}){const s=Pe.find(qk,this._menu).filter(r=>Ii(r));s.length&&Vd(s,n,t===um,!s.includes(n)).focus()}static jQueryInterface(t){return this.each(function(){const n=zn.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t]()}})}static clearMenus(t){if(t.button===Nk||t.type==="keyup"&&t.key!==lm)return;const n=Pe.find(jk);for(const s of n){const r=zn.getInstance(s);if(!r||r._config.autoClose===!1)continue;const i=t.composedPath(),o=i.includes(r._menu);if(i.includes(r._element)||r._config.autoClose==="inside"&&!o||r._config.autoClose==="outside"&&o||r._menu.contains(t.target)&&(t.type==="keyup"&&t.key===lm||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;const l={relatedTarget:r._element};t.type==="click"&&(l.clickEvent=t),r._completeHide(l)}}static dataApiKeydownHandler(t){const n=/input|textarea/i.test(t.target.tagName),s=t.key===kk,r=[$k,um].includes(t.key);if(!r&&!s||n&&!s)return;t.preventDefault();const i=this.matches(wr)?this:Pe.prev(this,wr)[0]||Pe.next(this,wr)[0]||Pe.findOne(wr,t.delegateTarget.parentNode),o=zn.getOrCreateInstance(i);if(r){t.stopPropagation(),o.show(),o._selectMenuItem(t);return}o._isShown()&&(t.stopPropagation(),o.hide(),i.focus())}}te.on(document,M_,wr,zn.dataApiKeydownHandler);te.on(document,M_,Pa,zn.dataApiKeydownHandler);te.on(document,V_,zn.clearMenus);te.on(document,Dk,zn.clearMenus);te.on(document,V_,wr,function(e){e.preventDefault(),zn.getOrCreateInstance(this).toggle()});Dn(zn);const F_="backdrop",n$="fade",cm="show",dm=`mousedown.bs.${F_}`,s$={className:"modal-backdrop",clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:"body"},r$={className:"string",clickCallback:"(function|null)",isAnimated:"boolean",isVisible:"boolean",rootElement:"(element|string)"};class H_ extends Mo{constructor(t){super(),this._config=this._getConfig(t),this._isAppended=!1,this._element=null}static get Default(){return s$}static get DefaultType(){return r$}static get NAME(){return F_}show(t){if(!this._config.isVisible){tn(t);return}this._append();const n=this._getElement();this._config.isAnimated&&Vo(n),n.classList.add(cm),this._emulateAnimation(()=>{tn(t)})}hide(t){if(!this._config.isVisible){tn(t);return}this._getElement().classList.remove(cm),this._emulateAnimation(()=>{this.dispose(),tn(t)})}dispose(){this._isAppended&&(te.off(this._element,dm),this._element.remove(),this._isAppended=!1)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add(n$),this._element=t}return this._element}_configAfterMerge(t){return t.rootElement=Gs(t.rootElement),t}_append(){if(this._isAppended)return;const t=this._getElement();this._config.rootElement.append(t),te.on(t,dm,()=>{tn(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(t){A_(t,this._getElement(),this._config.isAnimated)}}const i$="focustrap",o$="bs.focustrap",el=`.${o$}`,a$=`focusin${el}`,l$=`keydown.tab${el}`,u$="Tab",c$="forward",fm="backward",d$={autofocus:!0,trapElement:null},f$={autofocus:"boolean",trapElement:"element"};class j_ extends Mo{constructor(t){super(),this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return d$}static get DefaultType(){return f$}static get NAME(){return i$}activate(){this._isActive||(this._config.autofocus&&this._config.trapElement.focus(),te.off(document,el),te.on(document,a$,t=>this._handleFocusin(t)),te.on(document,l$,t=>this._handleKeydown(t)),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,te.off(document,el))}_handleFocusin(t){const{trapElement:n}=this._config;if(t.target===document||t.target===n||n.contains(t.target))return;const s=Pe.focusableChildren(n);s.length===0?n.focus():this._lastTabNavDirection===fm?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){t.key===u$&&(this._lastTabNavDirection=t.shiftKey?fm:c$)}}const pm=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",hm=".sticky-top",va="padding-right",mm="margin-right";class Dc{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,va,n=>n+t),this._setElementAttributes(pm,va,n=>n+t),this._setElementAttributes(hm,mm,n=>n-t)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,va),this._resetElementAttributes(pm,va),this._resetElementAttributes(hm,mm)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,n,s){const r=this.getWidth(),i=o=>{if(o!==this._element&&window.innerWidth>o.clientWidth+r)return;this._saveInitialAttribute(o,n);const l=window.getComputedStyle(o).getPropertyValue(n);o.style.setProperty(n,`${s(Number.parseFloat(l))}px`)};this._applyManipulationCallback(t,i)}_saveInitialAttribute(t,n){const s=t.style.getPropertyValue(n);s&&Cs.setDataAttribute(t,n,s)}_resetElementAttributes(t,n){const s=r=>{const i=Cs.getDataAttribute(r,n);if(i===null){r.style.removeProperty(n);return}Cs.removeDataAttribute(r,n),r.style.setProperty(n,i)};this._applyManipulationCallback(t,s)}_applyManipulationCallback(t,n){if(Ts(t)){n(t);return}for(const s of Pe.find(t,this._element))n(s)}}const p$="modal",h$="bs.modal",Ln=`.${h$}`,m$=".data-api",g$="Escape",v$=`hide${Ln}`,b$=`hidePrevented${Ln}`,z_=`hidden${Ln}`,U_=`show${Ln}`,_$=`shown${Ln}`,y$=`resize${Ln}`,w$=`click.dismiss${Ln}`,E$=`mousedown.dismiss${Ln}`,T$=`keydown.dismiss${Ln}`,C$=`click${Ln}${m$}`,gm="modal-open",S$="fade",vm="show",Gu="modal-static",A$=".modal.show",x$=".modal-dialog",O$=".modal-body",k$='[data-bs-toggle="modal"]',$$={backdrop:!0,focus:!0,keyboard:!0},N$={backdrop:"(boolean|string)",focus:"boolean",keyboard:"boolean"};class Ti extends Gn{constructor(t,n){super(t,n),this._dialog=Pe.findOne(x$,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Dc,this._addEventListeners()}static get Default(){return $$}static get DefaultType(){return N$}static get NAME(){return p$}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||te.trigger(this._element,U_,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(gm),this._adjustDialog(),this._backdrop.show(()=>this._showElement(t)))}hide(){!this._isShown||this._isTransitioning||te.trigger(this._element,v$).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(vm),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){te.off(window,Ln),te.off(this._dialog,Ln),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new H_({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new j_({trapElement:this._element})}_showElement(t){document.body.contains(this._element)||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0;const n=Pe.findOne(O$,this._dialog);n&&(n.scrollTop=0),Vo(this._element),this._element.classList.add(vm);const s=()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,te.trigger(this._element,_$,{relatedTarget:t})};this._queueCallback(s,this._dialog,this._isAnimated())}_addEventListeners(){te.on(this._element,T$,t=>{if(t.key===g$){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),te.on(window,y$,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),te.on(this._element,E$,t=>{te.one(this._element,w$,n=>{if(!(this._element!==t.target||this._element!==n.target)){if(this._config.backdrop==="static"){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(gm),this._resetAdjustments(),this._scrollBar.reset(),te.trigger(this._element,z_)})}_isAnimated(){return this._element.classList.contains(S$)}_triggerBackdropTransition(){if(te.trigger(this._element,b$).defaultPrevented)return;const n=this._element.scrollHeight>document.documentElement.clientHeight,s=this._element.style.overflowY;s==="hidden"||this._element.classList.contains(Gu)||(n||(this._element.style.overflowY="hidden"),this._element.classList.add(Gu),this._queueCallback(()=>{this._element.classList.remove(Gu),this._queueCallback(()=>{this._element.style.overflowY=s},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),s=n>0;if(s&&!t){const r=Pn()?"paddingLeft":"paddingRight";this._element.style[r]=`${n}px`}if(!s&&t){const r=Pn()?"paddingRight":"paddingLeft";this._element.style[r]=`${n}px`}}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,n){return this.each(function(){const s=Ti.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof s[t]>"u")throw new TypeError(`No method named "${t}"`);s[t](n)}})}}te.on(document,C$,k$,function(e){const t=Pe.getElementFromSelector(this);["A","AREA"].includes(this.tagName)&&e.preventDefault(),te.one(t,U_,r=>{r.defaultPrevented||te.one(t,z_,()=>{Ii(this)&&this.focus()})});const n=Pe.findOne(A$);n&&Ti.getInstance(n).hide(),Ti.getOrCreateInstance(t).toggle(this)});Nl(Ti);Dn(Ti);const B$="offcanvas",I$="bs.offcanvas",ks=`.${I$}`,q_=".data-api",P$=`load${ks}${q_}`,L$="Escape",bm="show",_m="showing",ym="hiding",D$="offcanvas-backdrop",W_=".offcanvas.show",R$=`show${ks}`,V$=`shown${ks}`,M$=`hide${ks}`,wm=`hidePrevented${ks}`,K_=`hidden${ks}`,F$=`resize${ks}`,H$=`click${ks}${q_}`,j$=`keydown.dismiss${ks}`,z$='[data-bs-toggle="offcanvas"]',U$={backdrop:!0,keyboard:!0,scroll:!1},q$={backdrop:"(boolean|string)",keyboard:"boolean",scroll:"boolean"};class xs extends Gn{constructor(t,n){super(t,n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return U$}static get DefaultType(){return q$}static get NAME(){return B$}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||te.trigger(this._element,R$,{relatedTarget:t}).defaultPrevented)return;this._isShown=!0,this._backdrop.show(),this._config.scroll||new Dc().hide(),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_m);const s=()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(bm),this._element.classList.remove(_m),te.trigger(this._element,V$,{relatedTarget:t})};this._queueCallback(s,this._element,!0)}hide(){if(!this._isShown||te.trigger(this._element,M$).defaultPrevented)return;this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(ym),this._backdrop.hide();const n=()=>{this._element.classList.remove(bm,ym),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._config.scroll||new Dc().reset(),te.trigger(this._element,K_)};this._queueCallback(n,this._element,!0)}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){const t=()=>{if(this._config.backdrop==="static"){te.trigger(this._element,wm);return}this.hide()},n=!!this._config.backdrop;return new H_({className:D$,isVisible:n,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:n?t:null})}_initializeFocusTrap(){return new j_({trapElement:this._element})}_addEventListeners(){te.on(this._element,j$,t=>{if(t.key===L$){if(this._config.keyboard){this.hide();return}te.trigger(this._element,wm)}})}static jQueryInterface(t){return this.each(function(){const n=xs.getOrCreateInstance(this,t);if(typeof t=="string"){if(n[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);n[t](this)}})}}te.on(document,H$,z$,function(e){const t=Pe.getElementFromSelector(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),Ys(this))return;te.one(t,K_,()=>{Ii(this)&&this.focus()});const n=Pe.findOne(W_);n&&n!==t&&xs.getInstance(n).hide(),xs.getOrCreateInstance(t).toggle(this)});te.on(window,P$,()=>{for(const e of Pe.find(W_))xs.getOrCreateInstance(e).show()});te.on(window,F$,()=>{for(const e of Pe.find("[aria-modal][class*=show][class*=offcanvas-]"))getComputedStyle(e).position!=="fixed"&&xs.getOrCreateInstance(e).hide()});Nl(xs);Dn(xs);const W$=/^aria-[\w-]*$/i,G_={"*":["class","dir","id","lang","role",W$],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},K$=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),G$=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Y$=(e,t)=>{const n=e.nodeName.toLowerCase();return t.includes(n)?K$.has(n)?!!G$.test(e.nodeValue):!0:t.filter(s=>s instanceof RegExp).some(s=>s.test(n))};function X$(e,t,n){if(!e.length)return e;if(n&&typeof n=="function")return n(e);const r=new window.DOMParser().parseFromString(e,"text/html"),i=[].concat(...r.body.querySelectorAll("*"));for(const o of i){const l=o.nodeName.toLowerCase();if(!Object.keys(t).includes(l)){o.remove();continue}const u=[].concat(...o.attributes),d=[].concat(t["*"]||[],t[l]||[]);for(const c of u)Y$(c,d)||o.removeAttribute(c.nodeName)}return r.body.innerHTML}const J$="TemplateFactory",Q$={allowList:G_,content:{},extraClass:"",html:!1,sanitize:!0,sanitizeFn:null,template:"
"},Z$={allowList:"object",content:"object",extraClass:"(string|function)",html:"boolean",sanitize:"boolean",sanitizeFn:"(null|function)",template:"string"},eN={entry:"(string|element|function|null)",selector:"(string|element)"};class tN extends Mo{constructor(t){super(),this._config=this._getConfig(t)}static get Default(){return Q$}static get DefaultType(){return Z$}static get NAME(){return J$}getContent(){return Object.values(this._config.content).map(t=>this._resolvePossibleFunction(t)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(t){return this._checkContent(t),this._config.content={...this._config.content,...t},this}toHtml(){const t=document.createElement("div");t.innerHTML=this._maybeSanitize(this._config.template);for(const[r,i]of Object.entries(this._config.content))this._setContent(t,i,r);const n=t.children[0],s=this._resolvePossibleFunction(this._config.extraClass);return s&&n.classList.add(...s.split(" ")),n}_typeCheckConfig(t){super._typeCheckConfig(t),this._checkContent(t.content)}_checkContent(t){for(const[n,s]of Object.entries(t))super._typeCheckConfig({selector:n,entry:s},eN)}_setContent(t,n,s){const r=Pe.findOne(s,t);if(r){if(n=this._resolvePossibleFunction(n),!n){r.remove();return}if(Ts(n)){this._putElementInTemplate(Gs(n),r);return}if(this._config.html){r.innerHTML=this._maybeSanitize(n);return}r.textContent=n}}_maybeSanitize(t){return this._config.sanitize?X$(t,this._config.allowList,this._config.sanitizeFn):t}_resolvePossibleFunction(t){return tn(t,[this])}_putElementInTemplate(t,n){if(this._config.html){n.innerHTML="",n.append(t);return}n.textContent=t.textContent}}const nN="tooltip",sN=new Set(["sanitize","allowList","sanitizeFn"]),Yu="fade",rN="modal",ba="show",iN=".tooltip-inner",Em=`.${rN}`,Tm="hide.bs.modal",Ji="hover",Xu="focus",oN="click",aN="manual",lN="hide",uN="hidden",cN="show",dN="shown",fN="inserted",pN="click",hN="focusin",mN="focusout",gN="mouseenter",vN="mouseleave",bN={AUTO:"auto",TOP:"top",RIGHT:Pn()?"left":"right",BOTTOM:"bottom",LEFT:Pn()?"right":"left"},_N={allowList:G_,animation:!0,boundary:"clippingParents",container:!1,customClass:"",delay:0,fallbackPlacements:["top","right","bottom","left"],html:!1,offset:[0,6],placement:"top",popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:'',title:"",trigger:"hover focus"},yN={allowList:"object",animation:"boolean",boundary:"(string|element)",container:"(string|element|boolean)",customClass:"(string|function)",delay:"(number|object)",fallbackPlacements:"array",html:"boolean",offset:"(array|string|function)",placement:"(string|function)",popperConfig:"(null|object|function)",sanitize:"boolean",sanitizeFn:"(null|function)",selector:"(string|boolean)",template:"string",title:"(string|element|function)",trigger:"string"};class Ss extends Gn{constructor(t,n){if(typeof w_>"u")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t,n),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return _N}static get DefaultType(){return yN}static get NAME(){return nN}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._activeTrigger.click=!this._activeTrigger.click,this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),te.off(this._element.closest(Em),Tm,this._hideModalHandler),this._element.getAttribute("data-bs-original-title")&&this._element.setAttribute("title",this._element.getAttribute("data-bs-original-title")),this._disposePopper(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this._isWithContent()&&this._isEnabled))return;const t=te.trigger(this._element,this.constructor.eventName(cN)),s=(C_(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(t.defaultPrevented||!s)return;this._disposePopper();const r=this._getTipElement();this._element.setAttribute("aria-describedby",r.getAttribute("id"));const{container:i}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(i.append(r),te.trigger(this._element,this.constructor.eventName(fN))),this._popper=this._createPopper(r),r.classList.add(ba),"ontouchstart"in document.documentElement)for(const l of[].concat(...document.body.children))te.on(l,"mouseover",Qa);const o=()=>{te.trigger(this._element,this.constructor.eventName(dN)),this._isHovered===!1&&this._leave(),this._isHovered=!1};this._queueCallback(o,this.tip,this._isAnimated())}hide(){if(!this._isShown()||te.trigger(this._element,this.constructor.eventName(lN)).defaultPrevented)return;if(this._getTipElement().classList.remove(ba),"ontouchstart"in document.documentElement)for(const r of[].concat(...document.body.children))te.off(r,"mouseover",Qa);this._activeTrigger[oN]=!1,this._activeTrigger[Xu]=!1,this._activeTrigger[Ji]=!1,this._isHovered=null;const s=()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute("aria-describedby"),te.trigger(this._element,this.constructor.eventName(uN)))};this._queueCallback(s,this.tip,this._isAnimated())}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||(this.tip=this._createTipElement(this._newContent||this._getContentForTemplate())),this.tip}_createTipElement(t){const n=this._getTemplateFactory(t).toHtml();if(!n)return null;n.classList.remove(Yu,ba),n.classList.add(`bs-${this.constructor.NAME}-auto`);const s=oO(this.constructor.NAME).toString();return n.setAttribute("id",s),this._isAnimated()&&n.classList.add(Yu),n}setContent(t){this._newContent=t,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(t){return this._templateFactory?this._templateFactory.changeContent(t):this._templateFactory=new tN({...this._config,content:t,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[iN]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute("data-bs-original-title")}_initializeOnDelegatedTarget(t){return this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(Yu)}_isShown(){return this.tip&&this.tip.classList.contains(ba)}_createPopper(t){const n=tn(this._config.placement,[this,t,this._element]),s=bN[n.toUpperCase()];return Rd(this._element,t,this._getPopperConfig(s))}_getOffset(){const{offset:t}=this._config;return typeof t=="string"?t.split(",").map(n=>Number.parseInt(n,10)):typeof t=="function"?n=>t(n,this._element):t}_resolvePossibleFunction(t){return tn(t,[this._element])}_getPopperConfig(t){const n={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"preSetPlacement",enabled:!0,phase:"beforeMain",fn:s=>{this._getTipElement().setAttribute("data-popper-placement",s.state.placement)}}]};return{...n,...tn(this._config.popperConfig,[n])}}_setListeners(){const t=this._config.trigger.split(" ");for(const n of t)if(n==="click")te.on(this._element,this.constructor.eventName(pN),this._config.selector,s=>{this._initializeOnDelegatedTarget(s).toggle()});else if(n!==aN){const s=n===Ji?this.constructor.eventName(gN):this.constructor.eventName(hN),r=n===Ji?this.constructor.eventName(vN):this.constructor.eventName(mN);te.on(this._element,s,this._config.selector,i=>{const o=this._initializeOnDelegatedTarget(i);o._activeTrigger[i.type==="focusin"?Xu:Ji]=!0,o._enter()}),te.on(this._element,r,this._config.selector,i=>{const o=this._initializeOnDelegatedTarget(i);o._activeTrigger[i.type==="focusout"?Xu:Ji]=o._element.contains(i.relatedTarget),o._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},te.on(this._element.closest(Em),Tm,this._hideModalHandler)}_fixTitle(){const t=this._element.getAttribute("title");t&&(!this._element.getAttribute("aria-label")&&!this._element.textContent.trim()&&this._element.setAttribute("aria-label",t),this._element.setAttribute("data-bs-original-title",t),this._element.removeAttribute("title"))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(t,n){clearTimeout(this._timeout),this._timeout=setTimeout(t,n)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(t){const n=Cs.getDataAttributes(this._element);for(const s of Object.keys(n))sN.has(s)&&delete n[s];return t={...n,...typeof t=="object"&&t?t:{}},t=this._mergeConfigObj(t),t=this._configAfterMerge(t),this._typeCheckConfig(t),t}_configAfterMerge(t){return t.container=t.container===!1?document.body:Gs(t.container),typeof t.delay=="number"&&(t.delay={show:t.delay,hide:t.delay}),typeof t.title=="number"&&(t.title=t.title.toString()),typeof t.content=="number"&&(t.content=t.content.toString()),t}_getDelegateConfig(){const t={};for(const[n,s]of Object.entries(this._config))this.constructor.Default[n]!==s&&(t[n]=s);return t.selector=!1,t.trigger="manual",t}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null),this.tip&&(this.tip.remove(),this.tip=null)}static jQueryInterface(t){return this.each(function(){const n=Ss.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t]()}})}}Dn(Ss);const wN="popover",EN=".popover-header",TN=".popover-body",CN={...Ss.Default,content:"",offset:[0,8],placement:"right",template:'',trigger:"click"},SN={...Ss.DefaultType,content:"(null|string|element|function)"};class Ci extends Ss{static get Default(){return CN}static get DefaultType(){return SN}static get NAME(){return wN}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[EN]:this._getTitle(),[TN]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){const n=Ci.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t]()}})}}Dn(Ci);const AN="scrollspy",xN="bs.scrollspy",Hd=`.${xN}`,ON=".data-api",kN=`activate${Hd}`,Cm=`click${Hd}`,$N=`load${Hd}${ON}`,NN="dropdown-item",ei="active",BN='[data-bs-spy="scroll"]',Ju="[href]",IN=".nav, .list-group",Sm=".nav-link",PN=".nav-item",LN=".list-group-item",DN=`${Sm}, ${PN} > ${Sm}, ${LN}`,RN=".dropdown",VN=".dropdown-toggle",MN={offset:null,rootMargin:"0px 0px -25%",smoothScroll:!1,target:null,threshold:[.1,.5,1]},FN={offset:"(number|null)",rootMargin:"string",smoothScroll:"boolean",target:"element",threshold:"array"};class Pl extends Gn{constructor(t,n){super(t,n),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY==="visible"?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return MN}static get DefaultType(){return FN}static get NAME(){return AN}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(const t of this._observableSections.values())this._observer.observe(t)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(t){return t.target=Gs(t.target)||document.body,t.rootMargin=t.offset?`${t.offset}px 0px -30%`:t.rootMargin,typeof t.threshold=="string"&&(t.threshold=t.threshold.split(",").map(n=>Number.parseFloat(n))),t}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(te.off(this._config.target,Cm),te.on(this._config.target,Cm,Ju,t=>{const n=this._observableSections.get(t.target.hash);if(n){t.preventDefault();const s=this._rootElement||window,r=n.offsetTop-this._element.offsetTop;if(s.scrollTo){s.scrollTo({top:r,behavior:"smooth"});return}s.scrollTop=r}}))}_getNewObserver(){const t={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(n=>this._observerCallback(n),t)}_observerCallback(t){const n=o=>this._targetLinks.get(`#${o.target.id}`),s=o=>{this._previousScrollData.visibleEntryTop=o.target.offsetTop,this._process(n(o))},r=(this._rootElement||document.documentElement).scrollTop,i=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(const o of t){if(!o.isIntersecting){this._activeTarget=null,this._clearActiveClass(n(o));continue}const l=o.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&l){if(s(o),!r)return;continue}!i&&!l&&s(o)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;const t=Pe.find(Ju,this._config.target);for(const n of t){if(!n.hash||Ys(n))continue;const s=Pe.findOne(decodeURI(n.hash),this._element);Ii(s)&&(this._targetLinks.set(decodeURI(n.hash),n),this._observableSections.set(n.hash,s))}}_process(t){this._activeTarget!==t&&(this._clearActiveClass(this._config.target),this._activeTarget=t,t.classList.add(ei),this._activateParents(t),te.trigger(this._element,kN,{relatedTarget:t}))}_activateParents(t){if(t.classList.contains(NN)){Pe.findOne(VN,t.closest(RN)).classList.add(ei);return}for(const n of Pe.parents(t,IN))for(const s of Pe.prev(n,DN))s.classList.add(ei)}_clearActiveClass(t){t.classList.remove(ei);const n=Pe.find(`${Ju}.${ei}`,t);for(const s of n)s.classList.remove(ei)}static jQueryInterface(t){return this.each(function(){const n=Pl.getOrCreateInstance(this,t);if(typeof t=="string"){if(n[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);n[t]()}})}}te.on(window,$N,()=>{for(const e of Pe.find(BN))Pl.getOrCreateInstance(e)});Dn(Pl);const HN="tab",jN="bs.tab",Dr=`.${jN}`,zN=`hide${Dr}`,UN=`hidden${Dr}`,qN=`show${Dr}`,WN=`shown${Dr}`,KN=`click${Dr}`,GN=`keydown${Dr}`,YN=`load${Dr}`,XN="ArrowLeft",Am="ArrowRight",JN="ArrowUp",xm="ArrowDown",Qu="Home",Om="End",Er="active",km="fade",Zu="show",QN="dropdown",Y_=".dropdown-toggle",ZN=".dropdown-menu",ec=`:not(${Y_})`,eB='.list-group, .nav, [role="tablist"]',tB=".nav-item, .list-group-item",nB=`.nav-link${ec}, .list-group-item${ec}, [role="tab"]${ec}`,X_='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',tc=`${nB}, ${X_}`,sB=`.${Er}[data-bs-toggle="tab"], .${Er}[data-bs-toggle="pill"], .${Er}[data-bs-toggle="list"]`;class Si extends Gn{constructor(t){super(t),this._parent=this._element.closest(eB),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),te.on(this._element,GN,n=>this._keydown(n)))}static get NAME(){return HN}show(){const t=this._element;if(this._elemIsActive(t))return;const n=this._getActiveElem(),s=n?te.trigger(n,zN,{relatedTarget:t}):null;te.trigger(t,qN,{relatedTarget:n}).defaultPrevented||s&&s.defaultPrevented||(this._deactivate(n,t),this._activate(t,n))}_activate(t,n){if(!t)return;t.classList.add(Er),this._activate(Pe.getElementFromSelector(t));const s=()=>{if(t.getAttribute("role")!=="tab"){t.classList.add(Zu);return}t.removeAttribute("tabindex"),t.setAttribute("aria-selected",!0),this._toggleDropDown(t,!0),te.trigger(t,WN,{relatedTarget:n})};this._queueCallback(s,t,t.classList.contains(km))}_deactivate(t,n){if(!t)return;t.classList.remove(Er),t.blur(),this._deactivate(Pe.getElementFromSelector(t));const s=()=>{if(t.getAttribute("role")!=="tab"){t.classList.remove(Zu);return}t.setAttribute("aria-selected",!1),t.setAttribute("tabindex","-1"),this._toggleDropDown(t,!1),te.trigger(t,UN,{relatedTarget:n})};this._queueCallback(s,t,t.classList.contains(km))}_keydown(t){if(![XN,Am,JN,xm,Qu,Om].includes(t.key))return;t.stopPropagation(),t.preventDefault();const n=this._getChildren().filter(r=>!Ys(r));let s;if([Qu,Om].includes(t.key))s=n[t.key===Qu?0:n.length-1];else{const r=[Am,xm].includes(t.key);s=Vd(n,t.target,r,!0)}s&&(s.focus({preventScroll:!0}),Si.getOrCreateInstance(s).show())}_getChildren(){return Pe.find(tc,this._parent)}_getActiveElem(){return this._getChildren().find(t=>this._elemIsActive(t))||null}_setInitialAttributes(t,n){this._setAttributeIfNotExists(t,"role","tablist");for(const s of n)this._setInitialAttributesOnChild(s)}_setInitialAttributesOnChild(t){t=this._getInnerElement(t);const n=this._elemIsActive(t),s=this._getOuterElement(t);t.setAttribute("aria-selected",n),s!==t&&this._setAttributeIfNotExists(s,"role","presentation"),n||t.setAttribute("tabindex","-1"),this._setAttributeIfNotExists(t,"role","tab"),this._setInitialAttributesOnTargetPanel(t)}_setInitialAttributesOnTargetPanel(t){const n=Pe.getElementFromSelector(t);n&&(this._setAttributeIfNotExists(n,"role","tabpanel"),t.id&&this._setAttributeIfNotExists(n,"aria-labelledby",`${t.id}`))}_toggleDropDown(t,n){const s=this._getOuterElement(t);if(!s.classList.contains(QN))return;const r=(i,o)=>{const l=Pe.findOne(i,s);l&&l.classList.toggle(o,n)};r(Y_,Er),r(ZN,Zu),s.setAttribute("aria-expanded",n)}_setAttributeIfNotExists(t,n,s){t.hasAttribute(n)||t.setAttribute(n,s)}_elemIsActive(t){return t.classList.contains(Er)}_getInnerElement(t){return t.matches(tc)?t:Pe.findOne(tc,t)}_getOuterElement(t){return t.closest(tB)||t}static jQueryInterface(t){return this.each(function(){const n=Si.getOrCreateInstance(this);if(typeof t=="string"){if(n[t]===void 0||t.startsWith("_")||t==="constructor")throw new TypeError(`No method named "${t}"`);n[t]()}})}}te.on(document,KN,X_,function(e){["A","AREA"].includes(this.tagName)&&e.preventDefault(),!Ys(this)&&Si.getOrCreateInstance(this).show()});te.on(window,YN,()=>{for(const e of Pe.find(sB))Si.getOrCreateInstance(e)});Dn(Si);const rB="toast",iB="bs.toast",tr=`.${iB}`,oB=`mouseover${tr}`,aB=`mouseout${tr}`,lB=`focusin${tr}`,uB=`focusout${tr}`,cB=`hide${tr}`,dB=`hidden${tr}`,fB=`show${tr}`,pB=`shown${tr}`,hB="fade",$m="hide",_a="show",ya="showing",mB={animation:"boolean",autohide:"boolean",delay:"number"},gB={animation:!0,autohide:!0,delay:5e3};class Ll extends Gn{constructor(t,n){super(t,n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return gB}static get DefaultType(){return mB}static get NAME(){return rB}show(){if(te.trigger(this._element,fB).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(hB);const n=()=>{this._element.classList.remove(ya),te.trigger(this._element,pB),this._maybeScheduleHide()};this._element.classList.remove($m),Vo(this._element),this._element.classList.add(_a,ya),this._queueCallback(n,this._element,this._config.animation)}hide(){if(!this.isShown()||te.trigger(this._element,cB).defaultPrevented)return;const n=()=>{this._element.classList.add($m),this._element.classList.remove(ya,_a),te.trigger(this._element,dB)};this._element.classList.add(ya),this._queueCallback(n,this._element,this._config.animation)}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(_a),super.dispose()}isShown(){return this._element.classList.contains(_a)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,n){switch(t.type){case"mouseover":case"mouseout":{this._hasMouseInteraction=n;break}case"focusin":case"focusout":{this._hasKeyboardInteraction=n;break}}if(n){this._clearTimeout();return}const s=t.relatedTarget;this._element===s||this._element.contains(s)||this._maybeScheduleHide()}_setListeners(){te.on(this._element,oB,t=>this._onInteraction(t,!0)),te.on(this._element,aB,t=>this._onInteraction(t,!1)),te.on(this._element,lB,t=>this._onInteraction(t,!0)),te.on(this._element,uB,t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){const n=Ll.getOrCreateInstance(this,t);if(typeof t=="string"){if(typeof n[t]>"u")throw new TypeError(`No method named "${t}"`);n[t](this)}})}}Nl(Ll);Dn(Ll);var vB=Object.defineProperty,bB=(e,t,n)=>t in e?vB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Tt=(e,t,n)=>(bB(e,typeof t!="symbol"?t+"":t,n),n),_B=Object.defineProperty,yB=Object.defineProperties,wB=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertySymbols,EB=Object.prototype.hasOwnProperty,TB=Object.prototype.propertyIsEnumerable,Bm=(e,t,n)=>t in e?_B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,CB=(e,t)=>{for(var n in t||(t={}))EB.call(t,n)&&Bm(e,n,t[n]);if(Nm)for(var n of Nm(t))TB.call(t,n)&&Bm(e,n,t[n]);return e},SB=(e,t)=>yB(e,wB(t));function J_(e,t){var n;const s=Hg();return ao(()=>{s.value=e()},SB(CB({},t),{flush:(n=void 0)!=null?n:"sync"})),bo(s)}var Im;const Rc=typeof window<"u",AB=e=>typeof e=="function";Rc&&((Im=window==null?void 0:window.navigator)!=null&&Im.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function Zi(e){return typeof e=="function"?e():b(e)}function xB(e){return e}function Pm(e){return ed()?(Sg(e),!0):!1}function OB(e,t=1e3,n={}){const{immediate:s=!0,immediateCallback:r=!1}=n;let i=null;const o=ke(!1);function l(){i&&(clearInterval(i),i=null)}function u(){o.value=!1,l()}function d(){b(t)<=0||(o.value=!0,r&&e(),l(),i=setInterval(e,Zi(t)))}if(s&&Rc&&d(),mt(t)||AB(t)){const c=dt(t,()=>{o.value&&Rc&&d()});Pm(c)}return Pm(u),{isActive:o,pause:u,resume:d}}const Lm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Dm="__vueuse_ssr_handlers__";Lm[Dm]=Lm[Dm]||{};var Rm;(function(e){e.UP="UP",e.RIGHT="RIGHT",e.DOWN="DOWN",e.LEFT="LEFT",e.NONE="NONE"})(Rm||(Rm={}));var kB=Object.defineProperty,Vm=Object.getOwnPropertySymbols,$B=Object.prototype.hasOwnProperty,NB=Object.prototype.propertyIsEnumerable,Mm=(e,t,n)=>t in e?kB(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,BB=(e,t)=>{for(var n in t||(t={}))$B.call(t,n)&&Mm(e,n,t[n]);if(Vm)for(var n of Vm(t))NB.call(t,n)&&Mm(e,n,t[n]);return e};const IB={easeInSine:[.12,0,.39,0],easeOutSine:[.61,1,.88,1],easeInOutSine:[.37,0,.63,1],easeInQuad:[.11,0,.5,0],easeOutQuad:[.5,1,.89,1],easeInOutQuad:[.45,0,.55,1],easeInCubic:[.32,0,.67,0],easeOutCubic:[.33,1,.68,1],easeInOutCubic:[.65,0,.35,1],easeInQuart:[.5,0,.75,0],easeOutQuart:[.25,1,.5,1],easeInOutQuart:[.76,0,.24,1],easeInQuint:[.64,0,.78,0],easeOutQuint:[.22,1,.36,1],easeInOutQuint:[.83,0,.17,1],easeInExpo:[.7,0,.84,0],easeOutExpo:[.16,1,.3,1],easeInOutExpo:[.87,0,.13,1],easeInCirc:[.55,0,1,.45],easeOutCirc:[0,.55,.45,1],easeInOutCirc:[.85,0,.15,1],easeInBack:[.36,0,.66,-.56],easeOutBack:[.34,1.56,.64,1],easeInOutBack:[.68,-.6,.32,1.6]};BB({linear:xB},IB);const Ho=e=>J_(()=>e.value?`justify-content-${e.value}`:"");class Ai{constructor(t,n={}){if(Tt(this,"cancelable",!0),Tt(this,"componentId",null),Tt(this,"_defaultPrevented",!1),Tt(this,"eventType",""),Tt(this,"nativeEvent",null),Tt(this,"_preventDefault"),Tt(this,"relatedTarget",null),Tt(this,"target",null),!t)throw new TypeError(`Failed to construct '${this.constructor.name}'. 1 argument required, ${arguments.length} given.`);Object.assign(this,Ai.Defaults,n,{eventType:t}),this._preventDefault=function(){this.cancelable&&(this.defaultPrevented=!0)}}get defaultPrevented(){return this._defaultPrevented}set defaultPrevented(t){this._defaultPrevented=t}get preventDefault(){return this._preventDefault}set preventDefault(t){this._preventDefault=t}static get Defaults(){return{cancelable:!0,componentId:null,eventType:"",nativeEvent:null,relatedTarget:null,target:null}}}class PB extends Ai{constructor(t,n={}){super(t,n),Tt(this,"trigger",null),Object.assign(this,Ai.Defaults,n,{eventType:t})}static get Defaults(){return{...super.Defaults,trigger:null}}}const Vc=e=>e!==null&&typeof e=="object",Q_=e=>/^[0-9]*\.?[0-9]+$/.test(String(e)),LB=e=>Object.prototype.toString.call(e)==="[object Object]",hs=e=>e===null,Z_=/_/g,ey=/([a-z])([A-Z])/g,DB=/(\s|^)(\w)/g,RB=/(\s|^)(\w)/,La=/\s+/,VB=/^#/,MB=/^#[A-Za-z]+[\w\-:.]*$/,FB=/-u-.+/,tl=(e,t=2)=>typeof e=="string"?e:e==null?"":Array.isArray(e)||LB(e)&&e.toString===Object.prototype.toString?JSON.stringify(e,null,t):String(e),Fm=e=>e.replace(Z_," ").replace(ey,(t,n,s)=>`${n} ${s}`).replace(RB,(t,n,s)=>n+s.toUpperCase()),Hm=e=>e.replace(Z_," ").replace(ey,(t,n,s)=>`${n} ${s}`).replace(DB,(t,n,s)=>n+s.toUpperCase()),HB=e=>{const t=e.trim();return t.charAt(0).toUpperCase()+t.slice(1)},nc=e=>`\\${e}`,jB=e=>{const t=tl(e),{length:n}=t,s=t.charCodeAt(0);return t.split("").reduce((r,i,o)=>{const l=t.charCodeAt(o);return l===0?`${r}�`:l===127||l>=1&&l<=31||o===0&&l>=48&&l<=57||o===1&&l>=48&&l<=57&&s===45?r+nc(`${l.toString(16)} `):o===0&&l===45&&n===1?r+nc(i):l>=128||l===45||l===95||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122?r+i:r+nc(i)},"")},jd=typeof window<"u",zB=typeof document<"u",UB=typeof navigator<"u",ty=jd&&zB&&UB,jm=jd?window:{},qB=(()=>{let e=!1;if(ty)try{const t={get passive(){e=!0}};jm.addEventListener("test",t,t),jm.removeEventListener("test",t,t)}catch{e=!1}return e})(),ny=typeof window<"u",sy=typeof document<"u",WB=typeof Element<"u",ry=typeof navigator<"u",Dl=ny&&sy&&ry,Or=ny?window:{},Rl=sy?document:{},iy=ry?navigator:{},KB=(iy.userAgent||"").toLowerCase();KB.indexOf("jsdom")>0;(()=>{let e=!1;if(Dl)try{const t={get passive(){return e=!0,e}};Or.addEventListener("test",t,t),Or.removeEventListener("test",t,t)}catch{e=!1}return e})();Dl&&("ontouchstart"in Rl.documentElement||iy.maxTouchPoints>0);Dl&&(Or.PointerEvent||Or.MSPointerEvent);Dl&&"IntersectionObserver"in Or&&"IntersectionObserverEntry"in Or&&"intersectionRatio"in Or.IntersectionObserverEntry.prototype;const zs=WB?Element.prototype:void 0,GB=(zs==null?void 0:zs.matches)||(zs==null?void 0:zs.msMatchesSelector)||(zs==null?void 0:zs.webkitMatchesSelector),ls=e=>!!(e&&e.nodeType===Node.ELEMENT_NODE),YB=e=>ls(e)?e.getBoundingClientRect():null,XB=(e=[])=>{const{activeElement:t}=document;return t&&!e.some(n=>n===t)?t:null},JB=e=>ls(e)&&e===XB(),QB=(e,t={})=>{try{e.focus(t)}catch(n){console.error(n)}return JB(e)},ZB=(e,t)=>t&&ls(e)&&e.getAttribute(t)||null,eI=e=>{if(ZB(e,"display")==="none")return!1;const t=YB(e);return!!(t&&t.height>0&&t.width>0)},bn=(e,t)=>!e||e(t).filter(n=>n.type!==Mt).length<1,oy=(e,t)=>(ls(t)?t:Rl).querySelector(e)||null,tI=(e,t)=>Array.from([(ls(t)?t:Rl).querySelectorAll(e)]),zd=(e,t)=>t&&ls(e)?e.getAttribute(t):null,nI=e=>Rl.getElementById(/^#/.test(e)?e.slice(1):e)||null,sI=(e,t,n)=>{ls(e)&&e.setAttribute(t,n)},rI=(e,t)=>{ls(e)&&e.removeAttribute(t)},iI=(e,t)=>tl(e).toLowerCase()===tl(t).toLowerCase(),wa=jd?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||(e=>setTimeout(e,16)):e=>setTimeout(e,0),ay=(e,t)=>ls(e)?GB.call(e,t):!1,oI=(zs==null?void 0:zs.closest)||function(e){let t=this;if(!t)return null;do{if(ay(t,e))return t;t=t.parentElement||t.parentNode}while(t!==null&&t.nodeType===Node.ELEMENT_NODE);return null},zm=(e,t,n=!1)=>{if(!ls(t))return null;const s=oI.call(t,e);return n?s:s===t?null:s},Vl=(e,t,n)=>t.concat(["sm","md","lg","xl","xxl"]).reduce((s,r)=>(s[e?`${e}${r.charAt(0).toUpperCase()+r.slice(1)}`:r]=n,s),Object.create(null)),ly=(e,t,n,s=n)=>Object.keys(t).reduce((r,i)=>(e[i]&&r.push([s,i.replace(n,""),e[i]].filter(o=>o&&typeof o!="boolean").join("-").toLowerCase()),r),[]),ys=(e="")=>`__BVID__${Math.random().toString().slice(2,8)}___BV_${e}__`,Ml=(e,t)=>e===!0||e==="true"||e===""?"true":e==="grammar"||e==="spelling"?e:t===!1?"true":e===!1||e==="false"?"false":void 0,sc=e=>!!e&&typeof e=="object"&&e.constructor===Object,Mc=(e,t,n=!0)=>{const s=e instanceof Date&&typeof e.getMonth=="function"?new Date(e.getTime()):Object.assign({},e);return sc(e)&&sc(t)&&Object.keys(t).forEach(r=>{sc(t[r])?r in e?s[r]=Mc(e[r],t[r],n):Object.assign(s,{[r]:t[r]}):Array.isArray(t[r])&&Array.isArray(e[r])?Object.assign(s,{[r]:n?e[r].concat(t[r].filter(i=>!e[r].includes(i))):t[r]}):Object.assign(s,{[r]:t[r]})}),s},On=(e,t={},n={})=>{const s=[e];let r;for(let i=0;iNumber.isInteger(e)?e:t,eo=(e,t=NaN)=>{const n=Number.parseInt(e,10);return Number.isNaN(n)?t:n},mo=(e,t=NaN)=>{const n=Number.parseFloat(e.toString());return Number.isNaN(n)?t:n},Fl=(e,t)=>Object.keys(e).filter(n=>!t.includes(n)).reduce((n,s)=>({...n,[s]:e[s]}),{}),nl=e=>Array.isArray(e)?e.map(t=>nl(t)):e instanceof Date?new Date(e.getTime()):e&&typeof e=="object"?Object.getOwnPropertyNames(e).reduce((t,n)=>{var s;return Object.defineProperty(t,n,(s=Object.getOwnPropertyDescriptor(e,n))!=null?s:{}),t[n]=nl(e[n]),t},Object.create(Object.getPrototypeOf(e))):e,Fc=e=>new Promise(t=>t(nl(e))),Um=(e,t)=>t+(e?HB(e):""),Ud=(e,t)=>(Array.isArray(t)?t.slice():Object.keys(t)).reduce((n,s)=>(n[s]=e[s],n),{}),aI=e=>typeof e=="boolean"?e:e===""?!0:e==="true",Oo=e=>!!(e.href||e.to);function S(e){return J_(()=>e.value===void 0||e.value===null?e.value:aI(e.value))}const uy=Symbol(),cy={items:rn([]),reset(){this.items=rn([])}},lI=e=>{e.provide(uy,cy)},uI=()=>{var e;return(e=Ct(uy))!=null?e:cy},nn=(e,t,n)=>{$t(()=>{var s;(s=e==null?void 0:e.value)==null||s.addEventListener(t,n)}),No(()=>{var s;(s=e==null?void 0:e.value)==null||s.removeEventListener(t,n)})},dy=e=>E(()=>({"form-check":e.plain===!1&&e.button===!1,"form-check-inline":e.inline===!0,"form-switch":e.switch===!0,[`form-control-${e.size}`]:e.size!==void 0&&e.size!=="md"})),fy=e=>E(()=>({"form-check-input":e.plain===!1&&e.button===!1,"is-valid":e.state===!0,"is-invalid":e.state===!1,"btn-check":e.button===!0})),py=e=>E(()=>({"form-check-label":e.plain===!1&&e.button===!1,btn:e.button===!0,[`btn-${e.buttonVariant}`]:e.button===!0&&e.buttonVariant!==void 0,[`btn-${e.size}`]:e.button&&e.size&&e.size!=="md"})),hy=e=>E(()=>({"aria-invalid":Ml(e.ariaInvalid,e.state),"aria-required":e.required===!0?!0:void 0})),my=e=>E(()=>({"was-validated":e.validated===!0,"btn-group":e.buttons===!0&&e.stacked===!1,"btn-group-vertical":e.stacked===!0,[`btn-group-${e.size}`]:e.size!==void 0})),sl=(e,t,n)=>e.reduce((s,r)=>r.type.toString()==="Symbol(Fragment)"?s.concat(r.children):s.concat([r]),[]).filter(s=>s.type.__name===t||s.type.name===t).map(s=>{const r=(s.children.default?s.children.default():[]).find(i=>i.type.toString()==="Symbol(Text)");return{props:{disabled:n,...s.props},text:r?r.children:""}}),gy=(e,t)=>typeof e=="string"?{props:{value:e,disabled:t.disabled},text:e}:{props:{value:e[t.valueField],disabled:t.disabled||e[t.disabledField],...e.props},text:e[t.textField],html:e[t.htmlField]},vy=(e,t,n,s,r)=>({...e,props:{"button-variant":n.buttonVariant,form:n.form,name:s.value,id:`${r.value}_option_${t}`,button:n.buttons,state:n.state,plain:n.plain,size:n.size,inline:!n.stacked,required:n.required,...e.props}}),Dt=(e,t)=>E(()=>(e==null?void 0:e.value)||ys(t)),by={ariaInvalid:{type:[Boolean,String],default:void 0},autocomplete:{type:String,required:!1},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},form:{type:String,required:!1},formatter:{type:Function,required:!1},id:{type:String,required:!1},lazy:{type:Boolean,default:!1},lazyFormatter:{type:Boolean,default:!1},list:{type:String,required:!1},modelValue:{type:[String,Number],default:""},name:{type:String,required:!1},number:{type:Boolean,default:!1},placeholder:{type:String,required:!1},plaintext:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},size:{type:String,required:!1},state:{type:Boolean,default:null},trim:{type:Boolean,default:!1}},_y=(e,t)=>{const n=ke();let s=null,r=!0;const i=Dt(_(e,"id"),"input"),o=(C,k,x=!1)=>(C=String(C),typeof e.formatter=="function"&&(!e.lazyFormatter||x)?(r=!1,e.formatter(C,k)):C),l=C=>e.trim?C.trim():e.number?Number.parseFloat(C):C,u=()=>{hn(()=>{var C;e.autofocus&&((C=n.value)==null||C.focus())})};$t(u),$t(()=>{n.value&&(n.value.value=e.modelValue)}),fl(u);const d=E(()=>{var C;return Ml(e.ariaInvalid,(C=e.state)!=null?C:void 0)}),c=C=>{const{value:k}=C.target,x=o(k,C);if(x===!1||C.defaultPrevented){C.preventDefault();return}if(e.lazy)return;const O=l(x);e.modelValue!==O&&(s=k,t("update:modelValue",O)),t("input",x)},p=C=>{const{value:k}=C.target,x=o(k,C);if(x===!1||C.defaultPrevented){C.preventDefault();return}if(!e.lazy)return;s=k,t("update:modelValue",x);const O=l(x);e.modelValue!==O&&t("change",x)},m=C=>{if(t("blur",C),!e.lazy&&!e.lazyFormatter)return;const{value:k}=C.target,x=o(k,C,!0);s=k,t("update:modelValue",x)},v=()=>{var C;e.disabled||(C=n.value)==null||C.focus()},w=()=>{var C;e.disabled||(C=n.value)==null||C.blur()};return dt(()=>e.modelValue,C=>{!n.value||(n.value.value=s&&r?s:C,s=null,r=!0)}),{input:n,computedId:i,computedAriaInvalid:d,onInput:c,onChange:p,onBlur:m,focus:v,blur:w}},ai=(e,t)=>{if(!e)return e;if(t in e)return e[t];const n=t.split(".");return ai(e[n[0]],n.splice(1).join("."))},rc=(e,t=null,n,s)=>{if(Object.prototype.toString.call(e)==="[object Object]"){const r=ai(e,s.valueField),i=ai(e,s.textField),o=ai(e,s.htmlField),l=ai(e,s.disabledField),u=e[s.optionsField]||null;return u!==null?{label:String(ai(e,s.labelField)||i),options:qd(u,n,s)}:{value:typeof r>"u"?t||i:r,text:String(typeof i>"u"?t:i),html:o,disabled:!!l}}return{value:t||e,text:String(e),disabled:!1}},qd=(e,t,n)=>Array.isArray(e)?e.map(s=>rc(s,null,t,n)):Object.prototype.toString.call(e)==="[object Object]"?(console.warn(`[BootstrapVue warn]: ${t} - Setting prop "options" to an object is deprecated. Use the array format instead.`),Object.keys(e).map(s=>{const r=e[s];switch(typeof r){case"object":return rc(r.text,String(r.value),t,n);default:return rc(r,String(s),t,n)}})):[],cI=["id"],yy=Symbol(),dI=Z({__name:"BAccordion",props:{flush:{default:!1},free:{default:!1},id:null},setup(e){const t=e,n=Dt(_(t,"id"),"accordion"),s=S(_(t,"flush")),r=S(_(t,"free")),i=E(()=>({"accordion-flush":s.value}));return r.value||rs(yy,n.value),(o,l)=>(A(),H("div",{id:b(n),class:ne(["accordion",b(i)])},[U(o.$slots,"default")],10,cI))}}),wy=Z({__name:"BCollapse",props:{accordion:null,id:{default:ys()},modelValue:{default:!1},tag:{default:"div"},toggle:{default:!1},visible:{default:!1},isNav:{default:!1}},emits:["update:modelValue","show","shown","hide","hidden"],setup(e,{emit:t}){const n=e,s=S(_(n,"modelValue")),r=S(_(n,"toggle")),i=S(_(n,"visible")),o=S(_(n,"isNav")),l=ke(),u=ke(),d=E(()=>({show:s.value,"navbar-collapse":o.value})),c=()=>t("update:modelValue",!1);return dt(()=>s.value,p=>{var m,v;p?(m=u.value)==null||m.show():(v=u.value)==null||v.hide()}),dt(()=>i.value,p=>{var m,v;p?(t("update:modelValue",!!p),(m=u.value)==null||m.show()):(t("update:modelValue",!!p),(v=u.value)==null||v.hide())}),nn(l,"show.bs.collapse",()=>{t("show"),t("update:modelValue",!0)}),nn(l,"hide.bs.collapse",()=>{t("hide"),t("update:modelValue",!1)}),nn(l,"shown.bs.collapse",()=>t("shown")),nn(l,"hidden.bs.collapse",()=>t("hidden")),$t(()=>{var p;u.value=new Ei(l.value,{parent:n.accordion?`#${n.accordion}`:void 0,toggle:r.value}),(i.value||s.value)&&(t("update:modelValue",!0),(p=u.value)==null||p.show())}),(p,m)=>(A(),re(Ve(e.tag),{id:e.id,ref_key:"element",ref:l,class:ne(["collapse",b(d)]),"data-bs-parent":e.accordion||null,"is-nav":b(o)},{default:me(()=>[U(p.$slots,"default",{visible:b(s),close:c})]),_:3},8,["id","class","data-bs-parent","is-nav"]))}}),qm=(e,t)=>e.setAttribute("data-bs-theme",t),fI={mounted(e,t){qm(e,t.value)},updated(e,t){qm(e,t.value)}},pI={mounted(e,t){const n=t.modifiers.left?"left":t.modifiers.right?"right":t.modifiers.bottom?"bottom":t.modifiers.top?"top":"right",s=[];t.modifiers.manual?s.push("manual"):(t.modifiers.click&&s.push("click"),t.modifiers.hover&&s.push("hover"),t.modifiers.focus&&s.push("focus")),e.setAttribute("data-bs-toggle","popover"),new Ci(e,{trigger:s.length===0?"click":s.join(" "),placement:n,content:t.value,html:t.modifiers.html})},unmounted(e){const t=Ci.getInstance(e);t!==null&&t.dispose()}},hI=e=>{if(e.classList.contains("offcanvas"))return"offcanvas";if(e.classList.contains("collapse"))return"collapse";throw Error("Couldn't resolve toggle type")},mI=(e,t)=>{const{modifiers:n,arg:s,value:r}=e,i=Object.keys(n||{}),o=typeof r=="string"?r.split(La):r;if(iI(t.tagName,"a")){const l=zd(t,"href")||"";MB.test(l)&&i.push(l.replace(VB,""))}return Array.prototype.concat.apply([],[s,o]).forEach(l=>typeof l=="string"&&i.push(l)),i.filter((l,u,d)=>l&&d.indexOf(l)===u)},Wd={mounted(e,t){const n=mI(t,e),s=[],r=e.tagName==="a"?"href":"data-bs-target";n.forEach(i=>{const o=document.getElementById(i);o!==null&&(e.setAttribute("data-bs-toggle",hI(o)),s.push(`#${i}`))}),s.length>0&&e.setAttribute(r,s.join(","))}},gI=(e,t)=>{if(t!=null&&t.trigger)return t.trigger;if(e.manual)return"manual";const n=[];return e.click&&n.push("click"),e.hover&&n.push("hover"),e.focus&&n.push("focus"),n.length>0?n.join(" "):"hover focus"},vI=(e,t)=>t!=null&&t.placement?t.placement:e.left?"left":e.right?"right":e.bottom?"bottom":"top",bI=e=>e!=null&&e.delay?e.delay:0,Wm=e=>typeof e>"u"?(console.warn("Review tooltip directive usage. Some uses are not defining a title in root component or a value like `v-b-tooltip='{title: \"my title\"}'` nor `v-b-tooltip=\"'my title'\"` to define a title"),""):typeof e=="object"?e==null?void 0:e.title:e,_I={beforeMount(e,t){e.setAttribute("data-bs-toggle","tooltip"),e.getAttribute("title")||e.setAttribute("title",Wm(t.value).toString());const n=/<("[^"]*"|'[^']*'|[^'">])*>/.test(e.title),s=gI(t.modifiers,t.value),r=vI(t.modifiers,t.value),i=bI(t.value),o=e.getAttribute("title");new Ss(e,{trigger:s,placement:r,delay:i,html:n}),o&&e.setAttribute("data-bs-original-title",o)},updated(e,t){e.getAttribute("title")||e.setAttribute("title",Wm(t.value).toString());const n=e.getAttribute("title"),s=e.getAttribute("data-bs-original-title"),r=Ss.getInstance(e);e.removeAttribute("title"),n&&n!==s&&(r==null||r.setContent({".tooltip-inner":n}),e.setAttribute("data-bs-original-title",n))},unmounted(e){const t=Ss.getInstance(e);t!==null&&t.dispose()}},Da=new Map;class yI{constructor(t,n,s,r,i){Tt(this,"element"),Tt(this,"margin"),Tt(this,"once"),Tt(this,"callback"),Tt(this,"instance"),Tt(this,"observer"),Tt(this,"doneOnce"),Tt(this,"visible"),this.element=t,this.margin=n,this.once=s,this.callback=r,this.instance=i,this.createObserver()}createObserver(){if(this.observer&&this.stop(),!(this.doneOnce||typeof this.callback!="function")){try{this.observer=new IntersectionObserver(this.handler.bind(this),{root:null,rootMargin:this.margin,threshold:0})}catch{console.error("Intersection Observer not supported"),this.doneOnce=!0,this.observer=void 0,this.callback(null);return}this.instance.$nextTick(()=>{this.observer&&this.observer.observe(this.element)})}}handler(t){const[n]=t,s=!!(n.isIntersecting||n.intersectionRatio>0);s!==this.visible&&(this.visible=s,this.callback(s),this.once&&this.visible&&(this.doneOnce=!0,this.stop()))}stop(){this.observer&&this.observer.disconnect(),this.observer=null}}const Ey=e=>{if(Da.has(e)){const t=Da.get(e);t&&t.stop&&t.stop(),Da.delete(e)}},Km=(e,t)=>{const n={margin:"0px",once:!1,callback:t.value};Object.keys(t.modifiers).forEach(r=>{Number.isInteger(r)?n.margin=`${r}px`:r.toLowerCase()==="once"&&(n.once=!0)}),Ey(e);const s=new yI(e,n.margin,n.once,n.callback,t.instance);Da.set(e,s)},wI={beforeMount(e,t){Km(e,t)},updated(e,t){Km(e,t)},unmounted(e){Ey(e)}},EI={class:"accordion-item"},TI=["id"],CI=["aria-expanded","aria-controls"],SI={class:"accordion-body"},AI=Z({__name:"BAccordionItem",props:{id:null,title:null,visible:{default:!1}},setup(e){const t=e,n=Ct(yy,""),s=Dt(_(t,"id"),"accordion_item"),r=S(_(t,"visible"));return(i,o)=>(A(),H("div",EI,[_e("h2",{id:`${b(s)}heading`,class:"accordion-header"},[ki((A(),H("button",{class:ne(["accordion-button",{collapsed:!b(r)}]),type:"button","aria-expanded":b(r)?"true":"false","aria-controls":b(s)},[U(i.$slots,"title",{},()=>[Fe(Ee(e.title),1)])],10,CI)),[[b(Wd),void 0,b(s)]])],8,TI),Ye(wy,{id:b(s),class:"accordion-collapse",visible:e.visible,accordion:b(n),"aria-labelledby":`heading${b(s)}`},{default:me(()=>[_e("div",SI,[U(i.$slots,"default")])]),_:3},8,["id","visible","accordion","aria-labelledby"])]))}}),jo=Z({__name:"BTransition",props:{appear:{default:!1},mode:null,noFade:{default:!1},transProps:null},setup(e){const t=e,n=S(_(t,"appear")),s=S(_(t,"noFade")),r=E(()=>{const l={name:"",enterActiveClass:"",enterToClass:"",leaveActiveClass:"",leaveToClass:"showing",enterFromClass:"showing",leaveFromClass:""},u={...l,enterActiveClass:"fade showing",leaveActiveClass:"fade showing"};return s.value?l:u}),i=E(()=>({mode:t.mode,css:!0,...r.value})),o=E(()=>t.transProps!==void 0?{...i.value,...t.transProps}:n.value?{...i.value,appear:!0,appearActiveClass:r.value.enterActiveClass,appearToClass:r.value.enterToClass}:i.value);return(l,u)=>(A(),re(Y1,Ot(Ft(b(o))),{default:me(()=>[U(l.$slots,"default")]),_:3},16))}}),xI=["type","disabled","aria-label"],Di=Z({__name:"BCloseButton",props:{ariaLabel:{default:"Close"},disabled:{default:!1},white:{default:!1},type:{default:"button"}},emits:["click"],setup(e,{emit:t}){const n=e,s=S(_(n,"disabled")),r=S(_(n,"white")),i=E(()=>({"btn-close-white":r.value}));return(o,l)=>(A(),H("button",{type:e.type,class:ne(["btn-close",b(i)]),disabled:b(s),"aria-label":e.ariaLabel,onClick:l[0]||(l[0]=u=>t("click",u))},null,10,xI))}}),OI={key:0,class:"visually-hidden"},Hl=Z({__name:"BSpinner",props:{label:null,role:{default:"status"},small:{default:!1},tag:{default:"span"},type:{default:"border"},variant:null},setup(e){const t=e,n=Ht(),s=S(_(t,"small")),r=E(()=>({"spinner-border":t.type==="border","spinner-border-sm":t.type==="border"&&s.value,"spinner-grow":t.type==="grow","spinner-grow-sm":t.type==="grow"&&s.value,[`text-${t.variant}`]:t.variant!==void 0})),i=E(()=>!bn(n.label));return(o,l)=>(A(),re(Ve(e.tag),{class:ne(b(r)),role:e.label||b(i)?e.role:null,"aria-hidden":e.label||b(i)?null:!0},{default:me(()=>[e.label||b(i)?(A(),H("span",OI,[U(o.$slots,"label",{},()=>[Fe(Ee(e.label),1)])])):xe("",!0)]),_:3},8,["class","role","aria-hidden"]))}}),Rr={active:{type:[Boolean,String],default:!1},activeClass:{type:String,default:"router-link-active"},append:{type:[Boolean,String],default:!1},disabled:{type:[Boolean,String],default:!1},event:{type:[String,Array],default:"click"},exact:{type:[Boolean,String],default:!1},exactActiveClass:{type:String,default:"router-link-exact-active"},href:{type:String},rel:{type:String,default:null},replace:{type:[Boolean,String],default:!1},routerComponentName:{type:String,default:"router-link"},routerTag:{type:String,default:"a"},target:{type:String,default:"_self"},to:{type:[String,Object],default:null}},kI=Z({props:Rr,emits:["click"],setup(e,{emit:t,attrs:n}){const s=S(_(e,"active")),r=S(_(e,"append")),i=S(_(e,"disabled")),o=S(_(e,"exact")),l=S(_(e,"replace")),u=Bo(),d=ke(null),c=E(()=>{const v=e.routerComponentName.split("-").map(w=>w.charAt(0).toUpperCase()+w.slice(1)).join("");return(u==null?void 0:u.appContext.app.component(v))===void 0||i.value||!e.to?"a":e.routerComponentName}),p=E(()=>{const v="#";if(e.href)return e.href;if(typeof e.to=="string")return e.to||v;const w=e.to;if(Object.prototype.toString.call(w)==="[object Object]"&&(w.path||w.query||w.hash)){const C=w.path||"",k=w.query?`?${Object.keys(w.query).map(O=>`${O}=${w.query[O]}`).join("=")}`:"",x=!w.hash||w.hash.charAt(0)==="#"?w.hash||"":`#${w.hash}`;return`${C}${k}${x}`||v}return v}),m=E(()=>({to:e.to,href:p.value,target:e.target,rel:e.target==="_blank"&&e.rel===null?"noopener":e.rel||null,tabindex:i.value?"-1":typeof n.tabindex>"u"?null:n.tabindex,"aria-disabled":i.value?"true":null}));return{computedLinkClasses:E(()=>({active:s.value,disabled:i.value})),tag:c,routerAttr:m,link:d,clicked:v=>{if(i.value){v.preventDefault(),v.stopImmediatePropagation();return}t("click",v)},activeBoolean:s,appendBoolean:r,disabledBoolean:i,replaceBoolean:l,exactBoolean:o}}}),on=(e,t)=>{const n=e.__vccOpts||e;for(const[s,r]of t)n[s]=r;return n};function $I(e,t,n,s,r,i){return e.tag==="router-link"?(A(),re(Ve(e.tag),Le({key:0},e.routerAttr,{custom:""}),{default:me(({href:o,navigate:l,isActive:u,isExactActive:d})=>[(A(),re(Ve(e.routerTag),Le({ref:"link",href:o,class:[(u||e.activeBoolean)&&e.activeClass,(d||e.exactBoolean)&&e.exactActiveClass]},e.$attrs,{onClick:l}),{default:me(()=>[U(e.$slots,"default")]),_:2},1040,["href","class","onClick"]))]),_:3},16)):(A(),re(Ve(e.tag),Le({key:1,ref:"link",class:e.computedLinkClasses},e.routerAttr,{onClick:e.clicked}),{default:me(()=>[U(e.$slots,"default")]),_:3},16,["class","onClick"]))}const _n=on(kI,[["render",$I]]),NI=Z({components:{BLink:_n,BSpinner:Hl},props:{...Rr,active:{type:[Boolean,String],default:!1},disabled:{type:[Boolean,String],default:!1},href:{type:String,required:!1},pill:{type:[Boolean,String],default:!1},pressed:{type:[Boolean,String],default:!1},rel:{type:String,default:void 0},size:{type:String,default:"md"},squared:{type:[Boolean,String],default:!1},tag:{type:String,default:"button"},target:{type:String,default:"_self"},type:{type:String,default:"button"},variant:{type:String,default:"secondary"},loading:{type:[Boolean,String],default:!1},loadingMode:{type:String,default:"inline"}},emits:["click","update:pressed"],setup(e,{emit:t}){const n=S(_(e,"active")),s=S(_(e,"disabled")),r=S(_(e,"pill")),i=S(_(e,"pressed")),o=S(_(e,"squared")),l=S(_(e,"loading")),u=E(()=>i.value===!0),d=E(()=>e.tag==="button"&&e.href===void 0&&e.to===null),c=E(()=>Oo(e)),p=E(()=>e.to!==null),m=E(()=>e.href!==void 0?!1:!d.value),v=E(()=>[[`btn-${e.variant}`],[`btn-${e.size}`],{active:n.value||i.value,"rounded-pill":r.value,"rounded-0":o.value,disabled:s.value}]),w=E(()=>({"aria-disabled":m.value?s.value:null,"aria-pressed":u.value?i.value:null,autocomplete:u.value?"off":null,disabled:d.value?s.value:null,href:e.href,rel:c.value?e.rel:null,role:m.value||c.value?"button":null,target:c.value?e.target:null,type:d.value?e.type:null,to:d.value?null:e.to,append:c.value?e.append:null,activeClass:p.value?e.activeClass:null,event:p.value?e.event:null,exact:p.value?e.exact:null,exactActiveClass:p.value?e.exactActiveClass:null,replace:p.value?e.replace:null,routerComponentName:p.value?e.routerComponentName:null,routerTag:p.value?e.routerTag:null})),C=E(()=>p.value?_n:e.href?"a":e.tag);return{computedClasses:v,computedAttrs:w,computedTag:C,clicked:k=>{if(s.value){k.preventDefault(),k.stopPropagation();return}t("click",k),u.value&&t("update:pressed",!i.value)},loadingBoolean:l}}});function BI(e,t,n,s,r,i){const o=Cr("b-spinner");return A(),re(Ve(e.computedTag),Le({class:["btn",e.computedClasses]},e.computedAttrs,{onClick:e.clicked}),{default:me(()=>[e.loadingBoolean?(A(),H("div",{key:0,class:ne(["btn-loading",{"mode-fill":e.loadingMode==="fill","mode-inline":e.loadingMode==="inline"}])},[U(e.$slots,"loading",{},()=>[Ye(o,{class:"btn-spinner",small:e.size!=="lg"},null,8,["small"])])],2)):xe("",!0),_e("div",{class:ne(["btn-content",{"btn-loading-fill":e.loadingBoolean&&e.loadingMode==="fill"}])},[U(e.$slots,"default")],2)]),_:3},16,["class","onClick"])}const xi=on(NI,[["render",BI]]),II=(e,t=ke(1e3),n={})=>{const s=ke(!1),r=ke(0),i=ke(Zi(e)),o=ke(Zi(t)),l=E(()=>Math.ceil(i.value/o.value)),u=E(()=>p.value||s.value?Math.round(i.value-r.value*o.value):0),{pause:d,resume:c,isActive:p}=OB(()=>r.value=r.value+1,t,n),m=()=>{s.value=!1,r.value=0,c()},v=()=>{s.value=!1,r.value=l.value};ao(()=>{const k=Zi(e),x=i.value;k!==x&&(i.value=k,v(),m())}),ao(()=>{const k=Zi(t),x=o.value;k!==x&&(o.value=k,v(),m())}),ao(()=>{r.value>l.value&&(r.value=l.value),r.value===l.value&&d()});const w=()=>{p.value!==!1&&(s.value=!0,d())},C=()=>{r.value!==l.value&&(s.value=!1,c())};return{isActive:bo(p),isPaused:bo(s),restart:m,stop:v,pause:w,resume:C,value:u}},PI=Z({__name:"BAlert",props:{dismissLabel:{default:"Close"},dismissible:{default:!1},fade:{default:!1},modelValue:{type:[Boolean,Number],default:!1},variant:{default:"info"},closeContent:null,immediate:{default:!0},interval:{default:1e3},showOnPause:{default:!0}},emits:["closed","close-countdown","update:modelValue"],setup(e,{expose:t,emit:n}){const s=e,r=S(_(s,"dismissible")),i=S(_(s,"fade")),o=S(_(s,"immediate")),l=S(_(s,"showOnPause")),u=Ht(),d=E(()=>!bn(u.close)),c=E(()=>[[`alert-${s.variant}`],{"alert-dismissible":r.value}]),{isActive:p,pause:m,restart:v,resume:w,stop:C,isPaused:k,value:x}=II(typeof s.modelValue=="boolean"?0:_(s,"modelValue"),_(s,"interval"),{immediate:typeof s.modelValue=="number"&&o.value}),O=E(()=>typeof s.modelValue=="boolean"?s.modelValue:p.value||l.value&&k.value);ao(()=>n("close-countdown",x.value));const I=()=>{typeof s.modelValue=="boolean"?n("update:modelValue",!1):(n("update:modelValue",0),C()),n("closed")};return No(()=>C()),t({pause:m,resume:w,restart:v,stop:C}),(N,B)=>(A(),re(jo,{"no-fade":!b(i),"trans-props":{enterToClass:"show"}},{default:me(()=>[b(O)?(A(),H("div",{key:0,class:ne(["alert",b(c)]),role:"alert","aria-live":"polite","aria-atomic":"true"},[U(N.$slots,"default"),b(r)?(A(),H(Re,{key:0},[b(d)||e.closeContent?(A(),re(xi,{key:0,type:"button",onClick:I},{default:me(()=>[U(N.$slots,"close",{},()=>[Fe(Ee(e.closeContent),1)])]),_:3})):(A(),re(Di,{key:1,"aria-label":e.dismissLabel,onClick:I},null,8,["aria-label"]))],64)):xe("",!0)],2)):xe("",!0)]),_:3},8,["no-fade"]))}}),Ty=Symbol(),LI=Z({__name:"BAvatarGroup",props:{overlap:{default:.3},rounded:{type:[Boolean,String],default:!1},size:null,square:{default:!1},tag:{default:"div"},variant:null},setup(e){const t=e,n=S(_(t,"square")),s=E(()=>Hc(t.size)),r=E(()=>Math.min(Math.max(o(t.overlap),0),1)/2),i=E(()=>{const l=s.value?`calc(${s.value} * ${r.value})`:null;return l?{paddingLeft:l,paddingRight:l}:{}}),o=l=>typeof l=="string"&&Q_(l)?mo(l,0):l||0;return rs(Ty,{overlapScale:r,size:t.size,square:n.value,rounded:t.rounded,variant:t.variant}),(l,u)=>(A(),re(Ve(e.tag),{class:"b-avatar-group",role:"group"},{default:me(()=>[_e("div",{class:"b-avatar-group-inner",style:Lt(b(i))},[U(l.$slots,"default")],4)]),_:3}))}}),DI={key:0,class:"b-avatar-custom"},RI={key:1,class:"b-avatar-img"},VI=["src","alt"],Hc=e=>{const t=typeof e=="string"&&Q_(e)?mo(e,0):e;return typeof t=="number"?`${t}px`:t||null},MI=Z({__name:"BAvatar",props:{alt:{default:"avatar"},ariaLabel:null,badge:{type:[Boolean,String],default:!1},badgeLeft:{default:!1},badgeOffset:null,badgeTop:{default:!1},badgeVariant:{default:"primary"},button:{default:!1},buttonType:{default:"button"},disabled:{default:!1},icon:null,rounded:{type:[Boolean,String],default:"circle"},size:null,square:{default:!1},src:null,text:null,textVariant:null,variant:{default:"secondary"}},emits:["click","img-error"],setup(e,{emit:t}){const n=e,s=Ht(),r=Ct(Ty,null),i=["sm",null,"lg"],o=.4,l=o*.7,u=S(_(n,"badgeLeft")),d=S(_(n,"badgeTop")),c=S(_(n,"button")),p=S(_(n,"disabled")),m=S(_(n,"square")),v=E(()=>!bn(s.default)),w=E(()=>!bn(s.badge)),C=E(()=>!!n.badge||n.badge===""||w.value),k=E(()=>r!=null&&r.size?r.size:Hc(n.size)),x=E(()=>r!=null&&r.variant?r.variant:n.variant),O=E(()=>r!=null&&r.rounded?r.rounded:n.rounded),I=E(()=>({type:c.value?n.buttonType:void 0,"aria-label":n.ariaLabel||null,disabled:p.value||null})),N=E(()=>[`bg-${n.badgeVariant}`]),B=E(()=>n.badge===!0?"":n.badge),L=E(()=>[[`text-${Oe(n.badgeVariant)}`]]),j=E(()=>({[`b-avatar-${n.size}`]:!!n.size&&i.indexOf(Hc(n.size))!==-1,[`bg-${x.value}`]:!!x.value,badge:!c.value&&x.value&&v.value,rounded:O.value===""||O.value===!0,"rounded-circle":!m.value&&O.value==="circle","rounded-0":m.value||O.value==="0","rounded-1":!m.value&&O.value==="sm","rounded-3":!m.value&&O.value==="lg","rounded-top":!m.value&&O.value==="top","rounded-bottom":!m.value&&O.value==="bottom","rounded-start":!m.value&&O.value==="left","rounded-end":!m.value&&O.value==="right",btn:c.value,[`btn-${x.value}`]:c.value?!!x.value:!1})),F=E(()=>[[`text-${n.textVariant||Oe(x.value)}`]]),$=E(()=>{const fe=n.badgeOffset||"0px";return{fontSize:(i.indexOf(k.value||null)===-1?`calc(${k.value} * ${l})`:"")||"",top:d.value?fe:"",bottom:d.value?"":fe,left:u.value?fe:"",right:u.value?"":fe}}),M=E(()=>{const fe=i.indexOf(k.value||null)===-1?`calc(${k.value} * ${o})`:null;return fe?{fontSize:fe}:{}}),Q=E(()=>{var fe;const $e=((fe=r==null?void 0:r.overlapScale)==null?void 0:fe.value)||0,Xe=k.value&&$e?`calc(${k.value} * -${$e})`:null;return Xe?{marginLeft:Xe,marginRight:Xe}:{}}),X=E(()=>c.value?"button":"span"),ae=E(()=>({...Q.value,width:k.value,height:k.value})),Oe=fe=>fe==="light"||fe==="warning"?"dark":"light",ge=fe=>{!p.value&&c.value&&t("click",fe)},be=fe=>t("img-error",fe);return(fe,$e)=>(A(),re(Ve(b(X)),Le({class:["b-avatar",b(j)],style:b(ae)},b(I),{onClick:ge}),{default:me(()=>[b(v)?(A(),H("span",DI,[U(fe.$slots,"default")])):e.src?(A(),H("span",RI,[_e("img",{src:e.src,alt:e.alt,onError:be},null,40,VI)])):e.text?(A(),H("span",{key:2,class:ne(["b-avatar-text",b(F)]),style:Lt(b(M))},Ee(e.text),7)):xe("",!0),b(C)?(A(),H("span",{key:3,class:ne(["b-avatar-badge",b(N)]),style:Lt(b($))},[b(w)?U(fe.$slots,"badge",{key:0}):(A(),H("span",{key:1,class:ne(b(L))},Ee(b(B)),3))],6)):xe("",!0)]),_:3},16,["class","style"]))}}),Gm=Fl(Rr,["event","routerTag"]),FI=Z({components:{BLink:_n},props:{pill:{type:[Boolean,String],default:!1},tag:{type:String,default:"span"},variant:{type:String,default:"secondary"},textIndicator:{type:[Boolean,String],default:!1},dotIndicator:{type:[Boolean,String],default:!1},...Gm},setup(e){const t=S(_(e,"pill")),n=S(_(e,"textIndicator")),s=S(_(e,"dotIndicator")),r=S(_(e,"active")),i=S(_(e,"disabled")),o=E(()=>Oo(e)),l=E(()=>o.value?_n:e.tag),u=E(()=>[[`bg-${e.variant}`],{active:r.value,disabled:i.value,"text-dark":["warning","info","light"].includes(e.variant),"rounded-pill":t.value,"position-absolute top-0 start-100 translate-middle":n.value||s.value,"p-2 border border-light rounded-circle":s.value,"text-decoration-none":o.value}]),d=E(()=>o.value?Ud(e,Gm):{});return{computedClasses:u,computedLinkProps:d,computedTag:l}}});function HI(e,t,n,s,r,i){return A(),re(Ve(e.computedTag),Le({class:["badge",e.computedClasses]},e.computedLinkProps),{default:me(()=>[U(e.$slots,"default")]),_:3},16,["class"])}const jI=on(FI,[["render",HI]]),Ym=Fl(Rr,["event","routerTag"]),zI=Z({components:{BLink:_n},props:{...Ym,active:{type:[Boolean,String],default:!1},ariaCurrent:{type:String,default:"location"},disabled:{type:[Boolean,String],default:!1},text:{type:String,required:!1}},emits:["click"],setup(e,{emit:t}){const n=S(_(e,"active")),s=S(_(e,"disabled")),r=E(()=>({active:n.value})),i=E(()=>n.value?"span":_n),o=E(()=>n.value?e.ariaCurrent:void 0);return{computedLinkProps:E(()=>i.value!=="span"?Ud(e,Ym):{}),computedClasses:r,computedTag:i,computedAriaCurrent:o,clicked:l=>{if(s.value||n.value){l.preventDefault(),l.stopImmediatePropagation();return}s.value||t("click",l)}}}});function UI(e,t,n,s,r,i){return A(),H("li",{class:ne(["breadcrumb-item",e.computedClasses])},[(A(),re(Ve(e.computedTag),Le({"aria-current":e.computedAriaCurrent},e.computedLinkProps,{onClick:e.clicked}),{default:me(()=>[U(e.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]),_:3},16,["aria-current","onClick"]))],2)}const Cy=on(zI,[["render",UI]]),qI={"aria-label":"breadcrumb"},WI={class:"breadcrumb"},KI=Z({__name:"BBreadcrumb",props:{items:null},setup(e){const t=e,n=uI(),s=E(()=>{const r=t.items||(n==null?void 0:n.items)||[];let i=!1;return r.map((o,l)=>(typeof o=="string"&&(o={text:o},l(A(),H("nav",qI,[_e("ol",WI,[U(r.$slots,"prepend"),(A(!0),H(Re,null,ht(b(s),(o,l)=>(A(),re(Cy,Le({key:l},o),{default:me(()=>[Fe(Ee(o.text),1)]),_:2},1040))),128)),U(r.$slots,"default"),U(r.$slots,"append")])]))}}),GI=Z({__name:"BButtonGroup",props:{ariaLabel:{default:"Group"},size:null,tag:{default:"div"},vertical:{default:!1}},setup(e){const t=e,n=S(_(t,"vertical")),s=E(()=>({"btn-group":!n.value,[`btn-group-${t.size}`]:t.size!==void 0,"btn-group-vertical":n.value}));return(r,i)=>(A(),re(Ve(e.tag),{class:ne(b(s)),role:"group","aria-label":e.ariaLabel},{default:me(()=>[U(r.$slots,"default")]),_:3},8,["class","aria-label"]))}}),YI=["role","aria-label"],XI=Z({__name:"BButtonToolbar",props:{ariaLabel:{default:"Group"},justify:{default:!1},role:{default:"toolbar"}},setup(e){const t=S(_(e,"justify")),n=E(()=>({"justify-content-between":t.value}));return(s,r)=>(A(),H("div",{class:ne([b(n),"btn-toolbar"]),role:e.role,"aria-label":e.ariaLabel},[U(s.$slots,"default")],10,YI))}}),Kd=Z({__name:"BImg",props:{alt:null,blank:{default:!1},blankColor:{default:"transparent"},block:{default:!1},center:{default:!1},fluid:{default:!1},lazy:{default:!1},fluidGrow:{default:!1},height:null,left:{default:!1},start:{default:!1},right:{default:!1},end:{default:!1},rounded:{type:[Boolean,String],default:!1},sizes:null,src:null,srcset:null,thumbnail:{default:!1},width:null},emits:["load"],setup(e,{emit:t}){const n=e,s='',r=S(_(n,"lazy")),i=S(_(n,"blank")),o=S(_(n,"block")),l=S(_(n,"center")),u=S(_(n,"fluid")),d=S(_(n,"fluidGrow")),c=S(_(n,"left")),p=S(_(n,"start")),m=S(_(n,"right")),v=S(_(n,"end")),w=S(_(n,"thumbnail")),C=E(()=>typeof n.srcset=="string"?n.srcset.split(",").filter(j=>j).join(","):Array.isArray(n.srcset)?n.srcset.filter(j=>j).join(","):void 0),k=E(()=>typeof n.sizes=="string"?n.sizes.split(",").filter(j=>j).join(","):Array.isArray(n.sizes)?n.sizes.filter(j=>j).join(","):void 0),x=E(()=>{const j=M=>M===void 0?void 0:typeof M=="number"?M:Number.parseInt(M,10)||void 0,F=j(n.width),$=j(n.height);if(i.value){if(F!==void 0&&$===void 0)return{height:F,width:F};if(F===void 0&&$!==void 0)return{height:$,width:$};if(F===void 0&&$===void 0)return{height:1,width:1}}return{width:F,height:$}}),O=E(()=>L(x.value.width,x.value.height,n.blankColor)),I=E(()=>({src:i.value?O.value:n.src,alt:n.alt,width:x.value.width||void 0,height:x.value.height||void 0,srcset:i.value?void 0:C.value,sizes:i.value?void 0:k.value,loading:r.value?"lazy":"eager"})),N=E(()=>c.value||p.value?"float-start":m.value||v.value?"float-end":l.value?"mx-auto":void 0),B=E(()=>({"img-thumbnail":w.value,"img-fluid":u.value||d.value,"w-100":d.value,rounded:n.rounded===""||n.rounded===!0,[`rounded-${n.rounded}`]:typeof n.rounded=="string"&&n.rounded!=="",[`${N.value}`]:N.value!==void 0,"d-block":o.value||l.value})),L=(j,F,$)=>`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(s.replace("%{w}",String(j)).replace("%{h}",String(F)).replace("%{f}",$))}`;return(j,F)=>(A(),H("img",Le({class:b(B)},b(I),{onLoad:F[0]||(F[0]=$=>t("load",$))}),null,16))}}),rl=Z({__name:"BCardImg",props:{alt:null,blank:{default:!1},blankColor:null,bottom:{default:!1},lazy:{default:!1},height:null,left:{default:!1},start:{default:!1},right:{default:!1},end:{default:!1},sizes:null,src:null,srcset:null,top:{default:!1},width:null},emits:["load"],setup(e,{emit:t}){const n=e,s=S(_(n,"bottom")),r=S(_(n,"end")),i=S(_(n,"left")),o=S(_(n,"right")),l=S(_(n,"start")),u=S(_(n,"top")),d=E(()=>u.value?"card-img-top":o.value||r.value?"card-img-right":s.value?"card-img-bottom":i.value||l.value?"card-img-left":"card-img"),c=E(()=>({alt:n.alt,height:n.height,src:n.src,lazy:n.lazy,width:n.width,blank:n.blank,blankColor:n.blankColor,sizes:n.sizes,srcset:n.srcset}));return(p,m)=>(A(),re(Kd,Le({class:b(d)},b(c),{onLoad:m[0]||(m[0]=v=>t("load",v))}),null,16,["class"]))}}),JI=["innerHTML"],Sy=Z({__name:"BCardHeadFoot",props:{text:null,bgVariant:null,borderVariant:null,html:null,tag:{default:"div"},textVariant:null},setup(e){const t=e,n=E(()=>({[`text-${t.textVariant}`]:t.textVariant!==void 0,[`bg-${t.bgVariant}`]:t.bgVariant!==void 0,[`border-${t.borderVariant}`]:t.borderVariant!==void 0}));return(s,r)=>(A(),re(Ve(e.tag),{class:ne(b(n))},{default:me(()=>[e.html?(A(),H("div",{key:0,innerHTML:e.html},null,8,JI)):U(s.$slots,"default",{key:1},()=>[Fe(Ee(e.text),1)])]),_:3},8,["class"]))}}),Ay=Z({__name:"BCardHeader",props:{text:null,bgVariant:null,borderVariant:null,html:null,tag:{default:"div"},textVariant:null},setup(e){const t=e;return(n,s)=>(A(),re(Sy,Le({class:"card-header"},t),{default:me(()=>[U(n.$slots,"default")]),_:3},16))}}),xy=Z({__name:"BCardTitle",props:{text:null,tag:{default:"h4"}},setup(e){return(t,n)=>(A(),re(Ve(e.tag),{class:"card-title"},{default:me(()=>[U(t.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]),_:3}))}}),Oy=Z({__name:"BCardSubtitle",props:{text:null,tag:{default:"h6"},textVariant:{default:"muted"}},setup(e){const t=e,n=E(()=>[`text-${t.textVariant}`]);return(s,r)=>(A(),re(Ve(e.tag),{class:ne(["card-subtitle mb-2",b(n)])},{default:me(()=>[U(s.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]),_:3},8,["class"]))}}),ky=Z({__name:"BCardBody",props:{bodyBgVariant:null,bodyTag:{default:"div"},bodyTextVariant:null,overlay:{default:!1},subtitle:null,subtitleTag:{default:"h4"},subtitleTextVariant:null,title:null,titleTag:{default:"h4"},text:null},setup(e){const t=e,n=Ht(),s=S(_(t,"overlay")),r=E(()=>!bn(n.title)),i=E(()=>!bn(n.subtitle)),o=E(()=>({"card-img-overlay":s.value,[`text-${t.bodyTextVariant}`]:t.bodyTextVariant!==void 0,[`bg-${t.bodyBgVariant}`]:t.bodyBgVariant!==void 0}));return(l,u)=>(A(),re(Ve(e.bodyTag),{class:ne(["card-body",b(o)])},{default:me(()=>[e.title||b(r)?(A(),re(xy,{key:0,tag:e.titleTag},{default:me(()=>[U(l.$slots,"title",{},()=>[Fe(Ee(e.title),1)])]),_:3},8,["tag"])):xe("",!0),e.subtitle||b(i)?(A(),re(Oy,{key:1,tag:e.subtitleTag,"text-variant":e.subtitleTextVariant},{default:me(()=>[U(l.$slots,"subtitle",{},()=>[Fe(Ee(e.subtitle),1)])]),_:3},8,["tag","text-variant"])):xe("",!0),U(l.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]),_:3},8,["class"]))}}),$y=Z({__name:"BCardFooter",props:{text:null,bgVariant:null,borderVariant:null,html:null,tag:{default:"div"},textVariant:null},setup(e){const t=e;return(n,s)=>(A(),re(Sy,Le({class:"card-footer"},t),{default:me(()=>[U(n.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]),_:3},16))}}),Ny=Z({__name:"BCard",props:{align:null,bgVariant:null,bodyBgVariant:null,bodyClass:null,bodyTag:{default:"div"},bodyTextVariant:null,borderVariant:null,footer:null,footerBgVariant:null,footerBorderVariant:null,footerClass:null,footerHtml:{default:""},footerTag:{default:"div"},footerTextVariant:null,header:null,headerBgVariant:null,headerBorderVariant:null,headerClass:null,headerHtml:{default:""},headerTag:{default:"div"},headerTextVariant:null,imgAlt:null,imgBottom:{default:!1},imgEnd:{default:!1},imgHeight:null,imgLeft:{default:!1},imgRight:{default:!1},imgSrc:null,imgStart:{default:!1},imgTop:{default:!1},imgWidth:null,noBody:{default:!1},overlay:{default:!1},subtitle:null,subtitleTag:{default:"h6"},subtitleTextVariant:{default:"muted"},tag:{default:"div"},textVariant:null,title:null,titleTag:{default:"h4"},bodyText:{default:""}},setup(e){const t=e,n=Ht(),s=S(_(t,"imgBottom")),r=S(_(t,"imgEnd")),i=S(_(t,"imgLeft")),o=S(_(t,"imgRight")),l=S(_(t,"imgStart")),u=S(_(t,"noBody")),d=E(()=>!bn(n.header)),c=E(()=>!bn(n.footer)),p=E(()=>({[`text-${t.align}`]:t.align!==void 0,[`text-${t.textVariant}`]:t.textVariant!==void 0,[`bg-${t.bgVariant}`]:t.bgVariant!==void 0,[`border-${t.borderVariant}`]:t.borderVariant!==void 0,"flex-row":i.value||l.value,"flex-row-reverse":r.value||o.value})),m=E(()=>({bgVariant:t.headerBgVariant,borderVariant:t.headerBorderVariant,html:t.headerHtml,tag:t.headerTag,textVariant:t.headerTextVariant})),v=E(()=>({overlay:t.overlay,bodyBgVariant:t.bodyBgVariant,bodyTag:t.bodyTag,bodyTextVariant:t.bodyTextVariant,subtitle:t.subtitle,subtitleTag:t.subtitleTag,subtitleTextVariant:t.subtitleTextVariant,title:t.title,titleTag:t.titleTag})),w=E(()=>({bgVariant:t.footerBgVariant,borderVariant:t.footerBorderVariant,html:t.footerHtml,tag:t.footerTag,textVariant:t.footerTextVariant})),C=E(()=>({src:t.imgSrc,alt:t.imgAlt,height:t.imgHeight,width:t.imgWidth,bottom:t.imgBottom,end:t.imgEnd,left:t.imgLeft,right:t.imgRight,start:t.imgStart,top:t.imgTop}));return(k,x)=>(A(),re(Ve(e.tag),{class:ne(["card",b(p)])},{default:me(()=>[b(s)?xe("",!0):U(k.$slots,"img",{key:0},()=>[e.imgSrc?(A(),re(rl,Ot(Le({key:0},b(C))),null,16)):xe("",!0)]),e.header||b(d)||e.headerHtml?(A(),re(Ay,Le({key:1},b(m),{class:e.headerClass}),{default:me(()=>[U(k.$slots,"header",{},()=>[Fe(Ee(e.header),1)])]),_:3},16,["class"])):xe("",!0),b(u)?U(k.$slots,"default",{key:3},()=>[Fe(Ee(e.bodyText),1)]):(A(),re(ky,Le({key:2},b(v),{class:e.bodyClass}),{default:me(()=>[U(k.$slots,"default",{},()=>[Fe(Ee(e.bodyText),1)])]),_:3},16,["class"])),e.footer||b(c)||e.footerHtml?(A(),re($y,Le({key:4},b(w),{class:e.footerClass}),{default:me(()=>[U(k.$slots,"footer",{},()=>[Fe(Ee(e.footer),1)])]),_:3},16,["class"])):xe("",!0),b(s)?U(k.$slots,"img",{key:5},()=>[e.imgSrc?(A(),re(rl,Ot(Le({key:0},b(C))),null,16)):xe("",!0)]):xe("",!0)]),_:3},8,["class"]))}}),QI=Z({__name:"BCardGroup",props:{columns:{default:!1},deck:{default:!1},tag:{default:"div"}},setup(e){const t=e,n=S(_(t,"columns")),s=S(_(t,"deck")),r=E(()=>s.value?"card-deck":n.value?"card-columns":"card-group"),i=E(()=>[r.value]);return(o,l)=>(A(),re(Ve(e.tag),{class:ne(b(i))},{default:me(()=>[U(o.$slots,"default")]),_:3},8,["class"]))}}),ZI=Z({__name:"BCardText",props:{text:null,tag:{default:"p"}},setup(e){return(t,n)=>(A(),re(Ve(e.tag),{class:"card-text"},{default:me(()=>[U(t.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]),_:3}))}}),eP=["id"],tP={key:0,class:"carousel-indicators"},nP=["data-bs-target","data-bs-slide-to","aria-label"],sP={class:"carousel-inner"},rP=["data-bs-target"],iP=_e("span",{class:"carousel-control-prev-icon","aria-hidden":"true"},null,-1),oP={class:"visually-hidden"},aP=["data-bs-target"],lP=_e("span",{class:"carousel-control-next-icon","aria-hidden":"true"},null,-1),uP={class:"visually-hidden"},By=Symbol(),cP=Z({__name:"BCarousel",props:{startingSlide:{default:0},id:null,imgHeight:null,imgWidth:null,background:null,modelValue:{default:0},controls:{default:!1},indicators:{default:!1},interval:{default:5e3},noTouch:{default:!1},noWrap:{default:!1},controlsPrevText:{default:"Previous"},controlsNextText:{default:"Next"},indicatorsButtonLabel:{default:"Slide"}},emits:["sliding-start","sliding-end"],setup(e,{emit:t}){const n=e,s=Ht(),r=Dt(_(n,"id"),"carousel"),i=S(_(n,"controls")),o=S(_(n,"indicators")),l=S(_(n,"noTouch"));S(_(n,"noWrap"));const u=ke(),d=ke(),c=ke([]);return nn(u,"slide.bs.carousel",p=>t("sliding-start",p)),nn(u,"slid.bs.carousel",p=>t("sliding-end",p)),$t(()=>{d.value=new Li(u.value,{wrap:!l.value,interval:n.interval,touch:!l.value}),s.default&&(c.value=s.default().filter(p=>{var m;return((m=p.type)==null?void 0:m.__name)==="BCarouselSlide"}))}),rs(By,{background:n.background,width:n.imgWidth,height:n.imgHeight}),(p,m)=>(A(),H("div",{id:b(r),ref_key:"element",ref:u,class:"carousel slide","data-bs-ride":"carousel"},[b(o)?(A(),H("div",tP,[(A(!0),H(Re,null,ht(c.value,(v,w)=>(A(),H("button",{key:w,type:"button","data-bs-target":`#${b(r)}`,"data-bs-slide-to":w,class:ne(w===e.startingSlide?"active":""),"aria-current":"true","aria-label":`${e.indicatorsButtonLabel} ${w}`},null,10,nP))),128))])):xe("",!0),_e("div",sP,[U(p.$slots,"default")]),b(i)?(A(),H(Re,{key:1},[_e("button",{class:"carousel-control-prev",type:"button","data-bs-target":`#${b(r)}`,"data-bs-slide":"prev"},[iP,_e("span",oP,Ee(e.controlsPrevText),1)],8,rP),_e("button",{class:"carousel-control-next",type:"button","data-bs-target":`#${b(r)}`,"data-bs-slide":"next"},[lP,_e("span",uP,Ee(e.controlsNextText),1)],8,aP)],64)):xe("",!0)],8,eP))}}),dP=["data-bs-interval"],fP=["innerHTML"],pP={key:1},hP=["innerHTML"],mP={key:1},gP=Z({__name:"BCarouselSlide",props:{imgSrc:null,imgHeight:null,imgWidth:null,interval:null,active:{default:!1},background:null,caption:null,captionHtml:null,captionTag:{default:"h3"},contentTag:{default:"div"},contentVisibleUp:null,id:null,imgAlt:null,imgBlank:{default:!1},imgBlankColor:{default:"transparent"},text:null,textHtml:null,textTag:{default:"p"}},setup(e){const t=e,n=Ht(),s=Ct(By,{}),r=S(_(t,"active")),i=E(()=>!bn(n.default)),o=E(()=>({background:`${t.background||s.background||"rgb(171, 171, 171)"} none repeat scroll 0% 0%`})),l=E(()=>({"d-none":t.contentVisibleUp!==void 0,[`d-${t.contentVisibleUp}-block`]:t.contentVisibleUp!==void 0})),u=E(()=>s.width),d=E(()=>s.height);return(c,p)=>(A(),H("div",{class:ne(["carousel-item",{active:b(r)}]),"data-bs-interval":e.interval,style:Lt(b(o))},[U(c.$slots,"img",{},()=>[Ye(Kd,{class:"d-block w-100",alt:e.imgAlt,src:e.imgSrc,width:e.imgWidth||b(u),height:e.imgHeight||b(d),blank:e.imgBlank,"blank-color":e.imgBlankColor},null,8,["alt","src","width","height","blank","blank-color"])]),e.caption||e.captionHtml||e.text||e.textHtml||b(i)?(A(),re(Ve(e.contentTag),{key:0,class:ne(["carousel-caption",b(l)])},{default:me(()=>[e.caption||e.captionHtml?(A(),re(Ve(e.captionTag),{key:0},{default:me(()=>[e.captionHtml?(A(),H("span",{key:0,innerHTML:e.captionHtml},null,8,fP)):(A(),H("span",pP,Ee(e.caption),1))]),_:1})):xe("",!0),e.text||e.textHtml?(A(),re(Ve(e.textTag),{key:1},{default:me(()=>[e.textHtml?(A(),H("span",{key:0,innerHTML:e.textHtml},null,8,hP)):(A(),H("span",mP,Ee(e.text),1))]),_:1})):xe("",!0),U(c.$slots,"default")]),_:3},8,["class"])):xe("",!0)],14,dP))}}),Xm=Vl("",[],{type:[Boolean,String,Number],default:!1}),Jm=Vl("offset",[""],{type:[String,Number],default:null}),Qm=Vl("order",[""],{type:[String,Number],default:null}),vP=Z({name:"BCol",props:{col:{type:[Boolean,String],default:!1},cols:{type:[String,Number],default:null},...Xm,offset:{type:[String,Number],default:null},...Jm,order:{type:[String,Number],default:null},...Qm,alignSelf:{type:String,default:null},tag:{type:String,default:"div"}},setup(e){const t=[{content:Xm,propPrefix:"cols",classPrefix:"col"},{content:Jm,propPrefix:"offset"},{content:Qm,propPrefix:"order"}],n=S(_(e,"col")),s=E(()=>t.flatMap(r=>ly(e,r.content,r.propPrefix,r.classPrefix)));return{computedClasses:E(()=>[s.value,{col:n.value||!s.value.some(r=>/^col-/.test(r))&&!e.cols,[`col-${e.cols}`]:!!e.cols,[`offset-${e.offset}`]:!!e.offset,[`order-${e.order}`]:!!e.order,[`align-self-${e.alignSelf}`]:!!e.alignSelf}])}}});function bP(e,t,n,s,r,i){return A(),re(Ve(e.tag),{class:ne(e.computedClasses)},{default:me(()=>[U(e.$slots,"default")]),_:3},8,["class"])}const to=on(vP,[["render",bP]]),ti={autoHide:!0,delay:5e3,noCloseButton:!1,pos:"top-right",value:!0};class Zm{constructor(t){Tt(this,"vm"),Tt(this,"containerPositions"),ws(t)?this.vm=t:this.vm=rn(t),this.containerPositions=E(()=>{const n=new Set([]);return this.vm.toasts.map(s=>{s.options.pos&&n.add(s.options.pos)}),n})}toasts(t){return E(t?()=>this.vm.toasts.filter(n=>{if(n.options.pos===t&&n.options.value)return n}):()=>this.vm.toasts)}remove(...t){this.vm.toasts=this.vm.toasts.filter(n=>{if(n.options.id&&!t.includes(n.options.id))return n})}isRoot(){var t;return(t=this.vm.root)!=null?t:!1}show(t,n=ti){const s={id:ys(),...ti,...n},r={options:rn(s),content:t};return this.vm.toasts.push(r),r}info(t,n=ti){return this.show(t,{variant:"info",...n})}danger(t,n=ti){return this.show(t,{variant:"danger",...n})}warning(t,n=ti){return this.show(t,{variant:"warning",...n})}success(t,n=ti){return this.show(t,{variant:"success",...n})}hide(){}}class _P{constructor(){Tt(this,"vms"),Tt(this,"rootInstance"),Tt(this,"useToast",Py),this.vms={}}getOrCreateViewModel(t){if(!t){if(this.rootInstance)return this.vms[this.rootInstance];const n={root:!0,toasts:[],container:void 0,id:Symbol("toast")};return this.rootInstance=n.id,this.vms[n.id]=n,n}if(t.root){if(this.rootInstance)return this.vms[this.rootInstance];this.rootInstance=t.id}return this.vms[t.id]=t,t}getVM(t){if(!t&&this.rootInstance)return this.vms[this.rootInstance];if(t)return this.vms[t]}}const jc=Symbol(),Iy=Symbol(),yP={container:void 0,toasts:[],root:!1};function wP(){return Ct(Iy)}function Py(e,t=jc){const n=Ct(wP());if(!e)return new Zm(n.getOrCreateViewModel());const s={id:Symbol("toastInstance")},r={...yP,...s,...e},i=n.getOrCreateViewModel(r);return new Zm(i)}const EP={install:(e,t={})=>{var n,s,r,i;e.provide(Iy,(s=(n=t==null?void 0:t.BToast)==null?void 0:n.injectkey)!=null?s:jc),e.provide((i=(r=t==null?void 0:t.BToast)==null?void 0:r.injectkey)!=null?i:jc,new _P)}},TP="toast-title",eg=1e3,Ly=Z({components:{BLink:_n},props:{...Rr,delay:{type:Number,default:5e3},bodyClass:{type:String},body:{type:[Object,String]},headerClass:{type:String},headerTag:{type:String,default:"div"},animation:{type:[Boolean,String],default:!0},id:{type:String},isStatus:{type:[Boolean,String],default:!1},autoHide:{type:[Boolean,String],default:!0},noCloseButton:{type:[Boolean,String],default:!1},noFade:{type:[Boolean,String],default:!1},noHoverPause:{type:[Boolean,String],default:!1},solid:{type:[Boolean,String],default:!1},static:{type:[Boolean,String],default:!1},title:{type:String},modelValue:{type:[Boolean,String],default:!1},toastClass:{type:Array},variant:{type:String}},emits:["destroyed","update:modelValue"],setup(e,{emit:t,slots:n}){S(_(e,"animation"));const s=S(_(e,"isStatus")),r=S(_(e,"autoHide")),i=S(_(e,"noCloseButton")),o=S(_(e,"noFade")),l=S(_(e,"noHoverPause"));S(_(e,"solid")),S(_(e,"static"));const u=S(_(e,"modelValue")),d=ke(!1),c=ke(!1),p=ke(!1),m=E(()=>({[`b-toast-${e.variant}`]:e.variant!==void 0,show:p.value||d.value}));let v,w,C;const k=()=>{typeof v>"u"||(clearTimeout(v),v=void 0)},x=E(()=>Math.max(Us(e.delay,0),eg)),O=()=>{u.value&&(w=C=0,k(),c.value=!0,wa(()=>{p.value=!1}))},I=()=>{k(),t("update:modelValue",!0),w=C=0,c.value=!1,hn(()=>{wa(()=>{p.value=!0})})},N=()=>{if(!r.value||l.value||!v||C)return;const X=Date.now()-w;X>0&&(k(),C=Math.max(x.value-X,eg))},B=()=>{(!r.value||l.value||!C)&&(C=w=0),L()};dt(()=>u.value,X=>{X?I():O()});const L=()=>{k(),r.value&&(v=setTimeout(O,C||x.value),w=Date.now(),C=0)},j=()=>{d.value=!0,t("update:modelValue",!0)},F=()=>{d.value=!1,L()},$=()=>{d.value=!0},M=()=>{d.value=!1,C=w=0,t("update:modelValue",!1)};dd(()=>{k(),r.value&&t("destroyed",e.id)}),$t(()=>{hn(()=>{u.value&&wa(()=>{I()})})});const Q=()=>{hn(()=>{wa(()=>{O()})})};return()=>{const X=()=>{const ae=[],Oe=On(TP,{hide:O},n);Oe?ae.push(Ke(Oe)):e.title&&ae.push(Ke("strong",{class:"me-auto"},e.title)),!i.value&&ae.length!==0&&ae.push(Ke(Di,{class:["btn-close"],onClick:()=>{O()}}));const ge=[];if(ae.length>0&&ge.push(Ke(e.headerTag,{class:"toast-header"},{default:()=>ae})),On("default",{hide:O},n)||e.body){const be=Ke(Oo(e)?"b-link":"div",{class:["toast-body",e.bodyClass],onClick:Oo(e)?{click:Q}:{}},On("default",{hide:O},n)||e.body);ge.push(be)}return Ke("div",{class:["toast",e.toastClass,m.value],tabindex:"0"},ge)};return Ke("div",{class:["b-toast"],id:e.id,role:c.value?null:s.value?"status":"alert","aria-live":c.value?null:s.value?"polite":"assertive","aria-atomic":c.value?null:"true",onmouseenter:N,onmouseleave:B},[Ke(jo,{noFade:o.value,onAfterEnter:F,onBeforeEnter:j,onAfterLeave:M,onBeforeLeave:$},()=>[p.value?X():""])])}}}),zc=Z({__name:"BToaster",props:{position:{default:"top-right"},instance:null},setup(e){const t=e,n={"top-left":"top-0 start-0","top-center":"top-0 start-50 translate-middle-x","top-right":"top-0 end-0","middle-left":"top-50 start-0 translate-middle-y","middle-center":"top-50 start-50 translate-middle","middle-right":"top-50 end-0 translate-middle-y","bottom-left":"bottom-0 start-0","bottom-center":"bottom-0 start-50 translate-middle-x","bottom-right":"bottom-0 end-0"},s=E(()=>n[t.position]),r=i=>{var o;(o=t.instance)==null||o.remove(i)};return(i,o)=>{var l;return A(),H("div",{class:ne([[b(s)],"b-toaster position-fixed p-3"]),style:{"z-index":"11"}},[(A(!0),H(Re,null,ht((l=e.instance)==null?void 0:l.toasts(e.position).value,u=>(A(),re(Ly,{id:u.options.id,key:u.options.id,modelValue:u.options.value,"onUpdate:modelValue":d=>u.options.value=d,"auto-hide":u.options.autoHide,delay:u.options.delay,"no-close-button":u.options.noCloseButton,title:u.content.title,body:u.content.body,component:u.content.body,variant:u.options.variant,onDestroyed:r},null,8,["id","modelValue","onUpdate:modelValue","auto-hide","delay","no-close-button","title","body","component","variant"]))),128))],2)}}}),CP=Z({props:{gutterX:{type:String,default:null},gutterY:{type:String,default:null},fluid:{type:[Boolean,String],default:!1},toast:{type:Object},position:{type:String,required:!1}},setup(e,{slots:t,expose:n}){const s=ke();let r;const i=E(()=>({container:!e.fluid,"container-fluid":typeof e.fluid=="boolean"&&e.fluid,[`container-${e.fluid}`]:typeof e.fluid=="string",[`gx-${e.gutterX}`]:e.gutterX!==null,[`gy-${e.gutterY}`]:e.gutterY!==null}));return $t(()=>{e.toast}),e.toast&&(r=Py({container:s,root:e.toast.root}),n({})),()=>{var o;const l=[];return r==null||r.containerPositions.value.forEach(u=>{l.push(Ke(zc,{key:u,instance:r,position:u}))}),Ke("div",{class:[i.value,e.position],ref:s},[...l,(o=t.default)==null?void 0:o.call(t)])}},methods:{}}),SP={class:"visually-hidden"},AP=["aria-labelledby","role"],Dy=Z({__name:"BDropdown",props:{id:null,menuClass:null,size:null,splitClass:null,splitVariant:null,text:null,toggleClass:null,autoClose:{type:[Boolean,String],default:!0},block:{default:!1},boundary:{default:"clippingParents"},dark:{default:!1},disabled:{default:!1},isNav:{default:!1},dropup:{default:!1},dropright:{default:!1},dropleft:{default:!1},noFlip:{default:!1},offset:{default:0},popperOpts:{default:()=>({})},right:{default:!1},role:{default:"menu"},split:{default:!1},splitButtonType:{default:"button"},splitHref:{default:void 0},noCaret:{default:!1},toggleText:{default:"Toggle dropdown"},variant:{default:"secondary"}},emits:["show","shown","hide","hidden","click","toggle"],setup(e,{expose:t,emit:n}){const s=e,r=Dt(_(s,"id"),"dropdown"),i=S(_(s,"block")),o=S(_(s,"dark")),l=S(_(s,"dropup")),u=S(_(s,"dropright")),d=S(_(s,"isNav")),c=S(_(s,"dropleft")),p=S(_(s,"right")),m=S(_(s,"split")),v=S(_(s,"noCaret")),w=ke(),C=ke(),k=ke(),x=E(()=>({"d-grid":i.value,"d-flex":i.value&&m.value})),O=E(()=>[m.value?s.splitClass:s.toggleClass,{"nav-link":d.value,"dropdown-toggle":!m.value,"dropdown-toggle-no-caret":v.value&&!m.value,"w-100":m.value&&i.value}]),I=E(()=>[s.menuClass,{"dropdown-menu-dark":o.value,"dropdown-menu-end":p.value}]),N=E(()=>({"data-bs-toggle":m.value?void 0:"dropdown","aria-expanded":m.value?void 0:!1,ref:m.value?void 0:C,href:m.value?s.splitHref:void 0})),B=E(()=>({ref:m.value?C:void 0})),L=()=>{var F;(F=k.value)==null||F.hide()},j=F=>{m.value&&n("click",F)};return nn(w,"show.bs.dropdown",()=>n("show")),nn(w,"shown.bs.dropdown",()=>n("shown")),nn(w,"hide.bs.dropdown",()=>n("hide")),nn(w,"hidden.bs.dropdown",()=>n("hidden")),$t(()=>{var F;k.value=new zn((F=C.value)==null?void 0:F.$el,{autoClose:s.autoClose,boundary:s.boundary,offset:s.offset?s.offset.toString():"",reference:s.offset||m.value?"parent":"toggle",popperConfig:$=>{const M={placement:"bottom-start",modifiers:s.noFlip?[{name:"flip",options:{fallbackPlacements:[]}}]:[]};return l.value?M.placement=p.value?"top-end":"top-start":u.value?M.placement="right-start":c.value?M.placement="left-start":p.value&&(M.placement="bottom-end"),Mc($,Mc(M,s.popperOpts))}})}),t({hide:L}),(F,$)=>(A(),H("div",{ref_key:"parent",ref:w,class:ne([b(x),"btn-group"])},[Ye(xi,Le({id:b(r),variant:e.splitVariant||e.variant,size:e.size,class:b(O),disabled:e.disabled,type:e.splitButtonType},b(N),{onClick:j}),{default:me(()=>[U(F.$slots,"button-content",{},()=>[Fe(Ee(e.text),1)])]),_:3},16,["id","variant","size","class","disabled","type"]),b(m)?(A(),re(xi,Le({key:0,variant:e.variant,size:e.size,disabled:e.disabled},b(B),{class:[e.toggleClass,"dropdown-toggle-split dropdown-toggle"],"data-bs-toggle":"dropdown","aria-expanded":"false",onClick:$[0]||($[0]=M=>n("toggle"))}),{default:me(()=>[_e("span",SP,[U(F.$slots,"toggle-text",{},()=>[Fe(Ee(e.toggleText),1)])])]),_:3},16,["variant","size","disabled","class"])):xe("",!0),_e("ul",{class:ne(["dropdown-menu",b(I)]),"aria-labelledby":b(r),role:e.role},[U(F.$slots,"default")],10,AP)],2))}}),xP={role:"presentation"},OP=Z({__name:"BDropdownDivider",props:{tag:{default:"hr"}},setup(e){return(t,n)=>(A(),H("li",xP,[(A(),re(Ve(e.tag),{class:"dropdown-divider",role:"separator","aria-orientation":"horizontal"}))]))}}),kP={},$P={role:"presentation"},NP={class:"px-4 py-3"};function BP(e,t){return A(),H("li",$P,[_e("form",NP,[U(e.$slots,"default")])])}const IP=on(kP,[["render",BP]]),PP={role:"presentation"},LP=["id","aria-describedby"],DP={inheritAttrs:!1},RP=Z({...DP,__name:"BDropdownGroup",props:{id:null,ariaDescribedby:null,header:null,headerClass:null,headerTag:{default:"header"},headerVariant:null},setup(e){const t=e,n=E(()=>t.id?`${t.id}_group_dd_header`:void 0),s=E(()=>t.headerTag==="header"?void 0:"heading"),r=E(()=>[t.headerClass,{[`text-${t.headerVariant}`]:t.headerVariant!==void 0}]);return(i,o)=>(A(),H("li",PP,[(A(),re(Ve(e.headerTag),{id:b(n),class:ne(["dropdown-header",b(r)]),role:b(s)},{default:me(()=>[U(i.$slots,"header",{},()=>[Fe(Ee(e.header),1)])]),_:3},8,["id","class","role"])),_e("ul",Le({id:e.id,role:"group",class:"list-unstyled"},i.$attrs,{"aria-describedby":e.ariaDescribedby||b(n)}),[U(i.$slots,"default")],16,LP)]))}}),VP={},MP={class:"dropdown-header"};function FP(e,t){return A(),H("li",null,[_e("h6",MP,[U(e.$slots,"default")])])}const HP=on(VP,[["render",FP]]),jP={inheritAttrs:!1},zP=Z({...jP,__name:"BDropdownItem",props:{href:null,linkClass:null,active:{default:!1},disabled:{default:!1},rel:{default:void 0},target:{default:"_self"},variant:null},emits:["click"],setup(e,{emit:t}){const n=e,s=S(_(n,"active")),r=S(_(n,"disabled")),i=fv(),o=E(()=>[n.linkClass,{active:s.value,disabled:r.value,[`text-${n.variant}`]:n.variant!==void 0}]),l=E(()=>n.href?"a":i.to?_n:"button"),u=E(()=>({disabled:r.value,"aria-current":s.value?"true":null,href:l.value==="a"?n.href:null,rel:n.rel,type:l.value==="button"?"button":null,target:n.target,...i.to?{activeClass:"active",...i}:{}})),d=c=>t("click",c);return(c,p)=>(A(),H("li",{role:"presentation",class:ne(c.$attrs.class)},[(A(),re(Ve(b(l)),Le({class:["dropdown-item",b(o)]},b(u),{onClick:d}),{default:me(()=>[U(c.$slots,"default")]),_:3},16,["class"]))],2))}}),UP=["disabled"],qP={inheritAttrs:!1},WP=Z({...qP,__name:"BDropdownItemButton",props:{buttonClass:null,active:{default:!1},activeClass:{default:"active"},disabled:{default:!1},variant:null},emits:["click"],setup(e,{emit:t}){const n=e,s=S(_(n,"active")),r=S(_(n,"disabled")),i=E(()=>[n.buttonClass,{[n.activeClass]:s.value,disabled:r.value,[`text-${n.variant}`]:n.variant!==void 0}]),o=l=>t("click",l);return(l,u)=>(A(),H("li",{role:"presentation",class:ne(l.$attrs.class)},[_e("button",{role:"menu",type:"button",class:ne(["dropdown-item",b(i)]),disabled:b(r),onClick:o},[U(l.$slots,"default")],10,UP)],2))}}),KP={role:"presentation"},GP={class:"px-4 py-1 mb-0 text-muted"},YP=Z({__name:"BDropdownText",props:{text:{default:""}},setup(e){return(t,n)=>(A(),H("li",KP,[_e("p",GP,[U(t.$slots,"default",{},()=>[Fe(Ee(e.text),1)])])]))}}),XP=["id","novalidate","onSubmit"],Ry=Z({__name:"BForm",props:{id:null,floating:{default:!1},novalidate:{default:!1},validated:{default:!1}},emits:["submit"],setup(e,{emit:t}){const n=e,s=S(_(n,"floating")),r=S(_(n,"novalidate")),i=S(_(n,"validated")),o=E(()=>({"form-floating":s.value,"was-validated":i.value})),l=u=>t("submit",u);return(u,d)=>(A(),H("form",{id:e.id,novalidate:b(r),class:ne(b(o)),onSubmit:vl(l,["prevent"])},[U(u.$slots,"default")],42,XP))}}),JP={class:"form-floating"},QP=["for"],ZP=Z({__name:"BFormFloatingLabel",props:{labelFor:null,label:null,text:null},setup(e){return(t,n)=>(A(),H("div",JP,[U(t.$slots,"default",{},()=>[Fe(Ee(e.text),1)]),_e("label",{for:e.labelFor},[U(t.$slots,"label",{},()=>[Fe(Ee(e.label),1)])],8,QP)]))}}),Uc=Z({__name:"BFormInvalidFeedback",props:{ariaLive:null,forceShow:{default:!1},id:null,text:null,role:null,state:{default:void 0},tag:{default:"div"},tooltip:{default:!1}},setup(e){const t=e,n=S(_(t,"forceShow")),s=S(_(t,"state")),r=S(_(t,"tooltip")),i=E(()=>n.value===!0||s.value===!1),o=E(()=>({"d-block":i.value,"invalid-feedback":!r.value,"invalid-tooltip":r.value})),l=E(()=>({id:t.id,role:t.role,"aria-live":t.ariaLive,"aria-atomic":t.ariaLive?"true":void 0}));return(u,d)=>(A(),re(Ve(e.tag),Le({class:b(o)},b(l)),{default:me(()=>[U(u.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]),_:3},16,["class"]))}}),Ra=Z({__name:"BFormRow",props:{tag:{default:"div"}},setup(e){return(t,n)=>(A(),re(Ve(e.tag),{class:"row d-flex flex-wrap"},{default:me(()=>[U(t.$slots,"default")]),_:3}))}}),qc=Z({__name:"BFormText",props:{id:null,inline:{default:!1},tag:{default:"small"},text:null,textVariant:{default:"muted"}},setup(e){const t=e,n=S(_(t,"inline")),s=E(()=>[[`text-${t.textVariant}`],{"form-text":!n.value}]);return(r,i)=>(A(),re(Ve(e.tag),{id:e.id,class:ne(b(s))},{default:me(()=>[U(r.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]),_:3},8,["id","class"]))}}),Wc=Z({__name:"BFormValidFeedback",props:{ariaLive:null,forceShow:{default:!1},id:null,role:null,text:null,state:{default:void 0},tag:{default:"div"},tooltip:{default:!1}},setup(e){const t=e,n=S(_(t,"forceShow")),s=S(_(t,"state")),r=S(_(t,"tooltip")),i=E(()=>n.value===!0||s.value===!0),o=E(()=>({"d-block":i.value,"valid-feedback":!r.value,"valid-tooltip":r.value})),l=E(()=>t.ariaLive?"true":void 0);return(u,d)=>(A(),re(Ve(e.tag),{id:e.id,role:e.role,"aria-live":e.ariaLive,"aria-atomic":b(l),class:ne(b(o))},{default:me(()=>[U(u.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]),_:3},8,["id","role","aria-live","aria-atomic","class"]))}}),eL=["id","disabled","required","name","form","aria-label","aria-labelledby","aria-required","value","indeterminate"],tL=["for"],nL={inheritAttrs:!1},Vy=Z({...nL,__name:"BFormCheckbox",props:{ariaLabel:null,ariaLabelledBy:null,form:null,indeterminate:null,name:null,id:{default:void 0},autofocus:{default:!1},plain:{default:!1},button:{default:!1},switch:{default:!1},disabled:{default:!1},buttonVariant:{default:"secondary"},inline:{default:!1},required:{default:void 0},size:{default:"md"},state:{default:void 0},uncheckedValue:{type:[Array,Set,Boolean,String,Object,Number],default:!1},value:{type:[Array,Set,Boolean,String,Object,Number],default:!0},modelValue:{type:[Array,Set,Boolean,String,Object,Number],default:void 0}},emits:["update:modelValue","input","change"],setup(e,{emit:t}){const n=e,s=Ht(),r=Dt(_(n,"id"),"form-check"),i=S(_(n,"indeterminate")),o=S(_(n,"autofocus")),l=S(_(n,"plain")),u=S(_(n,"button")),d=S(_(n,"switch")),c=S(_(n,"disabled")),p=S(_(n,"inline")),m=S(_(n,"required")),v=S(_(n,"state")),w=ke(null),C=ke(!1),k=E(()=>!bn(s.default)),x=E({get:()=>n.uncheckedValue?Array.isArray(n.modelValue)?n.modelValue.indexOf(n.value)>-1:n.modelValue===n.value:n.modelValue,set:j=>{let F=j;Array.isArray(n.modelValue)?n.uncheckedValue&&(F=n.modelValue,j?(F.indexOf(n.uncheckedValue)>-1&&F.splice(F.indexOf(n.uncheckedValue),1),F.push(n.value)):(F.indexOf(n.value)>-1&&F.splice(F.indexOf(n.value),1),F.push(n.uncheckedValue))):F=j?n.value:n.uncheckedValue,t("input",F),t("update:modelValue",F),t("change",F)}}),O=E(()=>Array.isArray(n.modelValue)?n.modelValue.indexOf(n.value)>-1:JSON.stringify(n.modelValue)===JSON.stringify(n.value)),I=rn({plain:_(l,"value"),button:_(u,"value"),inline:_(p,"value"),switch:_(d,"value"),size:_(n,"size"),state:_(v,"value"),buttonVariant:_(n,"buttonVariant")}),N=dy(I),B=fy(I),L=py(I);return $t(()=>{o.value&&w.value.focus()}),(j,F)=>(A(),H("div",{class:ne(b(N))},[ki(_e("input",Le({id:b(r)},j.$attrs,{ref_key:"input",ref:w,"onUpdate:modelValue":F[0]||(F[0]=$=>mt(x)?x.value=$:null),class:b(B),type:"checkbox",disabled:b(c),required:!!e.name&&!!b(m),name:e.name,form:e.form,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-required":e.name&&b(m)?"true":void 0,value:e.value,indeterminate:b(i),onFocus:F[1]||(F[1]=$=>C.value=!0),onBlur:F[2]||(F[2]=$=>C.value=!1)}),null,16,eL),[[wT,b(x)]]),b(k)||!b(l)?(A(),H("label",{key:0,for:b(r),class:ne([b(L),{active:b(O),focus:C.value}])},[U(j.$slots,"default")],10,tL)):xe("",!0)],2))}}),sL=["id"],rL=["innerHTML"],iL=["textContent"],oL=Z({__name:"BFormCheckboxGroup",props:{id:null,form:null,modelValue:{default:()=>[]},ariaInvalid:{default:void 0},autofocus:{default:!1},buttonVariant:{default:"secondary"},buttons:{default:!1},disabled:{default:!1},disabledField:{default:"disabled"},htmlField:{default:"html"},name:null,options:{default:()=>[]},plain:{default:!1},required:{default:!1},size:null,stacked:{default:!1},state:{default:void 0},switches:{default:!1},textField:{default:"text"},validated:{default:!1},valueField:{default:"value"}},emits:["input","update:modelValue","change"],setup(e,{emit:t}){const n=e,s=Ht(),r="BFormCheckbox",i=Dt(_(n,"id"),"checkbox"),o=Dt(_(n,"name"),"checkbox");S(_(n,"autofocus"));const l=S(_(n,"buttons")),u=S(_(n,"disabled"));S(_(n,"plain"));const d=S(_(n,"required")),c=S(_(n,"stacked")),p=S(_(n,"state")),m=S(_(n,"switches")),v=S(_(n,"validated")),w=E({get:()=>n.modelValue,set:I=>{if(JSON.stringify(I)===JSON.stringify(n.modelValue))return;const N=n.options.filter(B=>I.map(L=>JSON.stringify(L)).includes(JSON.stringify(typeof B=="string"?B:B[n.valueField]))).map(B=>typeof B=="string"?B:B[n.valueField]);t("input",N),t("update:modelValue",N),t("change",N)}}),C=E(()=>(s.first?sl(s.first(),r,u.value):[]).concat(n.options.map(I=>gy(I,n))).concat(s.default?sl(s.default(),r,u.value):[]).map((I,N)=>vy(I,N,n,o,i)).map(I=>({...I,props:{switch:m.value,...I.props}}))),k=rn({required:_(d,"value"),ariaInvalid:_(n,"ariaInvalid"),state:_(p,"value"),validated:_(v,"value"),buttons:_(l,"value"),stacked:_(c,"value"),size:_(n,"size")}),x=hy(k),O=my(k);return(I,N)=>(A(),H("div",Le(b(x),{id:b(i),role:"group",class:[b(O),"bv-no-focus-ring"],tabindex:"-1"}),[(A(!0),H(Re,null,ht(b(C),(B,L)=>(A(),re(Vy,Le({key:L,modelValue:b(w),"onUpdate:modelValue":N[0]||(N[0]=j=>mt(w)?w.value=j:null)},B.props),{default:me(()=>[B.html?(A(),H("span",{key:0,innerHTML:B.html},null,8,rL)):(A(),H("span",{key:1,textContent:Ee(B.text)},null,8,iL))]),_:2},1040,["modelValue"]))),128))],16,sL))}}),My=["input","select","textarea"],aL=My.map(e=>`${e}:not([disabled])`).join(),lL=[...My,"a","button","label"],uL="label",cL="invalid-feedback",dL="valid-feedback",fL="description",pL="default",hL=Z({components:{BCol:to,BFormInvalidFeedback:Uc,BFormRow:Ra,BFormText:qc,BFormValidFeedback:Wc},props:{contentCols:{type:[Boolean,String,Number],required:!1},contentColsLg:{type:[Boolean,String,Number],required:!1},contentColsMd:{type:[Boolean,String,Number],required:!1},contentColsSm:{type:[Boolean,String,Number],required:!1},contentColsXl:{type:[Boolean,String,Number],required:!1},description:{type:[String],required:!1},disabled:{type:[Boolean,String],default:!1},feedbackAriaLive:{type:String,default:"assertive"},id:{type:String,required:!1},invalidFeedback:{type:String,required:!1},label:{type:String,required:!1},labelAlign:{type:[Boolean,String,Number],required:!1},labelAlignLg:{type:[Boolean,String,Number],required:!1},labelAlignMd:{type:[Boolean,String,Number],required:!1},labelAlignSm:{type:[Boolean,String,Number],required:!1},labelAlignXl:{type:[Boolean,String,Number],required:!1},labelClass:{type:[Array,Object,String],required:!1},labelCols:{type:[Boolean,String,Number],required:!1},labelColsLg:{type:[Boolean,String,Number],required:!1},labelColsMd:{type:[Boolean,String,Number],required:!1},labelColsSm:{type:[Boolean,String,Number],required:!1},labelColsXl:{type:[Boolean,String,Number],required:!1},labelFor:{type:String,required:!1},labelSize:{type:String,required:!1},labelSrOnly:{type:[Boolean,String],default:!1},state:{type:[Boolean,String],default:null},tooltip:{type:[Boolean,String],default:!1},validFeedback:{type:String,required:!1},validated:{type:[Boolean,String],default:!1},floating:{type:[Boolean,String],default:!1}},setup(e,{attrs:t}){const n=S(_(e,"disabled")),s=S(_(e,"labelSrOnly")),r=S(_(e,"state")),i=S(_(e,"tooltip")),o=S(_(e,"validated")),l=S(_(e,"floating")),u=null,d=["xs","sm","md","lg","xl"],c=(B,L)=>d.reduce((j,F)=>{const $=Um(F==="xs"?"":F,`${L}Align`),M=B[$]||null;return M&&(F==="xs"?j.push(`text-${M}`):j.push(`text-${F}-${M}`)),j},[]),p=(B,L)=>d.reduce((j,F)=>{const $=Um(F==="xs"?"":F,`${L}Cols`);let M=B[$];return M=M===""?!0:M||!1,typeof M!="boolean"&&M!=="auto"&&(M=eo(M,0),M=M>0?M:!1),M&&(F==="xs"?j.cols=M:j[F||(typeof M=="boolean"?"col":"cols")]=M),j},{}),m=ke(),v=(B,L=null)=>{if(ty&&e.labelFor){const j=oy(`#${jB(e.labelFor)}`,m);if(j){const F="aria-describedby",$=(B||"").split(La),M=(L||"").split(La),Q=(zd(j,F)||"").split(La).filter(X=>!M.includes(X)).concat($).filter((X,ae,Oe)=>Oe.indexOf(X)===ae).filter(X=>X).join(" ").trim();Q?sI(j,F,Q):rI(j,F)}}},w=E(()=>p(e,"content")),C=E(()=>c(e,"label")),k=E(()=>p(e,"label")),x=E(()=>Object.keys(w.value).length>0||Object.keys(k.value).length>0),O=E(()=>typeof r.value=="boolean"?r.value:null),I=E(()=>{const B=O.value;return B===!0?"is-valid":B===!1?"is-invalid":null}),N=E(()=>Ml(t.ariaInvalid,r.value));return dt(()=>u,(B,L)=>{B!==L&&v(B,L)}),$t(()=>{hn(()=>{v(u)})}),{disabledBoolean:n,labelSrOnlyBoolean:s,stateBoolean:r,tooltipBoolean:i,validatedBoolean:o,floatingBoolean:l,ariaDescribedby:u,computedAriaInvalid:N,contentColProps:w,isHorizontal:x,labelAlignClasses:C,labelColProps:k,onLegendClick:B=>{if(e.labelFor)return;const{target:L}=B,j=L?L.tagName:"";if(lL.indexOf(j)!==-1)return;const F=tI(aL,m).filter(eI);F.length===1&&QB(F[0])},stateClass:I}},render(){const e=this.$props,t=this.$slots,n=Dt(),s=!e.labelFor;let r=null;const i=On(uL,{},t)||e.label,o=i?ys("_BV_label_"):null;if(i||this.isHorizontal){const N=s?"legend":"label";if(this.labelSrOnlyBoolean)i&&(r=Ke(N,{class:"visually-hidden",id:o,for:e.labelFor||null},i)),this.isHorizontal?r=Ke(to,this.labelColProps,{default:()=>r}):r=Ke("div",{},[r]);else{const B={onClick:s?this.onLegendClick:null,...this.isHorizontal?this.labelColProps:{},tag:this.isHorizontal?N:null,id:o,for:e.labelFor||null,tabIndex:s?"-1":null,class:[this.isHorizontal?"col-form-label":"form-label",{"bv-no-focus-ring":s,"col-form-label":this.isHorizontal||s,"pt-0":!this.isHorizontal&&s,"d-block":!this.isHorizontal&&!s,[`col-form-label-${e.labelSize}`]:!!e.labelSize},this.labelAlignClasses,e.labelClass]};this.isHorizontal?r=Ke(to,B,{default:()=>i}):r=Ke(N,B,i)}}let l=null;const u=On(cL,{},t)||this.invalidFeedback,d=u?ys("_BV_feedback_invalid_"):void 0;u&&(l=Ke(Uc,{ariaLive:e.feedbackAriaLive,id:d,state:this.stateBoolean,tooltip:this.tooltipBoolean},{default:()=>u}));let c=null;const p=On(dL,{},t)||this.validFeedback,m=p?ys("_BV_feedback_valid_"):void 0;p&&(c=Ke(Wc,{ariaLive:e.feedbackAriaLive,id:m,state:this.stateBoolean,tooltip:this.tooltipBoolean},{default:()=>p}));let v=null;const w=On(fL,{},t)||this.description,C=w?ys("_BV_description_"):void 0;w&&(v=Ke(qc,{id:C},{default:()=>w}));const k=this.ariaDescribedby=[C,this.stateBoolean===!1?d:null,this.stateBoolean===!0?m:null].filter(N=>N).join(" ")||null,x=[On(pL,{ariaDescribedby:k,descriptionId:C,id:n,labelId:o},t)||"",l,c,v];!this.isHorizontal&&this.floatingBoolean&&x.push(r);let O=Ke("div",{ref:"content",class:[{"form-floating":!this.isHorizontal&&this.floatingBoolean}]},x);this.isHorizontal&&(O=Ke(to,{ref:"content",...this.contentColProps},{default:()=>x}));const I={class:["mb-3",this.stateClass,{"was-validated":this.validatedBoolean}],id:Dt(_(e,"id")).value,disabled:s?this.disabledBoolean:null,role:s?null:"group","aria-invalid":this.computedAriaInvalid,"aria-labelledby":s&&this.isHorizontal?o:null};return this.isHorizontal&&!s?Ke(Ra,I,{default:()=>[r,O]}):Ke(s?"fieldset":"div",I,this.isHorizontal&&s?[Ke(Ra,null,{default:()=>[r,O]})]:this.isHorizontal||!this.floatingBoolean?[r,O]:[O])}}),tg=["text","number","email","password","search","url","tel","date","time","range","color"],mL=Z({props:{...by,max:{type:[String,Number],required:!1},min:{type:[String,Number],required:!1},step:{type:[String,Number],required:!1},type:{type:String,default:"text",validator:e=>tg.includes(e)}},emits:["update:modelValue","change","blur","input"],setup(e,{emit:t}){const{input:n,computedId:s,computedAriaInvalid:r,onInput:i,onChange:o,onBlur:l,focus:u,blur:d}=_y(e,t),c=ke(!1),p=E(()=>{const v=e.type==="range",w=e.type==="color";return{"form-control-highlighted":c.value,"form-range":v,"form-control":w||!e.plaintext&&!v,"form-control-color":w,"form-control-plaintext":e.plaintext&&!v&&!w,[`form-control-${e.size}`]:!!e.size,"is-valid":e.state===!0,"is-invalid":e.state===!1}}),m=E(()=>tg.includes(e.type)?e.type:"text");return{computedClasses:p,localType:m,input:n,computedId:s,computedAriaInvalid:r,onInput:i,onChange:o,onBlur:l,focus:u,blur:d,highlight:()=>{c.value!==!0&&(c.value=!0,setTimeout(()=>{c.value=!1},2e3))}}}}),gL=["id","name","form","type","disabled","placeholder","required","autocomplete","readonly","min","max","step","list","aria-required","aria-invalid"];function vL(e,t,n,s,r,i){return A(),H("input",Le({id:e.computedId,ref:"input",class:e.computedClasses,name:e.name||void 0,form:e.form||void 0,type:e.localType,disabled:e.disabled,placeholder:e.placeholder,required:e.required,autocomplete:e.autocomplete||void 0,readonly:e.readonly||e.plaintext,min:e.min,max:e.max,step:e.step,list:e.type!=="password"?e.list:void 0,"aria-required":e.required?"true":void 0,"aria-invalid":e.computedAriaInvalid},e.$attrs,{onInput:t[0]||(t[0]=o=>e.onInput(o)),onChange:t[1]||(t[1]=o=>e.onChange(o)),onBlur:t[2]||(t[2]=o=>e.onBlur(o))}),null,16,gL)}const bL=on(mL,[["render",vL]]),_L=["id","disabled","required","name","form","aria-label","aria-labelledby","value","aria-required"],yL=["for"],Fy=Z({__name:"BFormRadio",props:{ariaLabel:null,ariaLabelledby:null,form:null,id:null,name:null,size:null,autofocus:{default:!1},modelValue:{type:[Boolean,String,Array,Object,Number],default:void 0},plain:{default:!1},button:{default:!1},switch:{default:!1},disabled:{default:!1},buttonVariant:{default:"secondary"},inline:{default:!1},required:{default:!1},state:{default:void 0},value:{type:[String,Boolean,Object,Number],default:!0}},emits:["input","change","update:modelValue"],setup(e,{emit:t}){const n=e,s=Ht(),r=Dt(_(n,"id"),"form-check"),i=S(_(n,"autofocus")),o=S(_(n,"plain")),l=S(_(n,"button")),u=S(_(n,"switch")),d=S(_(n,"disabled")),c=S(_(n,"inline")),p=S(_(n,"required")),m=S(_(n,"state")),v=ke(null),w=ke(!1),C=E({get:()=>Array.isArray(n.modelValue)?n.modelValue[0]:n.modelValue,set:L=>{const j=L?n.value:!1,F=Array.isArray(n.modelValue)?[j]:j;t("input",F),t("change",F),t("update:modelValue",F)}}),k=E(()=>Array.isArray(n.modelValue)?(n.modelValue||[]).find(L=>L===n.value):JSON.stringify(n.modelValue)===JSON.stringify(n.value)),x=E(()=>!bn(s.default)),O=rn({plain:_(o,"value"),button:_(l,"value"),inline:_(c,"value"),switch:_(u,"value"),size:_(n,"size"),state:_(m,"value"),buttonVariant:_(n,"buttonVariant")}),I=dy(O),N=fy(O),B=py(O);return $t(()=>{i.value&&v.value!==null&&v.value.focus()}),(L,j)=>(A(),H("div",{class:ne(b(I))},[ki(_e("input",Le({id:b(r)},L.$attrs,{ref_key:"input",ref:v,"onUpdate:modelValue":j[0]||(j[0]=F=>mt(C)?C.value=F:null),class:b(N),type:"radio",disabled:b(d),required:!!e.name&&b(p),name:e.name,form:e.form,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,value:e.value,"aria-required":e.name&&b(p)?!0:void 0,onFocus:j[1]||(j[1]=F=>w.value=!0),onBlur:j[2]||(j[2]=F=>w.value=!1)}),null,16,_L),[[ET,b(C)]]),b(x)||b(o)===!1?(A(),H("label",{key:0,for:b(r),class:ne([b(B),{active:b(k),focus:w.value}])},[U(L.$slots,"default")],10,yL)):xe("",!0)],2))}}),wL=["id"],EL=["innerHTML"],TL=["textContent"],CL=Z({__name:"BFormRadioGroup",props:{size:null,form:null,id:null,name:null,modelValue:{type:[String,Boolean,Array,Object,Number],default:""},ariaInvalid:{default:void 0},autofocus:{default:!1},buttonVariant:{default:"secondary"},buttons:{default:!1},disabled:{default:!1},disabledField:{default:"disabled"},htmlField:{default:"html"},options:{default:()=>[]},plain:{default:!1},required:{default:!1},stacked:{default:!1},state:{default:void 0},textField:{default:"text"},validated:{default:!1},valueField:{default:"value"}},emits:["input","update:modelValue","change"],setup(e,{emit:t}){const n=e,s=Ht(),r="BFormRadio",i=Dt(_(n,"id"),"radio"),o=Dt(_(n,"name"),"checkbox");S(_(n,"autofocus"));const l=S(_(n,"buttons")),u=S(_(n,"disabled"));S(_(n,"plain"));const d=S(_(n,"required")),c=S(_(n,"stacked")),p=S(_(n,"state")),m=S(_(n,"validated")),v=E({get:()=>n.modelValue,set:O=>{t("input",O),t("update:modelValue",O),t("change",O)}}),w=E(()=>(s.first?sl(s.first(),r,u.value):[]).concat(n.options.map(O=>gy(O,n))).concat(s.default?sl(s.default(),r,u.value):[]).map((O,I)=>vy(O,I,n,o,i)).map(O=>({...O}))),C=rn({required:_(d,"value"),ariaInvalid:_(n,"ariaInvalid"),state:_(p,"value"),validated:_(m,"value"),buttons:_(l,"value"),stacked:_(c,"value"),size:_(n,"size")}),k=hy(C),x=my(C);return(O,I)=>(A(),H("div",Le(b(k),{id:b(i),role:"radiogroup",class:[b(x),"bv-no-focus-ring"],tabindex:"-1"}),[(A(!0),H(Re,null,ht(b(w),(N,B)=>(A(),re(Fy,Le({key:B,modelValue:b(v),"onUpdate:modelValue":I[0]||(I[0]=L=>mt(v)?v.value=L:null)},N.props),{default:me(()=>[N.html?(A(),H("span",{key:0,innerHTML:N.html},null,8,EL)):(A(),H("span",{key:1,textContent:Ee(N.text)},null,8,TL))]),_:2},1040,["modelValue"]))),128))],16,wL))}}),SL=["value","disabled"],Gd=Z({__name:"BFormSelectOption",props:{value:null,disabled:{default:!1}},setup(e){const t=S(_(e,"disabled"));return(n,s)=>(A(),H("option",{value:e.value,disabled:b(t)},[U(n.$slots,"default")],8,SL))}}),AL=["label"],Hy=Z({__name:"BFormSelectOptionGroup",props:{label:null,disabledField:{default:"disabled"},htmlField:{default:"html"},options:{default:()=>[]},textField:{default:"text"},valueField:{default:"value"}},setup(e){const t=e,n=E(()=>qd(t.options,"BFormSelectOptionGroup",t));return(s,r)=>(A(),H("optgroup",{label:e.label},[U(s.$slots,"first"),(A(!0),H(Re,null,ht(b(n),(i,o)=>(A(),re(Gd,Le({key:o,value:i.value,disabled:i.disabled},s.$attrs,{innerHTML:i.html||i.text}),null,16,["value","disabled","innerHTML"]))),128)),U(s.$slots,"default")],8,AL))}}),xL=["id","name","form","multiple","size","disabled","required","aria-required","aria-invalid"],OL=Z({__name:"BFormSelect",props:{ariaInvalid:{default:void 0},autofocus:{default:!1},disabled:{default:!1},disabledField:{default:"disabled"},form:null,htmlField:{default:"html"},id:null,labelField:{default:"label"},multiple:{default:!1},name:null,options:{default:()=>[]},optionsField:{default:"options"},plain:{default:!1},required:{default:!1},selectSize:{default:0},size:null,state:{default:void 0},textField:{default:"text"},valueField:{default:"value"},modelValue:{default:""}},emits:["input","update:modelValue","change"],setup(e,{expose:t,emit:n}){const s=e,r=Dt(_(s,"id"),"input"),i=S(_(s,"autofocus")),o=S(_(s,"disabled")),l=S(_(s,"multiple")),u=S(_(s,"plain")),d=S(_(s,"required")),c=S(_(s,"state")),p=ke(),m=E(()=>({"form-control":u.value,[`form-control-${s.size}`]:s.size&&u.value,"form-select":!u.value,[`form-select-${s.size}`]:s.size&&!u.value,"is-valid":c.value===!0,"is-invalid":c.value===!1})),v=E(()=>{if(s.selectSize||u.value)return s.selectSize}),w=E(()=>Ml(s.ariaInvalid,c.value)),C=E(()=>qd(s.options,"BFormSelect",s)),k=E({get(){return s.modelValue},set(N){n("change",N),n("update:modelValue",N),n("input",N)}}),x=()=>{var N;o.value||(N=p.value)==null||N.focus()},O=()=>{var N;o.value||(N=p.value)==null||N.blur()},I=()=>{hn(()=>{var N;i.value&&((N=p.value)==null||N.focus())})};return $t(I),fl(I),t({blur:O,focus:x}),(N,B)=>ki((A(),H("select",Le({id:b(r),ref_key:"input",ref:p},N.$attrs,{"onUpdate:modelValue":B[0]||(B[0]=L=>mt(k)?k.value=L:null),class:b(m),name:e.name,form:e.form||void 0,multiple:b(l)||void 0,size:b(v),disabled:b(o),required:b(d),"aria-required":b(d)?!0:void 0,"aria-invalid":b(w)}),[U(N.$slots,"first"),(A(!0),H(Re,null,ht(b(C),(L,j)=>(A(),H(Re,{key:j},[Array.isArray(L.options)?(A(),re(Hy,{key:0,label:L.label,options:L.options},null,8,["label","options"])):(A(),re(Gd,{key:1,value:L.value,disabled:L.disabled,innerHTML:L.html||L.text},null,8,["value","disabled","innerHTML"]))],64))),128)),U(N.$slots,"default")],16,xL)),[[TT,b(k)]])}}),kL=["id"],jy=Z({__name:"BFormTag",props:{id:null,title:null,disabled:{default:!1},noRemove:{default:!1},pill:{default:!1},removeLabel:{default:"Remove tag"},tag:{default:"span"},variant:{default:"secondary"}},emits:["remove"],setup(e,{emit:t}){const n=e,s=Ht(),r=Dt(_(n,"id")),i=S(_(n,"disabled")),o=S(_(n,"noRemove")),l=S(_(n,"pill")),u=E(()=>{var p,m,v;return(v=((m=(p=s.default)==null?void 0:p.call(s)[0].children)!=null?m:"").toString()||n.title)!=null?v:""}),d=E(()=>`${r.value}taglabel__`),c=E(()=>[`bg-${n.variant}`,{"text-dark":["warning","info","light"].includes(n.variant),"rounded-pill":l.value,disabled:i.value}]);return(p,m)=>(A(),re(Ve(e.tag),{id:b(r),title:b(u),class:ne(["badge b-form-tag d-inline-flex align-items-center mw-100",b(c)]),"aria-labelledby":b(d)},{default:me(()=>[_e("span",{id:b(d),class:"b-form-tag-content flex-grow-1 text-truncate"},[U(p.$slots,"default",{},()=>[Fe(Ee(b(u)),1)])],8,kL),!b(i)&&!b(o)?(A(),re(Di,{key:0,"aria-keyshortcuts":"Delete","aria-label":e.removeLabel,class:"b-form-tag-remove",white:!["warning","info","light"].includes(e.variant),"aria-describedby":b(d),"aria-controls":e.id,onClick:m[0]||(m[0]=v=>t("remove",b(u)))},null,8,["aria-label","white","aria-describedby","aria-controls"])):xe("",!0)]),_:3},8,["id","title","class","aria-labelledby"]))}}),$L=["id"],NL=["id","for","aria-live"],BL=["id","aria-live"],IL=["id"],PL=["aria-controls"],LL={role:"group",class:"d-flex"},DL=["id","disabled","value","type","placeholder","form","required"],RL=["disabled"],VL={"aria-live":"polite","aria-atomic":"true"},ML={key:0,class:"d-block invalid-feedback"},FL={key:1,class:"form-text text-muted"},HL={key:2,class:"form-text text-muted"},jL=["name","value"],zL=Z({__name:"BFormTags",props:{addButtonText:{default:"Add"},addButtonVariant:{default:"outline-secondary"},addOnChange:{default:!1},autofocus:{default:!1},disabled:{default:!1},duplicateTagText:{default:"Duplicate tag(s)"},inputAttrs:null,inputClass:null,inputId:null,inputType:{default:"text"},invalidTagText:{default:"Invalid tag(s)"},form:null,limit:null,limitTagsText:{default:"Tag limit reached"},modelValue:{default:()=>[]},name:null,noAddOnEnter:{default:!1},noOuterFocus:{default:!1},noTagRemove:{default:!1},placeholder:{default:"Add tag..."},removeOnDelete:{default:!1},required:{default:!1},separator:null,state:{default:void 0},size:null,tagClass:null,tagPills:{default:!1},tagRemoveLabel:null,tagRemovedLabel:{default:"Tag removed"},tagValidator:{type:Function,default:()=>!0},tagVariant:{default:"secondary"}},emits:["update:modelValue","input","tag-state","focus","focusin","focusout","blur"],setup(e,{emit:t}){const n=e,s=Dt(),r=S(_(n,"addOnChange")),i=S(_(n,"autofocus")),o=S(_(n,"disabled")),l=S(_(n,"noAddOnEnter")),u=S(_(n,"noOuterFocus")),d=S(_(n,"noTagRemove")),c=S(_(n,"removeOnDelete")),p=S(_(n,"required")),m=S(_(n,"state")),v=S(_(n,"tagPills")),w=ke(null),C=E(()=>n.inputId||`${s.value}input__`),k=ke(n.modelValue),x=ke(""),O=ke(!1),I=ke(!1),N=ke(""),B=ke([]),L=ke([]),j=ke([]),F=E(()=>({[`form-control-${n.size}`]:n.size!==void 0,disabled:o.value,focus:I.value,"is-invalid":m.value===!1,"is-valid":m.value===!0})),$=E(()=>k.value.includes(x.value)),M=E(()=>x.value===""?!1:!n.tagValidator(x.value)),Q=E(()=>k.value.length===n.limit),X=E(()=>!M.value&&!$.value),ae=E(()=>({addButtonText:n.addButtonText,addButtonVariant:n.addButtonVariant,addTag:He,disableAddButton:X.value,disabled:o.value,duplicateTagText:n.duplicateTagText,duplicateTags:j.value,form:n.form,inputAttrs:{...n.inputAttrs,disabled:o.value,form:n.form,id:C,value:x},inputHandlers:{input:$e,keydown:K,change:Xe},inputId:C,inputType:n.inputType,invalidTagText:n.invalidTagText,invalidTags:L.value,isDuplicate:$.value,isInvalid:M.value,isLimitReached:Q.value,limitTagsText:n.limitTagsText,limit:n.limit,noTagRemove:d.value,placeholder:n.placeholder,removeTag:oe,required:p.value,separator:n.separator,size:n.size,state:m.value,tagClass:n.tagClass,tagPills:v.value,tagRemoveLabel:n.tagRemoveLabel,tagVariant:n.tagVariant,tags:k.value}));dt(()=>n.modelValue,le=>{k.value=le});const Oe=()=>{var le;i.value&&((le=w.value)==null||le.focus())},ge=le=>{if(o.value){le.target.blur();return}t("focusin",le)},be=le=>{o.value||u.value||(I.value=!0,t("focus",le))},fe=le=>{I.value=!1,t("blur",le)},$e=le=>{var Ae,Ne;const ue=typeof le=="string"?le:le.target.value;if(O.value=!1,((Ae=n.separator)==null?void 0:Ae.includes(ue.charAt(0)))&&ue.length>0){w.value&&(w.value.value="");return}if(x.value=ue,(Ne=n.separator)!=null&&Ne.includes(ue.charAt(ue.length-1))){He(ue.slice(0,ue.length-1));return}B.value=n.tagValidator(ue)&&!$.value?[ue]:[],L.value=n.tagValidator(ue)?[]:[ue],j.value=$.value?[ue]:[],t("tag-state",B.value,L.value,j.value)},Xe=le=>{r.value&&($e(le),$.value||He(x.value))},K=le=>{if(le.key==="Enter"&&!l.value){He(x.value);return}(le.key==="Backspace"||le.key==="Delete")&&c.value&&x.value===""&&O.value&&k.value.length>0?oe(k.value[k.value.length-1]):O.value=!0},He=le=>{var Ae;if(le=(le||x.value).trim(),le===""||$.value||!n.tagValidator(le)||n.limit&&Q.value)return;const Ne=[...n.modelValue,le];x.value="",O.value=!0,t("update:modelValue",Ne),t("input",Ne),(Ae=w.value)==null||Ae.focus()},oe=le=>{var Ae;const Ne=k.value.indexOf((Ae=le==null?void 0:le.toString())!=null?Ae:"");N.value=k.value.splice(Ne,1).toString(),t("update:modelValue",k.value)};return $t(()=>{Oe(),n.modelValue.length>0&&(O.value=!0)}),fl(()=>Oe()),(le,Ae)=>(A(),H("div",{id:b(s),class:ne(["b-form-tags form-control h-auto",b(F)]),role:"group",tabindex:"-1",onFocusin:ge,onFocusout:Ae[1]||(Ae[1]=Ne=>t("focusout",Ne))},[_e("output",{id:`${b(s)}selected_tags__`,class:"visually-hidden",role:"status",for:b(C),"aria-live":I.value?"polite":"off","aria-atomic":"true","aria-relevant":"additions text"},Ee(k.value.join(", ")),9,NL),_e("div",{id:`${b(s)}removed_tags__`,role:"status","aria-live":I.value?"assertive":"off","aria-atomic":"true",class:"visually-hidden"}," ("+Ee(e.tagRemovedLabel)+") "+Ee(N.value),9,BL),U(le.$slots,"default",Ot(Ft(b(ae))),()=>[_e("ul",{id:`${b(s)}tag_list__`,class:"b-form-tags-list list-unstyled mb-0 d-flex flex-wrap align-items-center"},[(A(!0),H(Re,null,ht(k.value,(Ne,ue)=>U(le.$slots,"tag",Ot(Le({key:ue},{tag:Ne,tagClass:e.tagClass,tagVariant:e.tagVariant,tagPills:b(v),removeTag:oe})),()=>[Ye(jy,{class:ne(e.tagClass),tag:"li",variant:e.tagVariant,pill:e.tagPills,onRemove:oe},{default:me(()=>[Fe(Ee(Ne),1)]),_:2},1032,["class","variant","pill"])])),128)),_e("li",{role:"none","aria-live":"off",class:"b-from-tags-field flex-grow-1","aria-controls":`${b(s)}tag_list__`},[_e("div",LL,[_e("input",Le({id:b(C),ref_key:"input",ref:w,disabled:b(o),value:x.value,type:e.inputType,placeholder:e.placeholder,class:"b-form-tags-input w-100 flex-grow-1 p-0 m-0 bg-transparent border-0",style:{outline:"currentcolor none 0px","min-width":"5rem"}},e.inputAttrs,{form:e.form,required:b(p),onInput:$e,onChange:Xe,onKeydown:K,onFocus:be,onBlur:fe}),null,16,DL),b(X)?(A(),H("button",{key:0,type:"button",class:ne(["btn b-form-tags-button py-0",[`btn-${e.addButtonVariant}`,{"disabled invisible":x.value.length===0},e.inputClass]]),style:{"font-size":"90%"},disabled:b(o)||x.value.length===0||b(Q),onClick:Ae[0]||(Ae[0]=Ne=>He(x.value))},[U(le.$slots,"add-button-text",{},()=>[Fe(Ee(e.addButtonText),1)])],10,RL)):xe("",!0)])],8,PL)],8,IL),_e("div",VL,[b(M)?(A(),H("div",ML,Ee(e.invalidTagText)+": "+Ee(x.value),1)):xe("",!0),b($)?(A(),H("small",FL,Ee(e.duplicateTagText)+": "+Ee(x.value),1)):xe("",!0),k.value.length===e.limit?(A(),H("small",HL,"Tag limit reached")):xe("",!0)])]),e.name?(A(!0),H(Re,{key:0},ht(k.value,(Ne,ue)=>(A(),H("input",{key:ue,type:"hidden",name:e.name,value:Ne},null,8,jL))),128)):xe("",!0)],42,$L))}}),UL=Z({props:{...by,noResize:{type:[Boolean,String],default:!1},rows:{type:[String,Number],required:!1,default:2},wrap:{type:String,default:"soft"}},emits:["update:modelValue","change","blur","input"],setup(e,{emit:t}){const{input:n,computedId:s,computedAriaInvalid:r,onInput:i,onChange:o,onBlur:l,focus:u,blur:d}=_y(e,t),c=S(_(e,"noResize")),p=E(()=>({"form-control":!e.plaintext,"form-control-plaintext":e.plaintext,[`form-control-${e.size}`]:!!e.size,"is-valid":e.state===!0,"is-invalid":e.state===!1})),m=E(()=>c.value?{resize:"none"}:void 0);return{input:n,computedId:s,computedAriaInvalid:r,onInput:i,onChange:o,onBlur:l,focus:u,blur:d,computedClasses:p,computedStyles:m}}}),qL=["id","name","form","disabled","placeholder","required","autocomplete","readonly","aria-required","aria-invalid","rows","wrap"];function WL(e,t,n,s,r,i){return A(),H("textarea",Le({id:e.computedId,ref:"input",class:e.computedClasses,name:e.name||void 0,form:e.form||void 0,disabled:e.disabled,placeholder:e.placeholder,required:e.required,autocomplete:e.autocomplete||void 0,readonly:e.readonly||e.plaintext,"aria-required":e.required?"true":void 0,"aria-invalid":e.computedAriaInvalid,rows:e.rows,style:e.computedStyles,wrap:e.wrap||void 0},e.$attrs,{onInput:t[0]||(t[0]=o=>e.onInput(o)),onChange:t[1]||(t[1]=o=>e.onChange(o)),onBlur:t[2]||(t[2]=o=>e.onBlur(o))}),null,16,qL)}const KL=on(UL,[["render",WL]]),GL={key:0,class:"input-group-text"},YL=["innerHTML"],XL={key:1},JL={key:0,class:"input-group-text"},QL=["innerHTML"],ZL={key:1},eD=Z({__name:"BInputGroup",props:{append:null,appendHtml:null,id:null,prepend:null,prependHtml:null,size:null,tag:{default:"div"}},setup(e){const t=e,n=E(()=>({"input-group-sm":t.size==="sm","input-group-lg":t.size==="lg"})),s=E(()=>!!t.append||!!t.appendHtml),r=E(()=>!!t.prepend||!!t.prependHtml);return(i,o)=>(A(),re(Ve(e.tag),{id:e.id,class:ne(["input-group",b(n)]),role:"group"},{default:me(()=>[U(i.$slots,"prepend",{},()=>[b(r)?(A(),H("span",GL,[e.prependHtml?(A(),H("span",{key:0,innerHTML:e.prependHtml},null,8,YL)):(A(),H("span",XL,Ee(e.prepend),1))])):xe("",!0)]),U(i.$slots,"default"),U(i.$slots,"append",{},()=>[b(s)?(A(),H("span",JL,[e.appendHtml?(A(),H("span",{key:0,innerHTML:e.appendHtml},null,8,QL)):(A(),H("span",ZL,Ee(e.append),1))])):xe("",!0)])]),_:3},8,["id","class"]))}}),zy=Z({__name:"BInputGroupText",props:{tag:{default:"div"},text:null},setup(e){return(t,n)=>(A(),re(Ve(e.tag),{class:"input-group-text"},{default:me(()=>[U(t.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]),_:3}))}}),Yd=Z({__name:"BInputGroupAddon",props:{isText:{default:!1}},setup(e){const t=S(_(e,"isText"));return(n,s)=>b(t)?(A(),re(zy,{key:0},{default:me(()=>[U(n.$slots,"default")]),_:3})):U(n.$slots,"default",{key:1})}}),tD=Z({__name:"BInputGroupAppend",props:{isText:{default:!1}},setup(e){return(t,n)=>(A(),re(Yd,{"is-text":e.isText},{default:me(()=>[U(t.$slots,"default")]),_:3},8,["is-text"]))}}),nD=Z({__name:"BInputGroupPrepend",props:{isText:{default:!1}},setup(e){return(t,n)=>(A(),re(Yd,{"is-text":e.isText},{default:me(()=>[U(t.$slots,"default")]),_:3},8,["is-text"]))}}),Uy=Symbol(),sD=Z({__name:"BListGroup",props:{flush:{default:!1},horizontal:{type:[Boolean,String],default:!1},numbered:{default:!1},tag:{default:"div"}},setup(e){const t=e,n=S(_(t,"flush")),s=S(_(t,"numbered")),r=E(()=>{const o=n.value?!1:t.horizontal;return{"list-group-flush":n.value,"list-group-horizontal":o===!0,[`list-group-horizontal-${o}`]:typeof o=="string","list-group-numbered":s.value}}),i=E(()=>s.value===!0?"ol":t.tag);return rs(Uy,{numbered:s.value}),(o,l)=>(A(),re(Ve(b(i)),{class:ne(["list-group",b(r)])},{default:me(()=>[U(o.$slots,"default")]),_:3},8,["class"]))}}),rD=Z({__name:"BListGroupItem",props:{action:{default:!1},active:{default:!1},button:{default:!1},disabled:{default:!1},href:null,tag:{default:"div"},target:{default:"_self"},to:null,variant:null},setup(e){const t=e,n=fv(),s=Ct(Uy,null),r=S(_(t,"action")),i=S(_(t,"active")),o=S(_(t,"button")),l=S(_(t,"disabled")),u=E(()=>!o.value&&(!!t.href||!!t.to)),d=E(()=>s!=null&&s.numbered?"li":o.value?"button":u.value?_n:t.tag),c=E(()=>r.value||u.value||o.value||["a","router-link","button","b-link"].includes(t.tag)),p=E(()=>({[`list-group-item-${t.variant}`]:t.variant!==void 0,"list-group-item-action":c.value,active:i.value,disabled:l.value})),m=E(()=>{const v={};return o.value&&((!n||!n.type)&&(v.type="button"),l.value&&(v.disabled=!0)),v});return(v,w)=>(A(),re(Ve(b(d)),Le({class:["list-group-item",b(p)],"aria-current":b(i)?!0:void 0,"aria-disabled":b(l)?!0:void 0,target:b(u)?e.target:void 0,href:b(o)?void 0:e.href,to:b(o)?void 0:e.to},b(m)),{default:me(()=>[U(v.$slots,"default")]),_:3},16,["class","aria-current","aria-disabled","target","href","to"]))}}),iD=["id","aria-labelledby","aria-describedby"],oD=["id"],aD={inheritAttrs:!1},lD=Z({...aD,__name:"BModal",props:{bodyBgVariant:null,bodyClass:null,bodyTextVariant:null,busy:{default:!1},lazy:{default:!1},buttonSize:{default:"md"},cancelDisabled:{default:!1},cancelTitle:{default:"Cancel"},cancelVariant:{default:"secondary"},centered:{default:!1},contentClass:null,dialogClass:null,footerBgVariant:null,footerBorderVariant:null,footerClass:null,footerTextVariant:null,fullscreen:{type:[Boolean,String],default:!1},headerBgVariant:null,headerBorderVariant:null,headerClass:null,headerCloseLabel:{default:"Close"},headerCloseWhite:{default:!1},headerTextVariant:null,hideBackdrop:{default:!1},hideFooter:{default:!1},hideHeader:{default:!1},hideHeaderClose:{default:!1},id:null,modalClass:null,modelValue:{default:!1},noCloseOnBackdrop:{default:!1},noCloseOnEsc:{default:!1},noFade:{default:!1},noFocus:{default:!1},okDisabled:{default:!1},okOnly:{default:!1},okTitle:{default:"Ok"},okVariant:{default:"primary"},scrollable:{default:!1},show:{default:!1},size:null,title:null,titleClass:null,titleSrOnly:{default:!1},titleTag:{default:"h5"},static:{default:!1}},emits:["update:modelValue","show","shown","hide","hidden","hide-prevented","show-prevented","ok","cancel","close"],setup(e,{emit:t}){const n=e,s=Ht(),r=Dt(_(n,"id"),"modal"),i=S(_(n,"busy")),o=S(_(n,"lazy")),l=S(_(n,"cancelDisabled")),u=S(_(n,"centered")),d=S(_(n,"hideBackdrop")),c=S(_(n,"hideFooter")),p=S(_(n,"hideHeader")),m=S(_(n,"hideHeaderClose")),v=S(_(n,"modelValue")),w=S(_(n,"noCloseOnBackdrop")),C=S(_(n,"noCloseOnEsc")),k=S(_(n,"noFade")),x=S(_(n,"noFocus")),O=S(_(n,"okDisabled")),I=S(_(n,"okOnly")),N=S(_(n,"scrollable")),B=S(_(n,"titleSrOnly")),L=S(_(n,"static")),j=ke(!1),F=ke(null),$=ke(!1),M=E(()=>[n.modalClass,{fade:!k.value,show:j.value}]),Q=E(()=>!bn(s["header-close"])),X=E(()=>[n.dialogClass,{"modal-fullscreen":n.fullscreen===!0,[`modal-fullscreen-${n.fullscreen}-down`]:typeof n.fullscreen=="string",[`modal-${n.size}`]:n.size!==void 0,"modal-dialog-centered":u.value,"modal-dialog-scrollable":N.value}]),ae=E(()=>[n.bodyClass,{[`bg-${n.bodyBgVariant}`]:n.bodyBgVariant!==void 0,[`text-${n.bodyTextVariant}`]:n.bodyTextVariant!==void 0}]),Oe=E(()=>[n.headerClass,{[`bg-${n.headerBgVariant}`]:n.headerBgVariant!==void 0,[`border-${n.headerBorderVariant}`]:n.headerBorderVariant!==void 0,[`text-${n.headerTextVariant}`]:n.headerTextVariant!==void 0}]),ge=E(()=>[n.footerClass,{[`bg-${n.footerBgVariant}`]:n.footerBgVariant!==void 0,[`border-${n.footerBorderVariant}`]:n.footerBorderVariant!==void 0,[`text-${n.footerTextVariant}`]:n.footerTextVariant!==void 0}]),be=E(()=>[n.titleClass,{"visually-hidden":B.value}]),fe=E(()=>l.value||i.value),$e=E(()=>O.value||i.value),Xe=(ue,z={})=>new PB(ue,{cancelable:!1,target:F.value||null,relatedTarget:null,trigger:null,...z,componentId:r.value}),K=(ue="")=>{const z=Xe("hide",{cancelable:ue!=="",trigger:ue});if(ue==="ok"&&t(ue,z),ue==="cancel"&&t(ue,z),ue==="close"&&t(ue,z),t("hide",z),z.defaultPrevented||ue==="backdrop"&&w.value||ue==="esc"&&C.value){t("update:modelValue",!0),t("hide-prevented");return}t("update:modelValue",!1)},He=()=>{const ue=Xe("show",{cancelable:!0});if(t("show",ue),ue.defaultPrevented){t("update:modelValue",!1),t("show-prevented");return}t("update:modelValue",!0)},oe=()=>He(),le=()=>{j.value=!0,t("shown",Xe("shown")),o.value===!0&&($.value=!0)},Ae=()=>{j.value=!1},Ne=()=>{t("hidden",Xe("hidden")),o.value===!0&&($.value=!1)};return dt(()=>v.value,ue=>{ue===!0&&!x.value&&hn(()=>{F.value!==null&&F.value.focus()})}),(ue,z)=>(A(),re(KE,{to:"body",disabled:b(L)},[Ye(jo,{"no-fade":!0,"trans-props":{enterToClass:"show"},onBeforeEnter:oe,onAfterEnter:le,onLeave:Ae,onAfterLeave:Ne},{default:me(()=>[ki(_e("div",Le({id:b(r),ref_key:"element",ref:F,class:["modal",b(M)],role:"dialog","aria-labelledby":`${b(r)}-label`,"aria-describedby":`${b(r)}-body`,tabindex:"-1"},ue.$attrs,{onKeyup:z[5]||(z[5]=xT(q=>K("esc"),["esc"]))}),[_e("div",{class:ne(["modal-dialog",b(X)])},[!b(o)||b(o)&&$.value||b(o)&&b(v)===!0?(A(),H("div",{key:0,class:ne(["modal-content",e.contentClass])},[b(p)?xe("",!0):(A(),H("div",{key:0,class:ne(["modal-header",b(Oe)])},[U(ue.$slots,"header",{},()=>[(A(),re(Ve(e.titleTag),{id:`${b(r)}-label`,class:ne(["modal-title",b(be)])},{default:me(()=>[U(ue.$slots,"title",{},()=>[Fe(Ee(e.title),1)],!0)]),_:3},8,["id","class"])),b(m)?xe("",!0):(A(),H(Re,{key:0},[b(Q)?(A(),H("button",{key:0,type:"button",onClick:z[0]||(z[0]=q=>K("close"))},[U(ue.$slots,"header-close",{},void 0,!0)])):(A(),re(Di,{key:1,"aria-label":e.headerCloseLabel,white:e.headerCloseWhite,onClick:z[1]||(z[1]=q=>K("close"))},null,8,["aria-label","white"]))],64))],!0)],2)),_e("div",{id:`${b(r)}-body`,class:ne(["modal-body",b(ae)])},[U(ue.$slots,"default",{},void 0,!0)],10,oD),b(c)?xe("",!0):(A(),H("div",{key:1,class:ne(["modal-footer",b(ge)])},[U(ue.$slots,"footer",{},()=>[U(ue.$slots,"cancel",{},()=>[b(I)?xe("",!0):(A(),re(xi,{key:0,type:"button",class:"btn",disabled:b(fe),size:e.buttonSize,variant:e.cancelVariant,onClick:z[2]||(z[2]=q=>K("cancel"))},{default:me(()=>[Fe(Ee(e.cancelTitle),1)]),_:1},8,["disabled","size","variant"]))],!0),U(ue.$slots,"ok",{},()=>[Ye(xi,{type:"button",class:"btn",disabled:b($e),size:e.buttonSize,variant:e.okVariant,onClick:z[3]||(z[3]=q=>K("ok"))},{default:me(()=>[Fe(Ee(e.okTitle),1)]),_:1},8,["disabled","size","variant"])],!0)],!0)],2))],2)):xe("",!0)],2),b(d)?xe("",!0):U(ue.$slots,"backdrop",{key:0},()=>[_e("div",{class:"modal-backdrop fade show",onClick:z[4]||(z[4]=q=>K("backdrop"))})],!0)],16,iD),[[Z1,b(v)]])]),_:3})],8,["disabled"]))}}),uD=on(lD,[["__scopeId","data-v-116ecd66"]]),cD=Z({__name:"BNav",props:{align:null,cardHeader:{default:!1},fill:{default:!1},justified:{default:!1},pills:{default:!1},small:{default:!1},tabs:{default:!1},tag:{default:"ul"},vertical:{default:!1}},setup(e){const t=e,n=S(_(t,"cardHeader")),s=S(_(t,"fill")),r=S(_(t,"justified")),i=S(_(t,"pills")),o=S(_(t,"small")),l=S(_(t,"tabs")),u=S(_(t,"vertical")),d=Ho(_(t,"align")),c=E(()=>({"nav-tabs":l.value,"nav-pills":i.value&&!l.value,"card-header-tabs":!u.value&&n.value&&l.value,"card-header-pills":!u.value&&n.value&&i.value&&!l.value,"flex-column":u.value,"nav-fill":!u.value&&s.value,"nav-justified":!u.value&&r.value,[d.value]:!u.value&&t.align!==void 0,small:o.value}));return(p,m)=>(A(),re(Ve(e.tag),{class:ne(["nav",b(c)])},{default:me(()=>[U(p.$slots,"default")]),_:3},8,["class"]))}}),dD=Z({__name:"BNavForm",props:{role:null,id:null,floating:{default:!1},novalidate:{default:!1},validated:{default:!1}},emits:["submit"],setup(e,{emit:t}){const n=e,s=E(()=>({floating:n.floating,role:n.role,id:n.id,novalidate:n.novalidate,validated:n.validated})),r=i=>t("submit",i);return(i,o)=>(A(),re(Ry,Le(b(s),{class:"d-flex",onSubmit:vl(r,["prevent"])}),{default:me(()=>[U(i.$slots,"default")]),_:3},16,["onSubmit"]))}}),fD=Z({components:{BLink:_n},props:{...Fl(Rr,["event","routerTag"])},setup(e){return{disabledBoolean:S(_(e,"disabled"))}}}),pD={class:"nav-item"};function hD(e,t,n,s,r,i){const o=Cr("b-link");return A(),H("li",pD,[Ye(o,Le({class:"nav-link"},e.$props,{"active-class":"active",tabindex:e.disabledBoolean?-1:void 0,"aria-disabled":e.disabledBoolean?!0:void 0}),{default:me(()=>[U(e.$slots,"default")]),_:3},16,["tabindex","aria-disabled"])])}const mD=on(fD,[["render",hD]]),gD={class:"nav-item dropdown"},vD=Z({__name:"BNavItemDropdown",props:{id:null,text:null,toggleClass:null,size:null,offset:null,autoClose:{type:[Boolean,String],default:!0},dark:{type:Boolean,default:!1},dropleft:{type:Boolean,default:!1},dropright:{type:Boolean,default:!1},dropup:{type:Boolean,default:!1},right:{type:Boolean,default:!1},left:{type:[Boolean,String],default:!1},split:{type:Boolean,default:!1},splitVariant:null,noCaret:{type:Boolean,default:!1},variant:{default:"link"}},setup(e){const t=e;return(n,s)=>(A(),H("li",gD,[Ye(Dy,Le(t,{"is-nav":""}),cv({_:2},[ht(n.$slots,(r,i,o)=>({name:i,fn:me(l=>[U(n.$slots,i,Ot(Ft(l||{})))])}))]),1040)]))}}),bD={class:"navbar-text"},_D=Z({__name:"BNavText",props:{text:null},setup(e){return(t,n)=>(A(),H("li",bD,[U(t.$slots,"default",{},()=>[Fe(Ee(e.text),1)])]))}}),yD=Z({__name:"BNavbar",props:{fixed:null,print:{default:!1},sticky:null,tag:{default:"nav"},toggleable:{type:[Boolean,String],default:!1},dark:{default:!1},variant:null,container:{type:[String,Boolean],default:"fluid"}},setup(e){const t=e,n=S(_(t,"print")),s=S(_(t,"dark")),r=E(()=>t.tag==="nav"?void 0:"navigation"),i=E(()=>typeof t.toggleable=="string"?`navbar-expand-${t.toggleable}`:t.toggleable===!1?"navbar-expand":void 0),o=E(()=>t.container===!0?"container":"container-fluid"),l=E(()=>({"d-print":n.value,[`sticky-${t.sticky}`]:t.sticky!==void 0,"navbar-dark":s.value,[`bg-${t.variant}`]:t.variant!==void 0,[`fixed-${t.fixed}`]:t.fixed!==void 0,[`${i.value}`]:i.value!==void 0}));return(u,d)=>(A(),re(Ve(e.tag),{class:ne(["navbar",b(l)]),role:b(r)},{default:me(()=>[e.container!==!1?(A(),H("div",{key:0,class:ne(b(o))},[U(u.$slots,"default")],2)):U(u.$slots,"default",{key:1})]),_:3},8,["class","role"]))}}),ng=Fl(Rr,["event","routerTag"]),wD=Z({components:{BLink:_n},props:{tag:{type:String,default:"div"},...ng},setup(e){const t=E(()=>Oo(e)),n=E(()=>t.value?_n:e.tag);return{computedLinkProps:E(()=>t.value?Ud(e,ng):{}),computedTag:n}}});function ED(e,t,n,s,r,i){return A(),re(Ve(e.computedTag),Le({class:"navbar-brand"},e.computedLinkProps),{default:me(()=>[U(e.$slots,"default")]),_:3},16)}const TD=on(wD,[["render",ED]]),CD=Z({__name:"BNavbarNav",props:{align:null,fill:{default:!1},justified:{default:!1},small:{default:!1},tag:{default:"ul"}},setup(e){const t=e,n=S(_(t,"fill")),s=S(_(t,"justified")),r=S(_(t,"small")),i=Ho(_(t,"align")),o=E(()=>({"nav-fill":n.value,"nav-justified":s.value,[i.value]:t.align!==void 0,small:r.value}));return(l,u)=>(A(),H("ul",{class:ne(["navbar-nav",b(o)])},[U(l.$slots,"default")],2))}}),SD=_e("span",{class:"navbar-toggler-icon"},null,-1),AD=Z({__name:"BNavbarToggle",props:{disabled:{default:!1},label:{default:"Toggle navigation"},target:null},emits:["click"],setup(e,{emit:t}){const n=e,s=S(_(n,"disabled")),r=E(()=>({disabled:s.value,"aria-label":n.label})),i=E(()=>({disabled:s.value})),o=l=>{s.value||t("click",l)};return(l,u)=>ki((A(),H("button",Le({class:["navbar-toggler",b(i)],type:"button"},b(r),{onClick:o}),[U(l.$slots,"default",{},()=>[SD])],16)),[[b(Wd),b(s)?void 0:e.target]])}}),xD=["data-bs-backdrop","data-bs-scroll"],OD={key:0,class:"offcanvas-header"},kD={id:"offcanvasLabel",class:"offcanvas-title"},$D={class:"offcanvas-body"},ND={key:1},BD=Z({__name:"BOffcanvas",props:{dismissLabel:{default:"Close"},modelValue:{default:!1},bodyScrolling:{default:!1},backdrop:{default:!0},placement:{default:"start"},title:null,noHeaderClose:{default:!1},noHeader:{default:!1}},emits:["update:modelValue","show","shown","hide","hidden"],setup(e,{emit:t}){const n=e,s=S(_(n,"modelValue")),r=S(_(n,"bodyScrolling")),i=S(_(n,"backdrop")),o=S(_(n,"noHeaderClose")),l=S(_(n,"noHeader")),u=Ht(),d=ke(),c=ke(),p=E(()=>!bn(u.footer)),m=E(()=>[`offcanvas-${n.placement}`]),v=()=>{t("show"),t("update:modelValue",!0)},w=()=>{t("hide"),t("update:modelValue",!1)};return dt(()=>s.value,C=>{var k,x;C?(k=c.value)==null||k.show(d.value):(x=c.value)==null||x.hide()}),nn(d,"shown.bs.offcanvas",()=>t("shown")),nn(d,"hidden.bs.offcanvas",()=>t("hidden")),nn(d,"show.bs.offcanvas",()=>{v()}),nn(d,"hide.bs.offcanvas",()=>{w()}),$t(()=>{var C;c.value=new xs(d.value),s.value&&((C=c.value)==null||C.show(d.value))}),(C,k)=>(A(),H("div",{ref_key:"element",ref:d,class:ne(["offcanvas",b(m)]),tabindex:"-1","aria-labelledby":"offcanvasLabel","data-bs-backdrop":b(i),"data-bs-scroll":b(r)},[b(l)?xe("",!0):(A(),H("div",OD,[U(C.$slots,"header",Ot(Ft({visible:b(s),placement:e.placement,hide:w})),()=>[_e("h5",kD,[U(C.$slots,"title",{},()=>[Fe(Ee(e.title),1)])]),b(o)?xe("",!0):(A(),re(Di,{key:0,class:"text-reset","data-bs-dismiss":"offcanvas","aria-label":e.dismissLabel},null,8,["aria-label"]))])])),_e("div",$D,[U(C.$slots,"default")]),b(p)?(A(),H("div",ND,[U(C.$slots,"footer",Ot(Ft({visible:b(s),placement:e.placement,hide:w})))])):xe("",!0)],10,xD))}}),ID=Z({__name:"BOverlay",props:{bgColor:null,blur:{default:"2px"},fixed:{default:!1},noCenter:{default:!1},noFade:{default:!1},noWrap:{default:!1},opacity:{default:.85},overlayTag:{default:"div"},rounded:{type:[Boolean,String],default:!1},show:{default:!1},spinnerSmall:{default:!1},spinnerType:{default:"border"},spinnerVariant:null,variant:{default:"light"},wrapTag:{default:"div"},zIndex:{default:10}},emits:["click","hidden","shown"],setup(e,{emit:t}){const n=e,s={top:0,left:0,bottom:0,right:0},r=S(_(n,"fixed")),i=S(_(n,"noCenter")),o=S(_(n,"noWrap")),l=S(_(n,"show")),u=S(_(n,"spinnerSmall")),d=E(()=>n.rounded===!0||n.rounded===""?"rounded":n.rounded===!1?"":`rounded-${n.rounded}`),c=E(()=>n.variant&&!n.bgColor?`bg-${n.variant}`:""),p=E(()=>l.value?"true":null),m=E(()=>({type:n.spinnerType||void 0,variant:n.spinnerVariant||void 0,small:u.value})),v=E(()=>({...s,zIndex:n.zIndex||10})),w=E(()=>["b-overlay",{"position-absolute":!o.value||!r.value,"position-fixed":o.value&&r.value}]),C=E(()=>[c.value,d.value]),k=E(()=>({...s,opacity:n.opacity,backgroundColor:n.bgColor||void 0,backdropFilter:blur?`blur(${blur})`:void 0})),x=E(()=>i.value?s:{top:"50%",left:"50%",transform:"translateX(-50%) translateY(-50%)"});return(O,I)=>(A(),re(Ve(e.wrapTag),{class:"b-overlay-wrap position-relative","aria-busy":b(p)},{default:me(()=>[U(O.$slots,"default"),Ye(jo,{"no-fade":e.noFade,"trans-props":{enterToClass:"show"},name:"fade",onOnAfterEnter:I[1]||(I[1]=N=>t("shown")),onOnAfterLeave:I[2]||(I[2]=N=>t("hidden"))},{default:me(()=>[b(l)?(A(),re(Ve(e.overlayTag),{key:0,class:ne(b(w)),style:Lt(b(v)),onClick:I[0]||(I[0]=N=>t("click",N))},{default:me(()=>[_e("div",{class:ne(["position-absolute",b(C)]),style:Lt(b(k))},null,6),_e("div",{class:"position-absolute",style:Lt(b(x))},[U(O.$slots,"overlay",Ot(Ft(b(m))),()=>[Ye(Hl,Ot(Ft(b(m))),null,16)])],4)]),_:3},8,["class","style"])):xe("",!0)]),_:3},8,["no-fade"])]),_:3},8,["aria-busy"]))}}),PD=5,qy=20,Wy=0,es=3,LD="ellipsis-text",DD="first-text",RD="last-text",VD="next-text",MD="page",FD="prev-text",sg=e=>Math.max(Us(e)||qy,1),rg=e=>Math.max(Us(e)||Wy,0),HD=(e,t)=>{const n=Us(e)||1;return n>t?t:n<1?1:n},jD=Z({name:"BPagination",props:{align:{type:String,default:"start"},ariaControls:{type:String,required:!1},ariaLabel:{type:String,default:"Pagination"},disabled:{type:[Boolean,String],default:!1},ellipsisClass:{type:[Array,String],default:()=>[]},ellipsisText:{type:String,default:"…"},firstClass:{type:[Array,String],default:()=>[]},firstNumber:{type:[Boolean,String],default:!1},firstText:{type:String,default:"«"},hideEllipsis:{type:[Boolean,String],default:!1},hideGotoEndButtons:{type:[Boolean,String],default:!1},labelFirstPage:{type:String,default:"Go to first page"},labelLastPage:{type:String,default:"Go to last page"},labelNextPage:{type:String,default:"Go to next page"},labelPage:{type:String,default:"Go to page"},labelPrevPage:{type:String,default:"Go to previous page"},lastClass:{type:[Array,String],default:()=>[]},lastNumber:{type:[Boolean,String],default:!1},lastText:{type:String,default:"»"},limit:{type:Number,default:PD},modelValue:{type:Number,default:1},nextClass:{type:[Array,String],default:()=>[]},nextText:{type:String,default:"›"},pageClass:{type:[Array,String],default:()=>[]},perPage:{type:Number,default:qy},pills:{type:[Boolean,String],default:!1},prevClass:{type:[Array,String],default:()=>[]},prevText:{type:String,default:"‹"},size:{type:String,required:!1},totalRows:{type:Number,default:Wy}},emits:["update:modelValue","page-click"],setup(e,{emit:t,slots:n}){const s=S(_(e,"disabled")),r=S(_(e,"firstNumber")),i=S(_(e,"hideEllipsis")),o=S(_(e,"hideGotoEndButtons")),l=S(_(e,"lastNumber")),u=S(_(e,"pills")),d=E(()=>e.align==="fill"?"start":e.align),c=Ho(_(d,"value")),p=E(()=>Math.ceil(rg(e.totalRows)/sg(e.perPage))),m=E(()=>{let B;return p.value-e.modelValue+2es?B=p.value-w.value+1:B=e.modelValue-Math.floor(w.value/2),B<1?B=1:B>p.value-w.value&&(B=p.value-w.value+1),e.limit<=es&&l.value&&p.value===B+w.value-1&&(B=Math.max(B-1,1)),B}),v=E(()=>{const B=p.value-e.modelValue;let L=!1;return B+2es?e.limit>es&&(L=!0):e.limit>es&&(L=!!(!i.value||r.value)),m.value<=1&&(L=!1),L&&r.value&&m.value<4&&(L=!1),L}),w=E(()=>{let B=e.limit;return p.value<=e.limit?B=p.value:e.modelValuees?((!i.value||l.value)&&(B=e.limit-(r.value?0:1)),B=Math.min(B,e.limit)):p.value-e.modelValue+2es?(!i.value||r.value)&&(B=e.limit-(l.value?0:1)):e.limit>es&&(B=e.limit-(i.value?0:2)),B}),C=E(()=>{const B=p.value-w.value;let L=!1;e.modelValuees?(!i.value||l.value)&&(L=!0):e.limit>es&&(L=!!(!i.value||l.value)),m.value>B&&(L=!1);const j=m.value+w.value-1;return L&&l.value&&j>p.value-3&&(L=!1),L}),k=rn({pageSize:sg(e.perPage),totalRows:rg(e.totalRows),numberOfPages:p.value}),x=(B,L)=>{if(L===e.modelValue)return;const{target:j}=B,F=new Ai("page-click",{cancelable:!0,target:j});t("page-click",F,L),!F.defaultPrevented&&t("update:modelValue",L)},O=E(()=>e.size?`pagination-${e.size}`:""),I=E(()=>u.value?"b-pagination-pills":"");dt(()=>e.modelValue,B=>{const L=HD(B,p.value);L!==e.modelValue&&t("update:modelValue",L)}),dt(k,(B,L)=>{B!=null&&(L.pageSize!==B.pageSize&&L.totalRows===B.totalRows||L.numberOfPages!==B.numberOfPages&&e.modelValue>L.numberOfPages)&&t("update:modelValue",1)});const N=E(()=>{const B=[];for(let L=0;L{const B=[],L=N.value.map(ge=>ge.number),j=ge=>ge===e.modelValue,F=e.modelValue<1,$=e.align==="fill",M=(ge,be,fe,$e,Xe,K)=>{const He=s.value||j(K)||F||ge<1||ge>p.value,oe=ge<1?1:ge>p.value?p.value:ge,le={disabled:He,page:oe,index:oe-1},Ae=On(fe,le,n)||$e||"";return Ke("li",{class:["page-item",{disabled:He,"flex-fill":$,"d-flex":$&&!He},Xe]},Ke(He?"span":"button",{class:["page-link",{"flex-grow-1":!He&&$}],"aria-label":be,"aria-controls":e.ariaControls||null,"aria-disabled":He?"true":null,role:"menuitem",type:He?null:"button",tabindex:He?null:"-1",onClick:Ne=>{He||x(Ne,oe)}},Ae))},Q=ge=>Ke("li",{class:["page-item","disabled","bv-d-xs-down-none",$?"flex-fill":"",e.ellipsisClass],role:"separator",key:`ellipsis-${ge?"last":"first"}`},[Ke("span",{class:["page-link"]},On(LD,{},n)||e.ellipsisText||"...")]),X=(ge,be)=>{const fe=j(ge.number)&&!F,$e=s.value?null:fe||F&&be===0?"0":"-1",Xe={active:fe,disabled:s.value,page:ge.number,index:ge.number-1,content:ge.number},K=On(MD,Xe,n)||ge.number,He=Ke(s.value?"span":"button",{class:["page-link",{"flex-grow-1":!s.value&&$}],"aria-controls":e.ariaControls||null,"aria-disabled":s.value?"true":null,"aria-label":e.labelPage?`${e.labelPage} ${ge.number}`:null,role:"menuitemradio",type:s.value?null:"button",tabindex:$e,onClick:oe=>{s.value||x(oe,ge.number)}},K);return Ke("li",{class:["page-item",{disabled:s.value,active:fe,"flex-fill":$,"d-flex":$&&!s.value},e.pageClass],role:"presentation",key:`page-${ge.number}`},He)};if(!o.value&&!r.value){const ge=M(1,e.labelFirstPage,DD,e.firstText,e.firstClass,1);B.push(ge)}const ae=M(e.modelValue-1,e.labelFirstPage,FD,e.prevText,e.prevClass,1);B.push(ae),r.value&&L[0]!==1&&B.push(X({number:1},0)),v.value&&B.push(Q(!1)),N.value.forEach((ge,be)=>{const fe=v.value&&r.value&&L[0]!==1?1:0;B.push(X(ge,be+fe))}),C.value&&B.push(Q(!0)),l.value&&L[L.length-1]!==p.value&&B.push(X({number:p.value},-1));const Oe=M(e.modelValue+1,e.labelNextPage,VD,e.nextText,e.nextClass,p.value);if(B.push(Oe),!l.value&&!o.value){const ge=M(p.value,e.labelLastPage,RD,e.lastText,e.lastClass,p.value);B.push(ge)}return Ke("ul",{class:["pagination",O.value,c.value,I.value],role:"menubar","aria-disabled":s.value,"aria-label":e.ariaLabel||null},B)}}}),xn=Z({__name:"BPlaceholder",props:{tag:{default:"span"},width:null,cols:null,variant:null,size:null,animation:null},setup(e){const t=e,n=E(()=>t.width===void 0?void 0:typeof t.width=="number"?t.width.toString():t.width.includes("%")?t.width.replaceAll("%",""):t.width),s=E(()=>t.cols===void 0?void 0:typeof t.cols=="number"?t.cols.toString():t.cols),r=E(()=>({[`col-${s.value}`]:s.value!==void 0&&n.value===void 0,[`bg-${t.variant}`]:t.variant!==void 0,[`placeholder-${t.size}`]:t.size!==void 0,[`placeholder-${t.animation}`]:t.animation!==void 0})),i=E(()=>n.value===void 0?void 0:`width: ${n.value}%;`);return(o,l)=>(A(),re(Ve(e.tag),{class:ne(["placeholder",b(r)]),style:Lt(b(i))},null,8,["class","style"]))}}),Ky=Z({__name:"BPlaceholderButton",props:{tag:{default:"div"},width:null,cols:null,variant:{default:"primary"},animation:null},setup(e){const t=e,n=E(()=>["btn",`btn-${t.variant}`,"disabled"]),s=E(()=>({animation:t.animation,width:t.width,cols:t.cols,tag:t.tag}));return(r,i)=>(A(),re(xn,Le({class:b(n)},b(s)),null,16,["class"]))}}),zD=Z({__name:"BPlaceholderCard",props:{noHeader:{default:!1},headerWidth:{default:100},headerVariant:null,headerAnimation:null,headerSize:null,noFooter:{default:!1},footerWidth:{default:100},footerVariant:null,footerAnimation:null,footerSize:null,animation:null,size:null,variant:null,noButton:{default:!1},imgBottom:{default:!1},imgSrc:null,imgBlankColor:{default:"#868e96"},imgHeight:{default:100},noImg:{default:!1}},setup(e){const t=e,n=S(_(t,"noButton")),s=S(_(t,"noHeader")),r=S(_(t,"noFooter")),i=S(_(t,"noImg")),o=E(()=>({width:t.headerWidth,variant:t.headerVariant,animation:t.headerAnimation,size:t.headerSize})),l=E(()=>({width:t.footerWidth,animation:t.footerAnimation,size:n.value?t.footerSize:void 0,variant:t.footerVariant})),u=E(()=>({blank:!t.imgSrc,blankColor:t.imgBlankColor,height:t.imgSrc?void 0:t.imgHeight,src:t.imgSrc,top:!t.imgBottom,bottom:t.imgBottom}));return(d,c)=>(A(),re(Ny,{"img-bottom":e.imgBottom},cv({default:me(()=>[U(d.$slots,"default",{},()=>[Ye(xn,{cols:"7"}),Ye(xn,{cols:"4"}),Ye(xn,{cols:"4"}),Ye(xn,{cols:"6"}),Ye(xn,{cols:"8"})])]),_:2},[b(i)?void 0:{name:"img",fn:me(()=>[U(d.$slots,"img",{},()=>[Ye(rl,Ot(Ft(b(u))),null,16)])]),key:"0"},b(s)?void 0:{name:"header",fn:me(()=>[U(d.$slots,"header",{},()=>[Ye(xn,Ot(Ft(b(o))),null,16)])]),key:"1"},b(r)?void 0:{name:"footer",fn:me(()=>[U(d.$slots,"footer",{},()=>[b(n)?(A(),re(xn,Ot(Le({key:1},b(l))),null,16)):(A(),re(Ky,Ot(Le({key:0},b(l))),null,16))])]),key:"2"}]),1032,["img-bottom"]))}}),jl=Z({__name:"BTableSimple",props:{bordered:{default:!1},borderless:{default:!1},borderVariant:null,captionTop:{default:!1},dark:{default:!1},hover:{default:!1},responsive:{type:[Boolean,String],default:!1},stacked:{type:[Boolean,String],default:!1},striped:{default:!1},small:{default:!1},tableClass:null,tableVariant:null,stickyHeader:{default:!1}},setup(e){const t=e,n=S(_(t,"captionTop")),s=S(_(t,"borderless")),r=S(_(t,"bordered")),i=S(_(t,"dark")),o=S(_(t,"hover")),l=S(_(t,"small")),u=S(_(t,"striped")),d=S(_(t,"stickyHeader")),c=E(()=>["table","b-table",{"table-bordered":r.value,"table-borderless":s.value,[`border-${t.borderVariant}`]:t.borderVariant!==void 0,"caption-top":n.value,"table-dark":i.value,"table-hover":o.value,"b-table-stacked":typeof t.stacked=="boolean"&&t.stacked,[`b-table-stacked-${t.stacked}`]:typeof t.stacked=="string","table-striped":u.value,"table-sm":l.value,[`table-${t.tableVariant}`]:t.tableVariant!==void 0},t.tableClass]),p=E(()=>[{"table-responsive":t.responsive===!0,[`table-responsive-${t.responsive}`]:typeof t.responsive=="string","b-table-sticky-header":d.value}]);return(m,v)=>e.responsive?(A(),H("div",{key:1,class:ne(b(p))},[_e("table",{role:"table",class:ne(b(c))},[U(m.$slots,"default")],2)],2)):(A(),H("table",{key:0,role:"table",class:ne(b(c))},[U(m.$slots,"default")],2))}}),UD=Z({__name:"BPlaceholderTable",props:{rows:{default:3},columns:{default:5},cellWidth:{default:100},size:null,animation:null,variant:null,headerColumns:null,hideHeader:{default:!1},headerCellWidth:{default:100},headerSize:null,headerAnimation:null,headerVariant:null,footerColumns:null,showFooter:{default:!1},footerCellWidth:{default:100},footerSize:null,footerAnimation:null,footerVariant:null},setup(e){const t=e,n=E(()=>typeof t.columns=="string"?eo(t.columns,5):t.columns),s=E(()=>typeof t.rows=="string"?eo(t.rows,3):t.rows),r=E(()=>t.headerColumns===void 0?n.value:typeof t.headerColumns=="string"?eo(t.headerColumns,n.value):t.headerColumns),i=E(()=>t.footerColumns===void 0?n.value:typeof t.footerColumns=="string"?eo(t.footerColumns,n.value):t.footerColumns),o=E(()=>({size:t.size,variant:t.variant,animation:t.animation,width:t.cellWidth})),l=E(()=>({size:t.headerSize,variant:t.headerVariant,animation:t.headerAnimation,width:t.headerCellWidth})),u=E(()=>({size:t.footerSize,variant:t.footerVariant,animation:t.footerAnimation,width:t.footerCellWidth})),d=S(_(t,"hideHeader")),c=S(_(t,"showFooter"));return(p,m)=>(A(),re(jl,null,{default:me(()=>[b(d)?xe("",!0):U(p.$slots,"thead",{key:0},()=>[_e("thead",null,[_e("tr",null,[(A(!0),H(Re,null,ht(b(r),(v,w)=>(A(),H("th",{key:w},[Ye(xn,Ot(Ft(b(l))),null,16)]))),128))])])]),U(p.$slots,"default",{},()=>[_e("tbody",null,[(A(!0),H(Re,null,ht(b(s),(v,w)=>(A(),H("tr",{key:w},[(A(!0),H(Re,null,ht(b(n),(C,k)=>(A(),H("td",{key:k},[Ye(xn,Ot(Ft(b(o))),null,16)]))),128))]))),128))])]),b(c)?U(p.$slots,"tfoot",{key:1},()=>[_e("tfoot",null,[_e("tr",null,[(A(!0),H(Re,null,ht(b(i),(v,w)=>(A(),H("th",{key:w},[Ye(xn,Ot(Ft(b(u))),null,16)]))),128))])])]):xe("",!0)]),_:3}))}}),qD=Z({__name:"BPlaceholderWrapper",props:{loading:{default:!1}},setup(e){const t=S(_(e,"loading"));return(n,s)=>b(t)?U(n.$slots,"loading",{key:0}):U(n.$slots,"default",{key:1})}}),WD=Z({props:{container:{type:[String,Object],default:"body"},content:{type:String},id:{type:String},customClass:{type:String,default:""},noninteractive:{type:[Boolean,String],default:!1},placement:{type:String,default:"right"},target:{type:[String,Object],default:void 0},title:{type:String},delay:{type:[Number,Object],default:0},triggers:{type:String,default:"click"},show:{type:[Boolean,String],default:!1},variant:{type:String,default:void 0},html:{type:[Boolean,String],default:!0},sanitize:{type:[Boolean,String],default:!1},offset:{type:String,default:"0"}},emits:["show","shown","hide","hidden","inserted"],setup(e,{emit:t,slots:n}){S(_(e,"noninteractive"));const s=S(_(e,"show")),r=S(_(e,"html")),i=S(_(e,"sanitize")),o=ke(),l=ke(),u=ke(),d=ke(),c=ke(),p=E(()=>({[`b-popover-${e.variant}`]:e.variant!==void 0})),m=O=>{if(typeof O=="string"||O instanceof HTMLElement)return O;if(typeof O<"u")return O.$el},v=O=>{if(O)return typeof O=="string"?document.getElementById(O)||void 0:O},w=[{event:"show.bs.popover",handler:()=>t("show")},{event:"shown.bs.popover",handler:()=>t("shown")},{event:"hide.bs.popover",handler:()=>t("hide")},{event:"hidden.bs.popover",handler:()=>t("hidden")},{event:"inserted.bs.popover",handler:()=>t("inserted")}],C=O=>{for(const I of w)O.addEventListener(I.event,I.handler)},k=O=>{for(const I of w)O.removeEventListener(I.event,I.handler)},x=O=>{l.value=v(m(O)),l.value&&(C(l.value),u.value=new Ci(l.value,{customClass:e.customClass,container:m(e.container),trigger:e.triggers,placement:e.placement,title:e.title||n.title?d.value:"",content:c.value,html:r.value,delay:e.delay,sanitize:i.value,offset:e.offset}))};return dt(()=>e.target,O=>{var I;(I=u.value)==null||I.dispose(),l.value instanceof HTMLElement&&k(l.value),x(O)}),dt(()=>s.value,(O,I)=>{var N,B;O!==I&&(O?(N=u.value)==null||N.show():(B=u.value)==null||B.hide())}),$t(()=>{var O,I,N;hn(()=>{x(e.target)}),(I=(O=o.value)==null?void 0:O.parentNode)==null||I.removeChild(o.value),s.value&&((N=u.value)==null||N.show())}),No(()=>{var O;(O=u.value)==null||O.dispose(),l.value instanceof HTMLElement&&k(l.value)}),{element:o,titleRef:d,contentRef:c,computedClasses:p}}}),KD=["id"],GD={ref:"titleRef"},YD={ref:"contentRef"};function XD(e,t,n,s,r,i){return A(),H("div",{id:e.id,ref:"element",class:ne(["popover b-popover",e.computedClasses]),role:"tooltip",tabindex:"-1"},[_e("div",GD,[U(e.$slots,"title",{},()=>[Fe(Ee(e.title),1)])],512),_e("div",YD,[U(e.$slots,"default",{},()=>[Fe(Ee(e.content),1)])],512)],10,KD)}const JD=on(WD,[["render",XD]]),QD=["aria-valuenow","aria-valuemax"],Gy=Z({__name:"BProgressBar",props:{animated:{default:!1},label:null,labelHtml:null,max:null,precision:{default:0},showProgress:{default:!1},showValue:{default:!1},striped:{default:!1},value:{default:0},variant:null},setup(e){const t=e,n=Ct(Yy),s=S(_(t,"animated")),r=S(_(t,"showProgress")),i=S(_(t,"showValue")),o=S(_(t,"striped")),l=E(()=>({"progress-bar-animated":s.value||(n==null?void 0:n.animated),"progress-bar-striped":o.value||(n==null?void 0:n.striped)||s.value||(n==null?void 0:n.animated),[`bg-${t.variant}`]:t.variant!==void 0})),u=E(()=>typeof t.precision=="number"?t.precision:Number.parseFloat(t.precision)),d=E(()=>typeof t.value=="number"?t.value:Number.parseFloat(t.value)),c=E(()=>typeof t.max=="number"?t.max:t.max===void 0?void 0:Number.parseFloat(t.max)),p=E(()=>t.labelHtml!==void 0?t.labelHtml:i.value||n!=null&&n.showValue?d.value.toFixed(u.value):r.value||n!=null&&n.showProgress?(d.value*100/(c.value||100)).toFixed(u.value):t.label!==void 0?t.label:""),m=E(()=>n!=null&&n.max?`${d.value*100/(typeof n.max=="number"?n.max:Number.parseInt(n.max))}%`:t.max?`${d.value*100/(typeof t.max=="number"?t.max:Number.parseInt(t.max))}%`:typeof t.value=="string"?t.value:`${t.value}%`);return(v,w)=>(A(),H("div",{class:ne(["progress-bar",b(l)]),role:"progressbar","aria-valuenow":e.value,"aria-valuemin":"0","aria-valuemax":e.max,style:Lt({width:b(m)})},[U(v.$slots,"default",{},()=>[Fe(Ee(b(p)),1)])],14,QD))}}),Yy=Symbol(),ZD=Z({__name:"BProgress",props:{variant:null,max:null,height:null,animated:{default:!1},precision:{default:0},showProgress:{default:!1},showValue:{default:!1},striped:{default:!1},value:{default:0}},setup(e){const t=e,n=S(_(t,"animated")),s=S(_(t,"showProgress")),r=S(_(t,"showValue")),i=S(_(t,"striped")),o=E(()=>({animated:t.animated,max:t.max,precision:t.precision,showProgress:t.showProgress,showValue:t.showValue,striped:t.striped,value:t.value,variant:t.variant}));return rs(Yy,{animated:n.value,max:t.max,showProgress:s.value,showValue:r.value,striped:i.value}),(l,u)=>(A(),H("div",{class:"progress",style:Lt({height:e.height})},[U(l.$slots,"default",{},()=>[Ye(Gy,Ot(Ft(b(o))),null,16)])],4))}}),ig=Vl("cols",[""],{type:[String,Number],default:null}),eR=Z({name:"BRow",props:{tag:{type:String,default:"div"},gutterX:{type:String,default:null},gutterY:{type:String,default:null},noGutters:{type:[Boolean,String],default:!1},alignV:{type:String,default:null},alignH:{type:String,default:null},alignContent:{type:String,default:null},...ig},setup(e){const t=S(_(e,"noGutters")),n=Ho(_(e,"alignH")),s=E(()=>ly(e,ig,"cols","row-cols"));return{computedClasses:E(()=>[s.value,{[`gx-${e.gutterX}`]:e.gutterX!==null,[`gy-${e.gutterY}`]:e.gutterY!==null,"g-0":t.value,[`align-items-${e.alignV}`]:e.alignV!==null,[n.value]:e.alignH!==null,[`align-content-${e.alignContent}`]:e.alignContent!==null}])}}});function tR(e,t,n,s,r,i){return A(),re(Ve(e.tag),{class:ne(["row",e.computedClasses])},{default:me(()=>[U(e.$slots,"default")]),_:3},8,["class"])}const nR=on(eR,[["render",tR]]),Va=Z({__name:"BSkeleton",props:{height:null,width:null,size:null,animation:{default:"wave"},type:{default:"text"},variant:null},setup(e){const t=e,n=E(()=>[`b-skeleton-${t.type}`,{[`b-skeleton-animate-${t.animation}`]:typeof t.animation=="boolean"?!1:t.animation,[`bg-${t.variant}`]:t.variant!==void 0}]),s=E(()=>({width:t.size||t.width,height:t.size||t.height}));return(r,i)=>(A(),H("div",{class:ne(["b-skeleton",b(n)]),style:Lt(b(s))},null,6))}}),sR=Z({__name:"BSkeletonIcon",props:{animation:{default:"wave"}},setup(e){const t=e,n=E(()=>[`b-skeleton-animate-${t.animation}`]);return(s,r)=>(A(),H("div",{class:ne(["b-skeleton-icon-wrapper position-relative d-inline-block overflow-hidden",b(n)])},[U(s.$slots,"default")],2))}}),rR={key:0},iR={key:1},oR=Z({__name:"BSkeletonTable",props:{animation:{default:"wave"},columns:{default:5},hideHeader:{default:!1},rows:{default:3},showFooter:{default:!1},tableProps:null},setup(e){const t=e,n=S(_(t,"hideHeader")),s=S(_(t,"showFooter"));return(r,i)=>(A(),re(jl,Ot(Ft(e.tableProps)),{default:me(()=>[b(n)?xe("",!0):(A(),H("thead",rR,[_e("tr",null,[(A(!0),H(Re,null,ht(e.columns,(o,l)=>(A(),H("th",{key:l},[Ye(Va)]))),128))])])),_e("tbody",null,[(A(!0),H(Re,null,ht(e.rows,(o,l)=>(A(),H("tr",{key:l},[(A(!0),H(Re,null,ht(e.columns,(u,d)=>(A(),H("td",{key:d},[Ye(Va,{width:"75%"})]))),128))]))),128))]),b(s)?(A(),H("tfoot",iR,[_e("tr",null,[(A(!0),H(Re,null,ht(e.columns,(o,l)=>(A(),H("th",{key:l},[Ye(Va)]))),128))])])):xe("",!0)]),_:1},16))}}),aR=Z({__name:"BSkeletonWrapper",props:{loading:{default:!1}},setup(e){const t=S(_(e,"loading"));return(n,s)=>b(t)?U(n.$slots,"loading",{key:0}):U(n.$slots,"default",{key:1})}}),og=["ar","az","ckb","fa","he","ks","lrc","mzn","ps","sd","te","ug","ur","yi"].map(e=>e.toLowerCase()),lR=e=>{const t=tl(e).toLowerCase().replace(FB,"").split("-"),n=t.slice(0,2).join("-"),s=t[0];return og.includes(n)||og.includes(s)},uR=e=>qB?Vc(e)?e:{capture:!!e||!1}:!!(Vc(e)?e.capture:e),cR=(e,t,n,s)=>{e&&e.addEventListener&&e.addEventListener(t,n,uR(s))},dR=(e,t,n,s)=>{e&&e.removeEventListener&&e.removeEventListener(t,n,s)},ag=(e,t)=>{(e?cR:dR)(...t)},Ea=(e,{preventDefault:t=!0,propagation:n=!0,immediatePropagation:s=!1}={})=>{t&&e.preventDefault(),n&&e.stopPropagation(),s&&e.stopImmediatePropagation()},Kc="ArrowDown",Xy="End",Jy="Home",Qy="PageDown",Zy="PageUp",Gc="ArrowUp",lg=1,ug=100,cg=1,dg=500,fg=100,pg=10,hg=4,mg=[Gc,Kc,Jy,Xy,Zy,Qy],fR=Z({props:{ariaControls:{type:String,required:!1},ariaLabel:{type:String,required:!1},labelIncrement:{type:String,default:"Increment"},labelDecrement:{type:String,default:"Decrement"},modelValue:{type:Number,default:null},name:{type:String,default:"BFormSpinbutton"},disabled:{type:[Boolean,String],default:!1},placeholder:{type:String,required:!1},locale:{type:String,default:"locale"},form:{type:String,required:!1},inline:{type:Boolean,default:!1},size:{type:String,required:!1},formatterFn:{type:Function},readonly:{type:Boolean,default:!1},vertical:{type:Boolean,default:!1},repeatDelay:{type:[String,Number],default:dg},repeatInterval:{type:[String,Number],default:fg},repeatStepMultiplier:{type:[String,Number],default:hg},repeatThreshold:{type:[String,Number],default:pg},required:{type:[Boolean,String],default:!1},step:{type:[String,Number],default:cg},min:{type:[String,Number],default:lg},max:{type:[String,Number],default:ug},wrap:{type:Boolean,default:!1},state:{type:[Boolean,String],default:null}},emits:["update:modelValue","change"],setup(e,{emit:t}){const n=ke(!1),s=E(()=>1),r=()=>{t("change",o.value)},i=ke(null),o=E({get(){return hs(e.modelValue)?i.value:e.modelValue},set(oe){hs(e.modelValue)?i.value=oe:t("update:modelValue",oe)}});let l,u,d=!1;const c=E(()=>mo(e.step,cg)),p=E(()=>mo(e.min,lg)),m=E(()=>{const oe=mo(e.max,ug),le=c.value,Ae=p.value;return Math.floor((oe-Ae)/le)*le+Ae}),v=E(()=>{const oe=Us(e.repeatDelay,0);return oe>0?oe:dg}),w=E(()=>{const oe=Us(e.repeatInterval,0);return oe>0?oe:fg}),C=E(()=>Math.max(Us(e.repeatThreshold,pg),1)),k=E(()=>Math.max(Us(e.repeatStepMultiplier,hg),1)),x=E(()=>{const oe=c.value;return Math.floor(oe)===oe?0:(oe.toString().split(".")[1]||"").length}),O=E(()=>Math.pow(10,x.value||0)),I=E(()=>{const{value:oe}=o;return oe===null?"":oe.toFixed(x.value)}),N=E(()=>{const oe=[e.locale];return new Intl.NumberFormat(oe).resolvedOptions().locale}),B=E(()=>lR(N.value)),L=()=>{const oe=x.value;return new Intl.NumberFormat(N.value,{style:"decimal",useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:oe,maximumFractionDigits:oe,notation:"standard"}).format},j=E(()=>e.formatterFn?e.formatterFn:L()),F=E(()=>({role:"group",lang:N.value,tabindex:e.disabled?null:"-1",title:e.ariaLabel})),$=E(()=>!hs(e.modelValue)||!hs(i.value)),M=E(()=>({dir:B.value,spinId:s.value,tabindex:e.disabled?null:"0",role:"spinbutton","aria-live":"off","aria-label":e.ariaLabel||null,"aria-controls":e.ariaControls||null,"aria-invalid":e.state===!1||!$.value&&e.required?"true":null,"aria-required":e.required?"true":null,"aria-valuemin":p.value,"aria-valuemax":m.value,"aria-valuenow":hs(o.value)?null:o.value,"aria-valuetext":hs(o.value)?null:j.value(o.value)})),Q=oe=>{let{value:le}=o;if(!e.disabled&&!hs(le)){const Ae=c.value*oe,Ne=p.value,ue=m.value,z=O.value,{wrap:q}=e;le=Math.round((le-Ne)/Ae)*Ae+Ne+Ae,le=Math.round(le*z)/z,o.value=le>ue?q?Ne:ue:le{hs(o.value)?o.value=p.value:Q(1*oe)},ae=(oe=1)=>{hs(o.value)?o.value=e.wrap?m.value:p.value:Q(-1*oe)},Oe=oe=>{const{code:le,altKey:Ae,ctrlKey:Ne,metaKey:ue}=oe;if(!(e.disabled||e.readonly||Ae||Ne||ue)&&mg.includes(le)){if(Ea(oe,{propagation:!1}),d)return;K(),[Gc,Kc].includes(le)?(d=!0,le===Gc?be(oe,X):le===Kc&&be(oe,ae)):le===Zy?X(k.value):le===Qy?ae(k.value):le===Jy?o.value=p.value:le===Xy&&(o.value=m.value)}},ge=oe=>{const{code:le,altKey:Ae,ctrlKey:Ne,metaKey:ue}=oe;e.disabled||e.readonly||Ae||Ne||ue||mg.includes(le)&&(Ea(oe,{propagation:!1}),K(),d=!1,r())},be=(oe,le)=>{const{type:Ae}=oe||{};if(!e.disabled&&!e.readonly){if(fe(oe)&&Ae==="mousedown"&&oe.button)return;K(),le(1);const Ne=C.value,ue=k.value,z=v.value,q=w.value;l=setTimeout(()=>{let de=0;u=setInterval(()=>{le(de{fe(oe)&&oe.type==="mouseup"&&oe.button||(Ea(oe,{propagation:!1}),K(),Xe(!1),r())},Xe=oe=>{try{ag(oe,[document.body,"mouseup",$e,!1]),ag(oe,[document.body,"touchend",$e,!1])}catch{return 0}},K=()=>{clearTimeout(l),clearInterval(u),l=void 0,u=void 0},He=(oe,le,Ae,Ne,ue,z,q)=>{const de=Ke(Ae,{props:{scale:n.value?1.5:1.25},attrs:{"aria-hidden":"true"}}),Te={hasFocus:n.value},Qe=tt=>{!e.disabled&&!e.readonly&&(Ea(tt,{propagation:!1}),Xe(!0),be(tt,oe))};return Ke("button",{class:[{"py-0":!e.vertical},"btn","btn-sm","border-0","rounded-0"],tabindex:"-1",type:"button",disabled:e.disabled||e.readonly||z,"aria-disabled":e.disabled||e.readonly||z?"true":null,"aria-controls":s.value,"aria-label":le||null,"aria-keyshortcuts":ue||null,onmousedown:Qe,ontouchstart:Qe},[On(q,Te)||de])};return()=>{const oe=He(X,e.labelIncrement,Ke("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-plus",viewBox:"0 0 16 16"},Ke("path",{d:"M8 4a.5.5 0 0 1 .5.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3A.5.5 0 0 1 8 4z"})),"inc","ArrowUp",!1,"increment"),le=He(ae,e.labelDecrement,Ke("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",class:"bi bi-dash",viewBox:"0 0 16 16"},Ke("path",{d:"M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z"})),"dec","ArrowDown",!1,"decrement"),Ae=[];e.name&&!e.disabled&&Ae.push(Ke("input",{type:"hidden",name:e.name,form:e.form||null,value:I.value,key:"hidden"}));const Ne=Ke("output",{class:[{"d-flex":e.vertical},{"align-self-center":!e.vertical},{"align-items-center":e.vertical},{"border-top":e.vertical},{"border-bottom":e.vertical},{"border-start":!e.vertical},{"border-end":!e.vertical},"flex-grow-1"],...M.value,key:"output"},[Ke("bdi",$.value?j.value(o.value):e.placeholder||"")]);return Ke("div",{class:["b-form-spinbutton form-control",{disabled:e.disabled},{readonly:e.readonly},{focus:n},{"d-inline-flex":e.inline||e.vertical},{"d-flex":!e.inline&&!e.vertical},{"align-items-stretch":!e.vertical},{"flex-column":e.vertical},e.size?`form-control-${e.size}`:null],...F.value,onkeydown:Oe,onkeyup:ge},e.vertical?[oe,Ae,Ne,le]:[le,Ae,Ne,oe])}}}),pR=["TD","TH","TR"],hR=["a","a *","button","button *","input:not(.disabled):not([disabled])","select:not(.disabled):not([disabled])","textarea:not(.disabled):not([disabled])",'[role="link"]','[role="link"] *','[role="button"]','[role="button"] *',"[tabindex]:not(.disabled):not([disabled])"].join(","),Ta=e=>{if(!e||!e.target)return!1;const t=e.target;if("disabled"in t&&t.disabled||pR.indexOf(t.tagName)!==-1)return!1;if(zm(".dropdown-menu",t))return!0;const n=t.tagName==="LABEL"?t:zm("label",t);if(n){const s=zd(n,"for"),r=s?nI(s):oy("input, select, textarea",n);if(r&&!r.disabled)return!0}return ay(t,hR)},mR=()=>{const e=(o,l)=>{const u=[];return!(o!=null&&o.length)&&(l!=null&&l.length)?(Object.keys(l[0]).forEach(d=>u.push({key:d,label:Fm(d)})),u):(Array.isArray(o)&&o.forEach(d=>{typeof d=="string"?u.push({key:d,label:Fm(d)}):Vc(d)&&d.key&&typeof d.key=="string"&&u.push({...d})}),u)},t=ke([]),n=(o,l,u,d)=>(t.value=nl(l),"isFilterableTable"in d&&d.isFilterableTable.value===!0&&u.filter&&(t.value=i(t.value,u.filter,u.filterable)),"isSortable"in d&&d.isSortable.value===!0&&(t.value=r(o,t.value,{key:u.sortBy,desc:d.sortDescBoolean.value},u.sortCompare)),t.value),s=ke(void 0),r=(o,l,u,d)=>{if(!u||!u.key)return l;const c=u.key;return l.sort((p,m)=>{if(d!==void 0)return d(p,m,u.key,u.desc);const v=w=>typeof w=="object"?JSON.stringify(w):w;return v(p[c])>v(m[c])?u.desc?-1:1:v(m[c])>v(p[c])?u.desc?1:-1:0})},i=(o,l,u)=>o.filter(d=>Object.entries(d).filter(c=>{const[p,m]=c;return!m||p[0]==="_"||u.length>0&&!u.includes(p)?!1:(typeof m=="object"?JSON.stringify(Object.values(m)):typeof m=="string"?m:m.toString()).toLowerCase().includes(l.toLowerCase())}).length>0);return{normaliseFields:e,mapItems:n,internalItems:t,updateInternalItems:async o=>{try{return t.value=await Fc(o),t.value}catch{return}},filterEvent:s,notifyFilteredItems:()=>{s.value&&s.value(t.value)},formatItem:(o,l)=>{const u=o[l.key];return l.formatter&&typeof l.formatter=="function"?l.formatter(u,l.key,o):o[l.key]}}},gR=["title","abbr","onClick"],vR={class:"d-inline-flex flex-nowrap align-items-center gap-1"},bR={key:1},_R=["onClick","onDblclick","onMouseenter","onMouseleave"],yR={key:0,class:"b-table-stacked-label"},wR=["colspan"],ER=["colspan"],TR={class:"d-flex align-items-center justify-content-center gap-2"},CR=_e("strong",null,"Loading...",-1),SR={key:1,class:"b-table-empty-slot"},AR=["colspan"],xR={key:0},OR=["title","abbr","onClick"],kR={key:1},$R={key:2},NR={key:3},BR=Z({__name:"BTable",props:{align:null,caption:null,captionTop:{default:!1},borderless:{default:!1},bordered:{default:!1},borderVariant:null,dark:{default:!1},fields:{default:()=>[]},footClone:{default:!1},hover:{default:!1},items:{default:()=>[]},provider:null,sortCompare:null,noProvider:null,noProviderPaging:null,noProviderSorting:null,noProviderFiltering:null,responsive:{type:[Boolean,String],default:!1},small:{default:!1},striped:{default:!1},stacked:{type:[Boolean,String],default:!1},labelStacked:{type:Boolean,default:!1},variant:null,sortBy:null,sortDesc:{default:!1},sortInternal:{default:!0},selectable:{default:!1},stickySelect:{default:!1},selectHead:{type:[Boolean,String],default:!0},selectMode:{default:"single"},selectionVariant:{default:"primary"},stickyHeader:{default:!1},busy:{default:!1},showEmpty:{default:!1},perPage:null,currentPage:{default:1},filter:null,filterable:null,emptyText:{default:"There are no records to show"},emptyFilteredText:{default:"There are no records matching your request"}},emits:["headClicked","rowClicked","rowDblClicked","rowHovered","rowUnhovered","rowSelected","rowUnselected","selection","update:busy","update:sortBy","update:sortDesc","sorted","filtered"],setup(e,{expose:t,emit:n}){const s=e,r=Ht(),i=mR(),o=S(_(s,"footClone")),l=S(_(s,"sortDesc")),u=S(_(s,"sortInternal")),d=S(_(s,"selectable")),c=S(_(s,"stickySelect")),p=S(_(s,"labelStacked")),m=S(_(s,"busy")),v=S(_(s,"showEmpty")),w=S(_(s,"noProviderPaging")),C=S(_(s,"noProviderSorting")),k=S(_(s,"noProviderFiltering")),x=ke(m.value);i.filterEvent.value=async g=>{if($.value){await le();return}const T=await Fc(g);n("filtered",T)};const O=ke(new Set([])),I=E(()=>O.value.size>0),N=E(()=>({[`align-${s.align}`]:s.align!==void 0,"b-table-selectable":d.value,[`b-table-select-${s.selectMode}`]:d.value,"b-table-selecting user-select-none":d.value&&I.value,"b-table-busy":x.value,"b-table-sortable":Q.value,"b-table-sort-desc":Q.value&&l.value===!0,"b-table-sort-asc":Q.value&&l.value===!1})),B=E(()=>({bordered:s.bordered,borderless:s.borderless,borderVariant:s.borderVariant,captionTop:s.captionTop,dark:s.dark,hover:s.hover,responsive:s.responsive,striped:s.striped,stacked:s.stacked,small:s.small,tableClass:N.value,tableVariant:s.variant,stickyHeader:s.stickyHeader})),L=E(()=>i.normaliseFields(s.fields,s.items)),j=E(()=>L.value.length+(d.value?1:0)),F=E(()=>s.filter!==void 0&&s.filter!==""),$=E(()=>s.provider!==void 0),M=E(()=>d.value&&(!!s.selectHead||r.selectHead!==void 0)),Q=E(()=>s.fields.filter(g=>typeof g=="string"?!1:g.sortable).length>0),X=E(()=>Q.value&&u.value===!0),ae=E(()=>{const g=$.value?i.internalItems.value:X.value?i.mapItems(s.fields,s.items,s,{isSortable:Q,isFilterableTable:F,sortDescBoolean:l}):s.items;if(s.perPage!==void 0){const T=(s.currentPage-1)*s.perPage;return g.splice(T,s.perPage)}return g}),Oe=g=>typeof g=="string"?Hm(g):g.label!==void 0?g.label:typeof g.key=="string"?Hm(g.key):g.key,ge=(g,T,D=!1)=>{const R=typeof g=="string"?g:g.key;n("headClicked",R,g,T,D),K(g)},be=(g,T,D)=>{n("rowClicked",g,T,D),oe(g,T,D.shiftKey)},fe=(g,T,D)=>n("rowDblClicked",g,T,D),$e=(g,T,D)=>n("rowHovered",g,T,D),Xe=(g,T,D)=>n("rowUnhovered",g,T,D),K=g=>{if(!Q.value)return;const T=typeof g=="string"?g:g.key,D=typeof g=="string"?!1:g.sortable;if(Q.value===!0&&D===!0){const R=!l.value;T!==s.sortBy&&n("update:sortBy",T),n("update:sortDesc",R),n("sorted",T,R)}},He=()=>{!d.value||n("selection",Array.from(O.value))},oe=(g,T,D=!1)=>{if(d.value){if(O.value.has(g))O.value.delete(g),n("rowUnselected",g);else if(s.selectMode==="single"&&O.value.size>0&&(O.value.forEach(R=>n("rowUnselected",R)),O.value.clear()),s.selectMode==="range"&&O.value.size>0&&D){const R=Array.from(O.value).pop(),W=ae.value.findIndex(ie=>ie===R),J=Math.min(W,T),he=Math.max(W,T);ae.value.slice(J,he+1).forEach(ie=>{O.value.has(ie)||(O.value.add(ie),n("rowSelected",ie))})}else O.value.add(g),n("rowSelected",g);He()}},le=async()=>{if(!$.value||!s.provider||x.value)return;x.value=!0;const g=new Proxy({currentPage:s.currentPage,filter:s.filter,sortBy:s.sortBy,sortDesc:s.sortDesc,perPage:s.perPage},{get(D,R){return R in D?D[R]:void 0},set(){return console.error("BTable provider context is a read-only object."),!0}}),T=s.provider(g,i.updateInternalItems);if(T!==void 0){if(T instanceof Promise)try{const D=await T;return Array.isArray(D)?await i.updateInternalItems(D):void 0}finally{x.value&&(x.value=!1)}try{return await i.updateInternalItems(T)}finally{x.value&&(x.value=!1)}}},Ae=g=>{g._showDetails=!g._showDetails},Ne=g=>[g.class,g.thClass,g.variant?`table-${g.variant}`:void 0,{"b-table-sortable-column":Q.value&&g.sortable,"b-table-sticky-column":g.stickyColumn}],ue=(g,T)=>[g.class,g.tdClass,g.variant?`table-${g.variant}`:void 0,T!=null&&T._cellVariants&&(T!=null&&T._cellVariants[g.key])?`table-${T==null?void 0:T._cellVariants[g.key]}`:void 0,{"b-table-sticky-column":g.stickyColumn}],z=g=>[g._rowVariant?`table-${g._rowVariant}`:null,g._rowVariant?`table-${g._rowVariant}`:null,d.value&&O.value.has(g)?`selected table-${s.selectionVariant}`:null],q=()=>{if(!d.value)return;const g=O.value.size>0?Array.from(O.value):[];O.value=new Set([...ae.value]),O.value.forEach(T=>{g.includes(T)||n("rowSelected",T)}),He()},de=()=>{!d.value||(O.value.forEach(g=>{n("rowUnselected",g)}),O.value=new Set([]),He())},Te=g=>{if(!d.value)return;const T=ae.value[g];!T||O.value.has(T)||(O.value.add(T),n("rowSelected",T),He())},Qe=g=>{if(!d.value)return;const T=ae.value[g];!T||!O.value.has(T)||(O.value.delete(T),n("rowUnselected",T),He())},tt=async(g,T,D)=>{if(T===D)return;const R=ce=>s.noProvider&&s.noProvider.includes(ce),W=!["currentPage","perPage"].includes(g),J=["currentPage","perPage"].includes(g)&&(R("paging")||w.value===!0),he=["filter"].includes(g)&&(R("filtering")||k.value===!0),ie=["sortBy","sortDesc"].includes(g)&&(R("sorting")||C.value===!0);J||he||ie||(await le(),W&&i.notifyFilteredItems())};return dt(()=>s.filter,(g,T)=>{g===T||$.value||g||Fc(s.items).then(D=>n("filtered",D))}),dt(()=>x.value,()=>x.value!==m.value&&n("update:busy",x.value)),dt(()=>m.value,()=>x.value!==m.value&&(x.value=m.value)),dt(()=>s.filter,(g,T)=>tt("filter",g,T)),dt(()=>s.currentPage,(g,T)=>tt("currentPage",g,T)),dt(()=>s.perPage,(g,T)=>tt("perPage",g,T)),dt(()=>s.sortBy,(g,T)=>tt("sortBy",g,T)),dt(()=>s.sortDesc,(g,T)=>tt("sortDesc",g,T)),$t(()=>{$.value&&le()}),t({selectAllRows:q,clearSelected:de,selectRow:Te,unselectRow:Qe}),(g,T)=>(A(),re(jl,Ot(Ft(b(B))),{default:me(()=>{var D;return[_e("thead",null,[g.$slots["thead-top"]?U(g.$slots,"thead-top",{key:0}):xe("",!0),_e("tr",null,[b(M)?(A(),H("th",{key:0,class:ne(["b-table-selection-column",{"b-table-sticky-column":b(c)}])},[U(g.$slots,"select-head",{},()=>[Fe(Ee(typeof e.selectHead=="boolean"?"Selected":e.selectHead),1)])],2)):xe("",!0),(A(!0),H(Re,null,ht(b(L),R=>(A(),H("th",Le({key:R.key,scope:"col",class:Ne(R),title:R.headerTitle,abbr:R.headerAbbr,style:R.thStyle},R.thAttr,{onClick:W=>ge(R,W)}),[_e("div",vR,[U(g.$slots,"sort-icon",{field:R,sortBy:e.sortBy,selected:R.key===e.sortBy,isDesc:b(l),direction:b(l)?"desc":"asc"},()=>[b(Q)&&R.sortable?(A(),H("span",{key:0,class:ne(["b-table-sort-icon",{sorted:R.key===e.sortBy,[`sorted-${b(l)?"desc":"asc"}`]:R.key===e.sortBy}])},null,2)):xe("",!0)]),_e("div",null,[g.$slots["head("+R.key+")"]||g.$slots["head()"]?U(g.$slots,g.$slots["head("+R.key+")"]?"head("+R.key+")":"head()",{key:0,label:R.label}):(A(),H(Re,{key:1},[Fe(Ee(Oe(R)),1)],64))])])],16,gR))),128))]),g.$slots["thead-sub"]?(A(),H("tr",bR,[(A(!0),H(Re,null,ht(b(L),R=>(A(),H("td",{key:R.key,scope:"col",class:ne([R.class,R.thClass,R.variant?`table-${R.variant}`:""])},[g.$slots["thead-sub"]?U(g.$slots,"thead-sub",Le({key:0,items:b(L)},R)):(A(),H(Re,{key:1},[Fe(Ee(R.label),1)],64))],2))),128))])):xe("",!0)]),_e("tbody",null,[(A(!0),H(Re,null,ht(b(ae),(R,W)=>(A(),H(Re,{key:W},[_e("tr",{class:ne(z(R)),onClick:J=>!b(Ta)(J)&&be(R,W,J),onDblclick:J=>!b(Ta)(J)&&fe(R,W,J),onMouseenter:J=>!b(Ta)(J)&&$e(R,W,J),onMouseleave:J=>!b(Ta)(J)&&Xe(R,W,J)},[b(M)?(A(),H("td",{key:0,class:ne(["b-table-selection-column",{"b-table-sticky-column":b(c)}])},[U(g.$slots,"select-cell",{},()=>[_e("span",{class:ne(O.value.has(R)?"text-primary":"")},"🗹",2)])],2)):xe("",!0),(A(!0),H(Re,null,ht(b(L),J=>(A(),H("td",Le({key:J.key},J.tdAttr,{class:ue(J,R)}),[e.stacked&&b(p)?(A(),H("label",yR,Ee(Oe(J)),1)):xe("",!0),g.$slots["cell("+J.key+")"]||g.$slots["cell()"]?U(g.$slots,g.$slots["cell("+J.key+")"]?"cell("+J.key+")":"cell()",{key:1,value:R[J.key],index:W,item:R,field:J,items:e.items,toggleDetails:()=>Ae(R),detailsShowing:R._showDetails}):(A(),H(Re,{key:2},[Fe(Ee(b(i).formatItem(R,J)),1)],64))],16))),128))],42,_R),R._showDetails===!0&&g.$slots["row-details"]?(A(),H("tr",{key:0,class:ne(z(R))},[_e("td",{colspan:b(j)},[U(g.$slots,"row-details",{item:R,toggleDetails:()=>Ae(R)})],8,wR)],2)):xe("",!0)],64))),128)),x.value?(A(),H("tr",{key:0,class:ne(["b-table-busy-slot",{"b-table-static-busy":b(ae).length==0}])},[_e("td",{colspan:b(j)},[U(g.$slots,"table-busy",{},()=>[_e("div",TR,[Ye(Hl,{class:"align-middle"}),CR])])],8,ER)],2)):xe("",!0),b(v)&&b(ae).length===0?(A(),H("tr",SR,[_e("td",{colspan:b(j)},[U(g.$slots,"empty",{items:b(ae),filtered:b(F)},()=>[Fe(Ee(b(F)?e.emptyFilteredText:e.emptyText),1)])],8,AR)])):xe("",!0)]),b(o)?(A(),H("tfoot",xR,[_e("tr",null,[(A(!0),H(Re,null,ht(b(L),R=>(A(),H("th",Le({key:R.key},R.thAttr,{scope:"col",class:[R.class,R.thClass,R.variant?`table-${R.variant}`:""],title:R.headerTitle,abbr:R.headerAbbr,style:R.thStyle,onClick:W=>ge(R,W,!0)}),Ee(R.label),17,OR))),128))])])):g.$slots["custom-foot"]?(A(),H("tfoot",kR,[U(g.$slots,"custom-foot",{fields:b(L),items:e.items,columns:(D=b(L))==null?void 0:D.length})])):xe("",!0),g.$slots["table-caption"]?(A(),H("caption",$R,[U(g.$slots,"table-caption")])):e.caption?(A(),H("caption",NR,Ee(e.caption),1)):xe("",!0)]}),_:3},16))}}),IR=Z({__name:"BTbody",props:{variant:null},setup(e){const t=e,n=E(()=>({[`thead-${t.variant}`]:t.variant!==void 0}));return(s,r)=>(A(),H("tbody",{role:"rowgroup",class:ne(b(n))},[U(s.$slots,"default")],2))}}),PR=["scope","colspan","rowspan","data-label"],LR={key:0},DR=Z({__name:"BTd",props:{colspan:null,rowspan:null,stackedHeading:null,stickyColumn:{default:!1},variant:null},setup(e){const t=e,n=S(_(t,"stickyColumn")),s=E(()=>({[`table-${t.variant}`]:t.variant!==void 0,"b-table-sticky-column":n.value,"table-b-table-default":n.value&&t.variant===void 0})),r=E(()=>t.colspan?"colspan":t.rowspan?"rowspan":"col");return(i,o)=>(A(),H("td",{role:"cell",scope:b(r),class:ne(b(s)),colspan:e.colspan,rowspan:e.rowspan,"data-label":e.stackedHeading},[e.stackedHeading?(A(),H("div",LR,[U(i.$slots,"default")])):U(i.$slots,"default",{key:1})],10,PR))}}),RR=Z({__name:"BTfoot",props:{variant:null},setup(e){const t=e,n=E(()=>({[`table-${t.variant}`]:t.variant!==void 0}));return(s,r)=>(A(),H("tfoot",{role:"rowgroup",class:ne(b(n))},[U(s.$slots,"default")],2))}}),VR=["scope","colspan","rowspan","data-label"],MR={key:0},FR=Z({__name:"BTh",props:{colspan:null,rowspan:null,stackedHeading:null,stickyColumn:{default:!1},variant:null},setup(e){const t=e,n=S(_(t,"stickyColumn")),s=E(()=>({[`table-${t.variant}`]:t.variant!==void 0,"b-table-sticky-column":n.value,"table-b-table-default":n.value&&t.variant===void 0})),r=E(()=>t.colspan?"colspan":t.rowspan?"rowspan":"col");return(i,o)=>(A(),H("th",{role:"columnheader",scope:b(r),class:ne(b(s)),colspan:e.colspan,rowspan:e.rowspan,"data-label":e.stackedHeading},[e.stackedHeading!==void 0?(A(),H("div",MR,[U(i.$slots,"default")])):U(i.$slots,"default",{key:1})],10,VR))}}),HR=Z({__name:"BThead",props:{variant:null},setup(e){const t=e,n=E(()=>({[`table-${t.variant}`]:t.variant!==void 0}));return(s,r)=>(A(),H("thead",{role:"rowgroup",class:ne(b(n))},[U(s.$slots,"default")],2))}}),jR=Z({__name:"BTr",props:{variant:null},setup(e){const t=e,n=E(()=>({[`table-${t.variant}`]:t.variant!==void 0}));return(s,r)=>(A(),H("tr",{role:"row",class:ne(b(n))},[U(s.$slots,"default")],2))}}),zR=["id","data-bs-target","aria-controls","aria-selected","onClick"],e0=Symbol(),UR=Z({__name:"BTabs",props:{activeNavItemClass:null,activeTabClass:null,align:null,card:{default:!1},contentClass:null,end:{default:!1},fill:{default:!1},id:null,justified:{default:!1},lazy:{default:!1},navClass:null,navWrapperClass:null,noFade:{default:!1},noNavStyle:{default:!1},pills:{default:!1},small:{default:!1},tag:{default:"div"},vertical:{default:!1},modelValue:{default:-1}},emits:["update:modelValue","activate-tab","click"],setup(e,{emit:t}){const n=e,s=Ht(),r=S(_(n,"card")),i=S(_(n,"end")),o=S(_(n,"fill")),l=S(_(n,"justified")),u=S(_(n,"lazy")),d=S(_(n,"noFade")),c=S(_(n,"noNavStyle")),p=S(_(n,"pills")),m=S(_(n,"small")),v=S(_(n,"vertical")),w=ke(n.modelValue),C=ke(""),k=E({get:()=>w.value,set:$=>{w.value=$,x.value.length>0&&$>=0&&${let $=[];return s.default&&($=F(s).map((M,Q)=>{M.props||(M.props={});const X=M.props["button-id"]||ys("tab"),ae=M.props.id||ys(),Oe=k.value>-1?Q===k.value:M.props.active==="",ge=M.props["title-item-class"],be=M.props["title-link-attributes"];return{buttonId:X,contentId:ae,active:Oe,disabled:M.props.disabled===""||M.props.disabled===!0,navItemClasses:[{active:Oe,disabled:M.props.disabled===""||M.props.disabled===!0},Oe&&n.activeNavItemClass?n.activeNavItemClass:null,M.props["title-link-class"]],tabClasses:[{fade:!d.value},Oe&&n.activeTabClass?n.activeTabClass:null],target:`#${ae}`,title:M.props.title,titleItemClass:ge,titleLinkAttributes:be,onClick:M.props.onClick,tab:M,tabComponent:()=>F(s)[Q]}})),$}),O=E(()=>!(x!=null&&x.value&&x.value.length>0)),I=E(()=>({"d-flex":v.value,"align-items-start":v.value})),N=Ho(_(n,"align")),B=E(()=>({"nav-pills":p.value,"flex-column me-3":v.value,[N.value]:n.align!==void 0,"nav-fill":o.value,"card-header-tabs":r.value,"nav-justified":l.value,"nav-tabs":!c.value&&!p.value,small:m.value})),L=$=>{let M=!1;if($!==void 0&&$>-1&&${var Q;L(M),M>=0&&!x.value[M].disabled&&((Q=x.value[M])!=null&&Q.onClick)&&typeof x.value[M].onClick=="function"&&x.value[M].onClick($)},F=$=>!$||!$.default?[]:$.default().reduce((M,Q)=>(typeof Q.type=="symbol"?M=M.concat(Q.children):M.push(Q),M),[]).filter(M=>{var Q;return((Q=M.type)==null?void 0:Q.__name)==="BTab"});return L(w.value),dt(()=>n.modelValue,($,M)=>{if($===M)return;if($=Math.max($,-1),M=Math.max(M,-1),x.value.length<=0){k.value=-1;return}const Q=$>M;let X=$;const ae=x.value.length-1;for(;X>=0&&X<=ae&&x.value[X].disabled;)X+=Q?1:-1;if(X<0){L(0);return}if(X>=x.value.length){L(x.value.length-1);return}L(X)}),dt(()=>x.value,()=>{let $=x.value.map(M=>M.active&&!M.disabled).lastIndexOf(!0);$<0&&(k.value>=x.value.length?$=x.value.map(M=>!M.disabled).lastIndexOf(!0):x.value[k.value]&&!x.value[k.value].disabled&&($=k.value)),$<0&&($=x.value.map(M=>!M.disabled).indexOf(!0)),x.value.forEach((M,Q)=>M.active=Q===$),L($)}),$t(()=>{if(k.value<0&&x.value.length>0&&!x.value.some($=>$.active)){const $=x.value.map(M=>!M.disabled).indexOf(!0);L($>=0?$:-1)}}),rs(e0,{lazy:u.value,card:r.value}),($,M)=>(A(),re(Ve(e.tag),{id:e.id,class:ne(["tabs",b(I)])},{default:me(()=>[b(i)?(A(),H("div",{key:0,class:ne(["tab-content",e.contentClass])},[(A(!0),H(Re,null,ht(b(x),({tabComponent:Q,contentId:X,tabClasses:ae,active:Oe},ge)=>(A(),re(Ve(Q()),{id:X,key:ge,class:ne(ae),active:Oe},null,8,["id","class","active"]))),128)),b(O)?(A(),H("div",{key:"bv-empty-tab",class:ne(["tab-pane active",{"card-body":b(r)}])},[U($.$slots,"empty")],2)):xe("",!0)],2)):xe("",!0),_e("div",{class:ne([e.navWrapperClass,{"card-header":b(r),"ms-auto":e.vertical&&b(i)}])},[_e("ul",{class:ne(["nav",[b(B),e.navClass]]),role:"tablist"},[U($.$slots,"tabs-start"),(A(!0),H(Re,null,ht(b(x),({tab:Q,buttonId:X,contentId:ae,navItemClasses:Oe,active:ge,target:be},fe)=>(A(),H("li",{key:fe,class:ne(["nav-item",Q.props["title-item-class"]])},[_e("button",Le({id:X,class:["nav-link",Oe],"data-bs-toggle":"tab","data-bs-target":be,role:"tab","aria-controls":ae,"aria-selected":ge},Q.props["title-link-attributes"],{onClick:vl($e=>j($e,fe),["stop","prevent"])}),[Q.children&&Q.children.title?(A(),re(Ve(Q.children.title),{key:0})):(A(),H(Re,{key:1},[Fe(Ee(Q.props.title),1)],64))],16,zR)],2))),128)),U($.$slots,"tabs-end")],2)],2),b(i)?xe("",!0):(A(),H("div",{key:1,class:ne(["tab-content",e.contentClass])},[(A(!0),H(Re,null,ht(b(x),({tabComponent:Q,contentId:X,tabClasses:ae,active:Oe},ge)=>(A(),re(Ve(Q()),{id:X,key:ge,class:ne(ae),active:Oe},null,8,["id","class","active"]))),128)),b(O)?(A(),H("div",{key:"bv-empty-tab",class:ne(["tab-pane active",{"card-body":b(r)}])},[U($.$slots,"empty")],2)):xe("",!0)],2))]),_:3},8,["id","class"]))}}),qR=Z({__name:"BTab",props:{id:null,title:null,active:{default:!1},buttonId:{default:void 0},disabled:{default:!1},lazy:{default:void 0},lazyOnce:{default:void 0},noBody:{type:[Boolean,String],default:!1},tag:{default:"div"},titleItemClass:null,titleLinkAttributes:{default:void 0},titleLinkClass:null},setup(e){const t=e,n=Ct(e0,null),s=S(_(t,"active")),r=S(_(t,"disabled")),i=S(_(t,t.lazyOnce!==void 0?"lazyOnce":"lazy")),o=ke(!1),l=E(()=>!!(n!=null&&n.lazy||i.value)),u=E(()=>t.lazyOnce!==void 0),d=E(()=>s.value&&!r.value),c=E(()=>{const m=l.value&&u.value&&o.value;return d.value||!l.value||m}),p=E(()=>({active:s.value,show:s.value,"card-body":(n==null?void 0:n.card)&&t.noBody===!1}));return dt(()=>c.value,m=>{m&&!o.value&&(o.value=!0)}),(m,v)=>(A(),re(Ve(e.tag),{id:e.id,class:ne(["tab-pane",b(p)]),role:"tabpanel","aria-labelledby":"profile-tab"},{default:me(()=>[b(c)?U(m.$slots,"default",{key:0}):xe("",!0)]),_:3},8,["id","class"]))}}),WR=Object.freeze(Object.defineProperty({__proto__:null,BAccordion:dI,BAccordionItem:AI,BAlert:PI,BAvatar:MI,BAvatarGroup:LI,BBadge:jI,BBreadcrumb:KI,BBreadcrumbItem:Cy,BButton:xi,BButtonGroup:GI,BButtonToolbar:XI,BCloseButton:Di,BCard:Ny,BCardBody:ky,BCardFooter:$y,BCardGroup:QI,BCardHeader:Ay,BCardImg:rl,BCardSubtitle:Oy,BCardText:ZI,BCardTitle:xy,BCarousel:cP,BCarouselSlide:gP,BCol:to,BCollapse:wy,BContainer:CP,BDropdown:Dy,BDropdownDivider:OP,BDropdownForm:IP,BDropdownGroup:RP,BDropdownHeader:HP,BDropdownItem:zP,BDropdownItemButton:WP,BDropdownText:YP,BForm:Ry,BFormFloatingLabel:ZP,BFormInvalidFeedback:Uc,BFormRow:Ra,BFormText:qc,BFormValidFeedback:Wc,BFormCheckbox:Vy,BFormCheckboxGroup:oL,BFormGroup:hL,BFormInput:bL,BFormRadio:Fy,BFormRadioGroup:CL,BFormSelect:OL,BFormSelectOption:Gd,BFormSelectOptionGroup:Hy,BFormTag:jy,BFormTags:zL,BFormTextarea:KL,BImg:Kd,BInputGroup:eD,BInputGroupAddon:Yd,BInputGroupAppend:tD,BInputGroupPrepend:nD,BInputGroupText:zy,BLink:_n,BListGroup:sD,BListGroupItem:rD,BModal:uD,BNav:cD,BNavForm:dD,BNavItem:mD,BNavItemDropdown:vD,BNavText:_D,BNavbar:yD,BNavbarBrand:TD,BNavbarNav:CD,BNavbarToggle:AD,BOffcanvas:BD,BOverlay:ID,BPagination:jD,BPlaceholder:xn,BPlaceholderButton:Ky,BPlaceholderCard:zD,BPlaceholderTable:UD,BPlaceholderWrapper:qD,BPopover:JD,BProgress:ZD,BProgressBar:Gy,BRow:nR,BSkeleton:Va,BSkeletonIcon:sR,BSkeletonTable:oR,BSkeletonWrapper:aR,BSpinner:Hl,BFormSpinButton:fR,BTable:BR,BTableSimple:jl,BTbody:IR,BTd:DR,BTfoot:RR,BTh:FR,BThead:HR,BTr:jR,BTab:qR,BTabs:UR,BToastContainer:zc,BTransition:jo,BToast:Ly,BToaster:zc,BToastPlugin:EP},Symbol.toStringTag,{value:"Module"})),KR=Object.freeze(Object.defineProperty({__proto__:null,vBColorMode:fI,vBPopover:pI,vBToggle:Wd,vBTooltip:_I,vBVisible:wI},Symbol.toStringTag,{value:"Module"})),GR={install(e,t={}){Object.entries(WR).forEach(([n,s])=>{e.component(n,s)}),Object.entries(KR).forEach(([n,s])=>{e.directive(n,s)}),lI(e)}};var YR={BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ri=Uv(zC);xt.defaults.baseURL=YR.VITE_API_URL;Ri.config.globalProperties.axios=xt;Ri.use(IT());Ri.use($b);Ri.use(hx,{});Ri.use(GR);Ri.mount("#app");export{PE as A,b as B,ne as C,mx as D,me as E,Re as F,QR as G,JR as H,rn as I,bA as J,xt as K,A as a,H as b,E as c,Z as d,_e as e,ki as f,ht as g,XR as h,Ye as i,xe as j,re as k,Fe as l,$b as m,Cr as n,$t as o,vl as p,Ke as q,ke as r,eV as s,Ee as t,ZR as u,TT as v,dt as w,ld as x,al as y,Bo as z}; diff --git a/src/main/resources/static/assets/oss-Bq2sfj0Q.js b/src/main/resources/static/assets/oss-Bq2sfj0Q.js new file mode 100644 index 0000000..9df5394 --- /dev/null +++ b/src/main/resources/static/assets/oss-Bq2sfj0Q.js @@ -0,0 +1 @@ +import{s as e}from"./request-CmxyMwC5.js";const o=()=>e.get("/ossType/list"),n=()=>e.get("/ossType/filter/list"),r=()=>e.get("/oss/list"),i=s=>e.get(`/oss/list/${s}`);function c(s){return e.get(`/oss/duplicate?ossName=${s.ossName}&ossUrl=${s.ossUrl}&ossUsername=${s.ossUsername}`)}function u(s){return e.post("/oss/connection-check",s)}function a(s){return e.get("/oss/"+s)}function l(s){return e.post("/oss",s)}function g(s){return e.patch(`/oss/${s.ossIdx}`,s)}function f(s){return e.delete(`/oss/${s}`)}export{n as a,o as b,f as c,c as d,r as e,i as f,a as g,u as o,l as r,g as u}; diff --git a/src/main/resources/static/assets/request-CmxyMwC5.js b/src/main/resources/static/assets/request-CmxyMwC5.js new file mode 100644 index 0000000..7cfc1bf --- /dev/null +++ b/src/main/resources/static/assets/request-CmxyMwC5.js @@ -0,0 +1,22 @@ +var Ct=Object.defineProperty;var Et=(l,e,t)=>e in l?Ct(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var b=(l,e,t)=>Et(l,typeof e!="symbol"?e+"":e,t);import{d as yt,r as Ge,w as je,o as Rt,a as xt,b as Tt,u as kt,K as Ke}from"./index-BPhSkGh_.js";class M{constructor(e){this.table=e}reloadData(e,t,i){return this.table.dataLoader.load(e,void 0,void 0,void 0,t,i)}langText(){return this.table.modules.localize.getText(...arguments)}langBind(){return this.table.modules.localize.bind(...arguments)}langLocale(){return this.table.modules.localize.getLocale(...arguments)}commsConnections(){return this.table.modules.comms.getConnections(...arguments)}commsSend(){return this.table.modules.comms.send(...arguments)}layoutMode(){return this.table.modules.layout.getMode()}layoutRefresh(e){return this.table.modules.layout.layout(e)}subscribe(){return this.table.eventBus.subscribe(...arguments)}unsubscribe(){return this.table.eventBus.unsubscribe(...arguments)}subscribed(e){return this.table.eventBus.subscribed(e)}subscriptionChange(){return this.table.eventBus.subscriptionChange(...arguments)}dispatch(){return this.table.eventBus.dispatch(...arguments)}chain(){return this.table.eventBus.chain(...arguments)}confirm(){return this.table.eventBus.confirm(...arguments)}dispatchExternal(){return this.table.externalEvents.dispatch(...arguments)}subscribedExternal(e){return this.table.externalEvents.subscribed(e)}subscriptionChangeExternal(){return this.table.externalEvents.subscriptionChange(...arguments)}options(e){return this.table.options[e]}setOption(e,t){return typeof t<"u"&&(this.table.options[e]=t),this.table.options[e]}deprecationCheck(e,t,i){return this.table.deprecationAdvisor.check(e,t,i)}deprecationCheckMsg(e,t){return this.table.deprecationAdvisor.checkMsg(e,t)}deprecationMsg(e){return this.table.deprecationAdvisor.msg(e)}module(e){return this.table.module(e)}}class x{static elVisible(e){return!(e.offsetWidth<=0&&e.offsetHeight<=0)}static elOffset(e){var t=e.getBoundingClientRect();return{top:t.top+window.pageYOffset-document.documentElement.clientTop,left:t.left+window.pageXOffset-document.documentElement.clientLeft}}static retrieveNestedData(e,t,i){var s=e?t.split(e):[t],n=s.length,r;for(let o=0;od.subject===o),a>-1?t[r]=i[a].copy:(h=Object.assign(Array.isArray(o)?[]:{},o),i.unshift({subject:o,copy:h}),t[r]=this.deepClone(o,h,i)))}return t}}let Mt=class qe extends M{constructor(e,t,i){super(e),this.element=t,this.container=this._lookupContainer(),this.parent=i,this.reversedX=!1,this.childPopup=null,this.blurable=!1,this.blurCallback=null,this.blurEventsBound=!1,this.renderedCallback=null,this.visible=!1,this.hideable=!0,this.element.classList.add("tabulator-popup-container"),this.blurEvent=this.hide.bind(this,!1),this.escEvent=this._escapeCheck.bind(this),this.destroyBinding=this.tableDestroyed.bind(this),this.destroyed=!1}tableDestroyed(){this.destroyed=!0,this.hide(!0)}_lookupContainer(){var e=this.table.options.popupContainer;return typeof e=="string"?(e=document.querySelector(e),e||console.warn("Menu Error - no container element found matching selector:",this.table.options.popupContainer,"(defaulting to document body)")):e===!0&&(e=this.table.element),e&&!this._checkContainerIsParent(e)&&(e=!1,console.warn("Menu Error - container element does not contain this table:",this.table.options.popupContainer,"(defaulting to document body)")),e||(e=document.body),e}_checkContainerIsParent(e,t=this.table.element){return e===t?!0:t.parentNode?this._checkContainerIsParent(e,t.parentNode):!1}renderCallback(e){this.renderedCallback=e}containerEventCoords(e){var t=!(e instanceof MouseEvent),i=t?e.touches[0].pageX:e.pageX,s=t?e.touches[0].pageY:e.pageY;if(this.container!==document.body){let n=x.elOffset(this.container);i-=n.left,s-=n.top}return{x:i,y:s}}elementPositionCoords(e,t="right"){var i=x.elOffset(e),s,n,r;switch(this.container!==document.body&&(s=x.elOffset(this.container),i.left-=s.left,i.top-=s.top),t){case"right":n=i.left+e.offsetWidth,r=i.top-1;break;case"bottom":n=i.left,r=i.top+e.offsetHeight;break;case"left":n=i.left,r=i.top-1;break;case"top":n=i.left,r=i.top;break;case"center":n=i.left+e.offsetWidth/2,r=i.top+e.offsetHeight/2;break}return{x:n,y:r,offset:i}}show(e,t){var i,s,n,r,o;return this.destroyed||this.table.destroyed?this:(e instanceof HTMLElement?(n=e,o=this.elementPositionCoords(e,t),r=o.offset,i=o.x,s=o.y):typeof e=="number"?(r={top:0,left:0},i=e,s=t):(o=this.containerEventCoords(e),i=o.x,s=o.y,this.reversedX=!1),this.element.style.top=s+"px",this.element.style.left=i+"px",this.container.appendChild(this.element),typeof this.renderedCallback=="function"&&this.renderedCallback(),this._fitToScreen(i,s,n,r,t),this.visible=!0,this.subscribe("table-destroy",this.destroyBinding),this.element.addEventListener("mousedown",a=>{a.stopPropagation()}),this)}_fitToScreen(e,t,i,s,n){var r=this.container===document.body?document.documentElement.scrollTop:this.container.scrollTop;(e+this.element.offsetWidth>=this.container.offsetWidth||this.reversedX)&&(this.element.style.left="",i?this.element.style.right=this.container.offsetWidth-s.left+"px":this.element.style.right=this.container.offsetWidth-e+"px",this.reversedX=!0);let o=Math.max(this.container.offsetHeight,r?this.container.scrollHeight:0);if(t+this.element.offsetHeight>o)if(i)switch(n){case"bottom":this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight-i.offsetHeight-1+"px";break;default:this.element.style.top=parseInt(this.element.style.top)-this.element.offsetHeight+i.offsetHeight+1+"px"}else this.element.style.height=o+"px"}isVisible(){return this.visible}hideOnBlur(e){return this.blurable=!0,this.visible&&(setTimeout(()=>{this.visible&&(this.table.rowManager.element.addEventListener("scroll",this.blurEvent),this.subscribe("cell-editing",this.blurEvent),document.body.addEventListener("click",this.blurEvent),document.body.addEventListener("contextmenu",this.blurEvent),document.body.addEventListener("mousedown",this.blurEvent),window.addEventListener("resize",this.blurEvent),document.body.addEventListener("keydown",this.escEvent),this.blurEventsBound=!0)},100),this.blurCallback=e),this}_escapeCheck(e){e.keyCode==27&&this.hide()}blockHide(){this.hideable=!1}restoreHide(){this.hideable=!0}hide(e=!1){return this.visible&&this.hideable&&(this.blurable&&this.blurEventsBound&&(document.body.removeEventListener("keydown",this.escEvent),document.body.removeEventListener("click",this.blurEvent),document.body.removeEventListener("contextmenu",this.blurEvent),document.body.removeEventListener("mousedown",this.blurEvent),window.removeEventListener("resize",this.blurEvent),this.table.rowManager.element.removeEventListener("scroll",this.blurEvent),this.unsubscribe("cell-editing",this.blurEvent),this.blurEventsBound=!1),this.childPopup&&this.childPopup.hide(),this.parent&&(this.parent.childPopup=null),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.visible=!1,this.blurCallback&&!e&&this.blurCallback(),this.unsubscribe("table-destroy",this.destroyBinding)),this}child(e){return this.childPopup&&this.childPopup.hide(),this.childPopup=new qe(this.table,e,this),this.childPopup}};class w extends M{constructor(e,t){super(e),this._handler=null}initialize(){}registerTableOption(e,t){this.table.optionsList.register(e,t)}registerColumnOption(e,t){this.table.columnManager.optionsList.register(e,t)}registerTableFunction(e,t){typeof this.table[e]>"u"?this.table[e]=(...i)=>(this.table.initGuard(e),t(...i)):console.warn("Unable to bind table function, name already in use",e)}registerComponentFunction(e,t,i){return this.table.componentFunctionBinder.bind(e,t,i)}registerDataHandler(e,t){this.table.rowManager.registerDataPipelineHandler(e,t),this._handler=e}registerDisplayHandler(e,t){this.table.rowManager.registerDisplayPipelineHandler(e,t),this._handler=e}displayRows(e){var t=this.table.rowManager.displayRows.length-1,i;if(this._handler&&(i=this.table.rowManager.displayPipeline.findIndex(s=>s.handler===this._handler),i>-1&&(t=i)),e&&(t=t+e),this._handler)return t>-1?this.table.rowManager.getDisplayRows(t):this.activeRows()}activeRows(){return this.table.rowManager.activeRows}refreshData(e,t){t||(t=this._handler),t&&this.table.rowManager.refreshActiveData(t,!1,e)}footerAppend(e){return this.table.footerManager.append(e)}footerPrepend(e){return this.table.footerManager.prepend(e)}footerRemove(e){return this.table.footerManager.remove(e)}popup(e,t){return new Mt(this.table,e,t)}alert(e,t){return this.table.alertManager.alert(e,t)}clearAlert(){return this.table.alertManager.clear()}}var Lt={rownum:function(l,e,t,i,s,n){return n.getPosition()}};const K=class K extends w{constructor(e){super(e),this.allowedTypes=["","data","download","clipboard","print","htmlOutput"],this.registerColumnOption("accessor"),this.registerColumnOption("accessorParams"),this.registerColumnOption("accessorData"),this.registerColumnOption("accessorDataParams"),this.registerColumnOption("accessorDownload"),this.registerColumnOption("accessorDownloadParams"),this.registerColumnOption("accessorClipboard"),this.registerColumnOption("accessorClipboardParams"),this.registerColumnOption("accessorPrint"),this.registerColumnOption("accessorPrintParams"),this.registerColumnOption("accessorHtmlOutput"),this.registerColumnOption("accessorHtmlOutputParams")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-retrieve",this.transformRow.bind(this))}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(s=>{var n="accessor"+(s.charAt(0).toUpperCase()+s.slice(1)),r;e.definition[n]&&(r=this.lookupAccessor(e.definition[n]),r&&(t=!0,i[n]={accessor:r,params:e.definition[n+"Params"]||{}}))}),t&&(e.modules.accessor=i)}lookupAccessor(e){var t=!1;switch(typeof e){case"string":K.accessors[e]?t=K.accessors[e]:console.warn("Accessor Error - No such accessor found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t){var i="accessor"+(t.charAt(0).toUpperCase()+t.slice(1)),s=e.getComponent(),n=x.deepClone(e.data||{});return this.table.columnManager.traverse(function(r){var o,a,h,d;r.modules.accessor&&(a=r.modules.accessor[i]||r.modules.accessor.accessor||!1,a&&(o=r.getFieldValue(n),o!="undefined"&&(d=r.getComponent(),h=typeof a.params=="function"?a.params(o,n,t,d,s):a.params,r.setFieldValue(n,a.accessor(o,n,t,h,d,s)))))}),n}};b(K,"moduleName","accessor"),b(K,"accessors",Lt);let ce=K;var St={method:"GET"};function fe(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((s,n)=>{t=t.concat(fe(s,e?e+"["+n+"]":n))});else if(typeof l=="object")for(var i in l)t=t.concat(fe(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}function Dt(l){var e=fe(l),t=[];return e.forEach(function(i){t.push(encodeURIComponent(i.key)+"="+encodeURIComponent(i.value))}),t.join("&")}function Ye(l,e,t){return l&&t&&Object.keys(t).length&&(!e.method||e.method.toLowerCase()=="get")&&(e.method="get",l+=(l.includes("?")?"&":"?")+Dt(t)),l}function zt(l,e,t){var i;return new Promise((s,n)=>{if(l=this.urlGenerator.call(this.table,l,e,t),e.method.toUpperCase()!="GET")if(i=typeof this.table.options.ajaxContentType=="object"?this.table.options.ajaxContentType:this.contentTypeFormatters[this.table.options.ajaxContentType],i){for(var r in i.headers)e.headers||(e.headers={}),typeof e.headers[r]>"u"&&(e.headers[r]=i.headers[r]);e.body=i.body.call(this,l,e,t)}else console.warn("Ajax Error - Invalid ajaxContentType value:",this.table.options.ajaxContentType);l?(typeof e.headers>"u"&&(e.headers={}),typeof e.headers.Accept>"u"&&(e.headers.Accept="application/json"),typeof e.headers["X-Requested-With"]>"u"&&(e.headers["X-Requested-With"]="XMLHttpRequest"),typeof e.mode>"u"&&(e.mode="cors"),e.mode=="cors"?(typeof e.headers.Origin>"u"&&(e.headers.Origin=window.location.origin),typeof e.credentials>"u"&&(e.credentials="same-origin")):typeof e.credentials>"u"&&(e.credentials="include"),fetch(l,e).then(o=>{o.ok?o.json().then(a=>{s(a)}).catch(a=>{n(a),console.warn("Ajax Load Error - Invalid JSON returned",a)}):(console.error("Ajax Load Error - Connection Error: "+o.status,o.statusText),n(o))}).catch(o=>{console.error("Ajax Load Error - Connection Error: ",o),n(o)})):(console.warn("Ajax Load Error - No URL Set"),s([]))})}function pe(l,e){var t=[];if(e=e||"",Array.isArray(l))l.forEach((s,n)=>{t=t.concat(pe(s,e?e+"["+n+"]":n))});else if(typeof l=="object")for(var i in l)t=t.concat(pe(l[i],e?e+"["+i+"]":i));else t.push({key:e,value:l});return t}var Ht={json:{headers:{"Content-Type":"application/json"},body:function(l,e,t){return JSON.stringify(t)}},form:{headers:{},body:function(l,e,t){var i=pe(t),s=new FormData;return i.forEach(function(n){s.append(n.key,n.value)}),s}}};const F=class F extends w{constructor(e){super(e),this.config={},this.url="",this.urlGenerator=!1,this.params=!1,this.loaderPromise=!1,this.registerTableOption("ajaxURL",!1),this.registerTableOption("ajaxURLGenerator",!1),this.registerTableOption("ajaxParams",{}),this.registerTableOption("ajaxConfig","get"),this.registerTableOption("ajaxContentType","form"),this.registerTableOption("ajaxRequestFunc",!1),this.registerTableOption("ajaxRequesting",function(){}),this.registerTableOption("ajaxResponse",!1),this.contentTypeFormatters=F.contentTypeFormatters}initialize(){this.loaderPromise=this.table.options.ajaxRequestFunc||F.defaultLoaderPromise,this.urlGenerator=this.table.options.ajaxURLGenerator||F.defaultURLGenerator,this.table.options.ajaxURL&&this.setUrl(this.table.options.ajaxURL),this.setDefaultConfig(this.table.options.ajaxConfig),this.registerTableFunction("getAjaxUrl",this.getUrl.bind(this)),this.subscribe("data-loading",this.requestDataCheck.bind(this)),this.subscribe("data-params",this.requestParams.bind(this)),this.subscribe("data-load",this.requestData.bind(this))}requestParams(e,t,i,s){var n=this.table.options.ajaxParams;return n&&(typeof n=="function"&&(n=n.call(this.table)),s=Object.assign(Object.assign({},n),s)),s}requestDataCheck(e,t,i,s){return!!(!e&&this.url||typeof e=="string")}requestData(e,t,i,s,n){var r;return!n&&this.requestDataCheck(e)?(e&&this.setUrl(e),r=this.generateConfig(i),this.sendRequest(this.url,t,r)):n}setDefaultConfig(e={}){this.config=Object.assign({},F.defaultConfig),typeof e=="string"?this.config.method=e:Object.assign(this.config,e)}generateConfig(e={}){var t=Object.assign({},this.config);return typeof e=="string"?t.method=e:Object.assign(t,e),t}setUrl(e){this.url=e}getUrl(){return this.url}sendRequest(e,t,i){return this.table.options.ajaxRequesting.call(this.table,e,t)!==!1?this.loaderPromise(e,i,t).then(s=>(this.table.options.ajaxResponse&&(s=this.table.options.ajaxResponse.call(this.table,e,t,s)),s)):Promise.reject()}};b(F,"moduleName","ajax"),b(F,"defaultConfig",St),b(F,"defaultURLGenerator",Ye),b(F,"defaultLoaderPromise",zt),b(F,"contentTypeFormatters",Ht);let me=F;var Ft={replace:function(l){return this.table.setData(l)},update:function(l){return this.table.updateOrAddData(l)},insert:function(l){return this.table.addData(l)}},Pt={table:function(l){var e=[],t=!0,i=this.table.columnManager.columns,s=[],n=[];return l=l.split(` +`),l.forEach(function(r){e.push(r.split(" "))}),e.length&&!(e.length===1&&e[0].length<2)?(e[0].forEach(function(r){var o=i.find(function(a){return r&&a.definition.title&&r.trim()&&a.definition.title.trim()===r.trim()});o?s.push(o):t=!1}),t||(t=!0,s=[],e[0].forEach(function(r){var o=i.find(function(a){return r&&a.field&&r.trim()&&a.field.trim()===r.trim()});o?s.push(o):t=!1}),t||(s=this.table.columnManager.columnsByIndex)),t&&e.shift(),e.forEach(function(r){var o={};r.forEach(function(a,h){s[h]&&(o[s[h].field]=a)}),n.push(o)}),n):!1}},Ot={copyToClipboard:["ctrl + 67","meta + 67"]},At={copyToClipboard:function(l){this.table.modules.edit.currentCell||this.table.modExists("clipboard",!0)&&this.table.modules.clipboard.copy(!1,!0)}},_t={keybindings:{bindings:Ot,actions:At}};const _=class _ extends w{constructor(e){super(e),this.mode=!0,this.pasteParser=function(){},this.pasteAction=function(){},this.customSelection=!1,this.rowRange=!1,this.blocked=!0,this.registerTableOption("clipboard",!1),this.registerTableOption("clipboardCopyStyled",!0),this.registerTableOption("clipboardCopyConfig",!1),this.registerTableOption("clipboardCopyFormatter",!1),this.registerTableOption("clipboardCopyRowRange","active"),this.registerTableOption("clipboardPasteParser","table"),this.registerTableOption("clipboardPasteAction","insert"),this.registerColumnOption("clipboard"),this.registerColumnOption("titleClipboard")}initialize(){this.mode=this.table.options.clipboard,this.rowRange=this.table.options.clipboardCopyRowRange,(this.mode===!0||this.mode==="copy")&&this.table.element.addEventListener("copy",e=>{var t,i,s;this.blocked||(e.preventDefault(),this.customSelection?(t=this.customSelection,this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t))):(s=this.table.modules.export.generateExportList(this.table.options.clipboardCopyConfig,this.table.options.clipboardCopyStyled,this.rowRange,"clipboard"),i=this.table.modules.export.generateHTMLTable(s),t=i?this.generatePlainContent(s):"",this.table.options.clipboardCopyFormatter&&(t=this.table.options.clipboardCopyFormatter("plain",t),i=this.table.options.clipboardCopyFormatter("html",i))),window.clipboardData&&window.clipboardData.setData?window.clipboardData.setData("Text",t):e.clipboardData&&e.clipboardData.setData?(e.clipboardData.setData("text/plain",t),i&&e.clipboardData.setData("text/html",i)):e.originalEvent&&e.originalEvent.clipboardData.setData&&(e.originalEvent.clipboardData.setData("text/plain",t),i&&e.originalEvent.clipboardData.setData("text/html",i)),this.dispatchExternal("clipboardCopied",t,i),this.reset())}),(this.mode===!0||this.mode==="paste")&&this.table.element.addEventListener("paste",e=>{this.paste(e)}),this.setPasteParser(this.table.options.clipboardPasteParser),this.setPasteAction(this.table.options.clipboardPasteAction),this.registerTableFunction("copyToClipboard",this.copy.bind(this))}reset(){this.blocked=!0,this.customSelection=!1}generatePlainContent(e){var t=[];return e.forEach(i=>{var s=[];i.columns.forEach(n=>{var r="";if(n)if(i.type==="group"&&(n.value=n.component.getKey()),n.value===null)r="";else switch(typeof n.value){case"object":r=JSON.stringify(n.value);break;case"undefined":r="";break;default:r=n.value}s.push(r)}),t.push(s.join(" "))}),t.join(` +`)}copy(e,t){var i,s;this.blocked=!1,this.customSelection=!1,(this.mode===!0||this.mode==="copy")&&(this.rowRange=e||this.table.options.clipboardCopyRowRange,typeof window.getSelection<"u"&&typeof document.createRange<"u"?(e=document.createRange(),e.selectNodeContents(this.table.element),i=window.getSelection(),i.toString()&&t&&(this.customSelection=i.toString()),i.removeAllRanges(),i.addRange(e)):typeof document.selection<"u"&&typeof document.body.createTextRange<"u"&&(s=document.body.createTextRange(),s.moveToElementText(this.table.element),s.select()),document.execCommand("copy"),i&&i.removeAllRanges())}setPasteAction(e){switch(typeof e){case"string":this.pasteAction=_.pasteActions[e],this.pasteAction||console.warn("Clipboard Error - No such paste action found:",e);break;case"function":this.pasteAction=e;break}}setPasteParser(e){switch(typeof e){case"string":this.pasteParser=_.pasteParsers[e],this.pasteParser||console.warn("Clipboard Error - No such paste parser found:",e);break;case"function":this.pasteParser=e;break}}paste(e){var t,i,s;this.checkPasteOrigin(e)&&(t=this.getPasteData(e),i=this.pasteParser.call(this,t),i?(e.preventDefault(),this.table.modExists("mutator")&&(i=this.mutateData(i)),s=this.pasteAction.call(this,i),this.dispatchExternal("clipboardPasted",t,i,s)):this.dispatchExternal("clipboardPasteError",t))}mutateData(e){var t=[];return Array.isArray(e)?e.forEach(i=>{t.push(this.table.modules.mutator.transformRow(i,"clipboard"))}):t=e,t}checkPasteOrigin(e){var t=!0,i=this.confirm("clipboard-paste",[e]);return(i||!["DIV","SPAN"].includes(e.target.tagName))&&(t=!1),t}getPasteData(e){var t;return window.clipboardData&&window.clipboardData.getData?t=window.clipboardData.getData("Text"):e.clipboardData&&e.clipboardData.getData?t=e.clipboardData.getData("text/plain"):e.originalEvent&&e.originalEvent.clipboardData.getData&&(t=e.originalEvent.clipboardData.getData("text/plain")),t}};b(_,"moduleName","clipboard"),b(_,"moduleExtensions",_t),b(_,"pasteActions",Ft),b(_,"pasteParsers",Pt);let ge=_;class Bt{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getTable(){return this._row.table}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}_getSelf(){return this._row}}class $e{constructor(e){return this._cell=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._cell.table.componentFunctionBinder.handle("cell",t._cell,i)}})}getValue(){return this._cell.getValue()}getOldValue(){return this._cell.getOldValue()}getInitialValue(){return this._cell.initialValue}getElement(){return this._cell.getElement()}getRow(){return this._cell.row.getComponent()}getData(e){return this._cell.row.getData(e)}getType(){return"cell"}getField(){return this._cell.column.getField()}getColumn(){return this._cell.column.getComponent()}setValue(e,t){typeof t>"u"&&(t=!0),this._cell.setValue(e,t)}restoreOldValue(){this._cell.setValueActual(this._cell.getOldValue())}restoreInitialValue(){this._cell.setValueActual(this._cell.initialValue)}checkHeight(){this._cell.checkHeight()}getTable(){return this._cell.table}_getSelf(){return this._cell}}class ne extends M{constructor(e,t){super(e.table),this.table=e.table,this.column=e,this.row=t,this.element=null,this.value=null,this.initialValue,this.oldValue=null,this.modules={},this.height=null,this.width=null,this.minWidth=null,this.component=null,this.loaded=!1,this.build()}build(){this.generateElement(),this.setWidth(),this._configureCell(),this.setValueActual(this.column.getFieldValue(this.row.data)),this.initialValue=this.value}generateElement(){this.element=document.createElement("div"),this.element.className="tabulator-cell",this.element.setAttribute("role","gridcell"),this.column.isRowHeader&&this.element.classList.add("tabulator-row-header")}_configureCell(){var e=this.element,t=this.column.getField(),i={top:"flex-start",bottom:"flex-end",middle:"center"},s={left:"flex-start",right:"flex-end",center:"center"};if(e.style.textAlign=this.column.hozAlign,this.column.vertAlign&&(e.style.display="inline-flex",e.style.alignItems=i[this.column.vertAlign]||"",this.column.hozAlign&&(e.style.justifyContent=s[this.column.hozAlign]||"")),t&&e.setAttribute("tabulator-field",t),this.column.definition.cssClass){var n=this.column.definition.cssClass.split(" ");n.forEach(r=>{e.classList.add(r)})}this.dispatch("cell-init",this),this.column.visible||this.hide()}_generateContents(){var e;switch(e=this.chain("cell-format",this,null,()=>this.element.innerHTML=this.value),typeof e){case"object":if(e instanceof Node){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.element.appendChild(e)}else this.element.innerHTML="",e!=null&&console.warn("Format Error - Formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",e);break;case"undefined":this.element.innerHTML="";break;default:this.element.innerHTML=e}}cellRendered(){this.dispatch("cell-rendered",this)}getElement(e){return this.loaded||(this.loaded=!0,e||this.layoutElement()),this.element}getValue(){return this.value}getOldValue(){return this.oldValue}setValue(e,t,i){var s=this.setValueProcessData(e,t,i);s&&(this.dispatch("cell-value-updated",this),this.cellRendered(),this.column.definition.cellEdited&&this.column.definition.cellEdited.call(this.table,this.getComponent()),this.dispatchExternal("cellEdited",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()))}setValueProcessData(e,t,i){var s=!1;return(this.value!==e||i)&&(s=!0,t&&(e=this.chain("cell-value-changing",[this,e],null,e))),this.setValueActual(e),s&&this.dispatch("cell-value-changed",this),s}setValueActual(e){this.oldValue=this.value,this.value=e,this.dispatch("cell-value-save-before",this),this.column.setFieldValue(this.row.data,e),this.dispatch("cell-value-save-after",this),this.loaded&&this.layoutElement()}layoutElement(){this._generateContents(),this.dispatch("cell-layout",this)}setWidth(){this.width=this.column.width,this.element.style.width=this.column.widthStyled}clearWidth(){this.width="",this.element.style.width=""}getWidth(){return this.width||this.element.offsetWidth}setMinWidth(){this.minWidth=this.column.minWidth,this.element.style.minWidth=this.column.minWidthStyled}setMaxWidth(){this.maxWidth=this.column.maxWidth,this.element.style.maxWidth=this.column.maxWidthStyled}checkHeight(){this.row.reinitializeHeight()}clearHeight(){this.element.style.height="",this.height=null,this.dispatch("cell-height",this,"")}setHeight(){this.height=this.row.height,this.element.style.height=this.row.heightStyled,this.dispatch("cell-height",this,this.row.heightStyled)}getHeight(){return this.height||this.element.offsetHeight}show(){this.element.style.display=this.column.vertAlign?"inline-flex":""}hide(){this.element.style.display="none"}delete(){this.dispatch("cell-delete",this),!this.table.rowManager.redrawBlock&&this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.element=!1,this.column.deleteCell(this),this.row.deleteCell(this),this.calcs={}}getIndex(){return this.row.getCellIndex(this)}getComponent(){return this.component||(this.component=new $e(this)),this.component}}class Qe{constructor(e){return this._column=e,this.type="ColumnComponent",new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._column.table.componentFunctionBinder.handle("column",t._column,i)}})}getElement(){return this._column.getElement()}getDefinition(){return this._column.getDefinition()}getField(){return this._column.getField()}getTitleDownload(){return this._column.getTitleDownload()}getCells(){var e=[];return this._column.cells.forEach(function(t){e.push(t.getComponent())}),e}isVisible(){return this._column.visible}show(){this._column.isGroup?this._column.columns.forEach(function(e){e.show()}):this._column.show()}hide(){this._column.isGroup?this._column.columns.forEach(function(e){e.hide()}):this._column.hide()}toggle(){this._column.visible?this.hide():this.show()}delete(){return this._column.delete()}getSubColumns(){var e=[];return this._column.columns.length&&this._column.columns.forEach(function(t){e.push(t.getComponent())}),e}getParentColumn(){return this._column.getParentComponent()}_getSelf(){return this._column}scrollTo(e,t){return this._column.table.columnManager.scrollToColumn(this._column,e,t)}getTable(){return this._column.table}move(e,t){var i=this._column.table.columnManager.findColumn(e);i?this._column.table.columnManager.moveColumn(this._column,i,t):console.warn("Move Error - No matching column found:",i)}getNextColumn(){var e=this._column.nextColumn();return e?e.getComponent():!1}getPrevColumn(){var e=this._column.prevColumn();return e?e.getComponent():!1}updateDefinition(e){return this._column.updateDefinition(e)}getWidth(){return this._column.getWidth()}setWidth(e){var t;return e===!0?t=this._column.reinitializeWidth(!0):t=this._column.setWidth(e),this._column.table.columnManager.rerenderColumns(!0),t}}var Ze={title:void 0,field:void 0,columns:void 0,visible:void 0,hozAlign:void 0,vertAlign:void 0,width:void 0,minWidth:40,maxWidth:void 0,maxInitialWidth:void 0,cssClass:void 0,variableHeight:void 0,headerVertical:void 0,headerHozAlign:void 0,headerWordWrap:!1,editableTitle:void 0};const W=class W extends M{constructor(e,t,i){super(t.table),this.definition=e,this.parent=t,this.type="column",this.columns=[],this.cells=[],this.isGroup=!1,this.isRowHeader=i,this.element=this.createElement(),this.contentElement=!1,this.titleHolderElement=!1,this.titleElement=!1,this.groupElement=this.createGroupElement(),this.hozAlign="",this.vertAlign="",this.field="",this.fieldStructure="",this.getFieldValue="",this.setFieldValue="",this.titleDownload=null,this.titleFormatterRendered=!1,this.mapDefinitions(),this.setField(this.definition.field),this.modules={},this.width=null,this.widthStyled="",this.maxWidth=null,this.maxWidthStyled="",this.maxInitialWidth=null,this.minWidth=null,this.minWidthStyled="",this.widthFixed=!1,this.visible=!0,this.component=null,this.definition.columns?(this.isGroup=!0,this.definition.columns.forEach((s,n)=>{var r=new W(s,this);this.attachColumn(r)}),this.checkColumnVisibility()):t.registerColumnField(this),this._initialize()}createElement(){var e=document.createElement("div");switch(e.classList.add("tabulator-col"),e.setAttribute("role","columnheader"),e.setAttribute("aria-sort","none"),this.isRowHeader&&e.classList.add("tabulator-row-header"),this.table.options.columnHeaderVertAlign){case"middle":e.style.justifyContent="center";break;case"bottom":e.style.justifyContent="flex-end";break}return e}createGroupElement(){var e=document.createElement("div");return e.classList.add("tabulator-col-group-cols"),e}mapDefinitions(){var e=this.table.options.columnDefaults;if(e)for(let t in e)typeof this.definition[t]>"u"&&(this.definition[t]=e[t]);this.definition=this.table.columnManager.optionsList.generate(W.defaultOptionList,this.definition)}checkDefinition(){Object.keys(this.definition).forEach(e=>{W.defaultOptionList.indexOf(e)===-1&&console.warn("Invalid column definition option in '"+(this.field||this.definition.title)+"' column:",e)})}setField(e){this.field=e,this.fieldStructure=e?this.table.options.nestedFieldSeparator?e.split(this.table.options.nestedFieldSeparator):[e]:[],this.getFieldValue=this.fieldStructure.length>1?this._getNestedData:this._getFlatData,this.setFieldValue=this.fieldStructure.length>1?this._setNestedData:this._setFlatData}registerColumnPosition(e){this.parent.registerColumnPosition(e)}registerColumnField(e){this.parent.registerColumnField(e)}reRegisterPosition(){this.isGroup?this.columns.forEach(function(e){e.reRegisterPosition()}):this.registerColumnPosition(this)}_initialize(){for(var e=this.definition;this.element.firstChild;)this.element.removeChild(this.element.firstChild);e.headerVertical&&(this.element.classList.add("tabulator-col-vertical"),e.headerVertical==="flip"&&this.element.classList.add("tabulator-col-vertical-flip")),this.contentElement=this._buildColumnHeaderContent(),this.element.appendChild(this.contentElement),this.isGroup?this._buildGroupHeader():this._buildColumnHeader(),this.dispatch("column-init",this)}_buildColumnHeader(){var e=this.definition;if(this.dispatch("column-layout",this),typeof e.visible<"u"&&(e.visible?this.show(!0):this.hide(!0)),e.cssClass){var t=e.cssClass.split(" ");t.forEach(i=>{this.element.classList.add(i)})}e.field&&this.element.setAttribute("tabulator-field",e.field),this.setMinWidth(parseInt(e.minWidth)),e.maxInitialWidth&&(this.maxInitialWidth=parseInt(e.maxInitialWidth)),e.maxWidth&&this.setMaxWidth(parseInt(e.maxWidth)),this.reinitializeWidth(),this.hozAlign=this.definition.hozAlign,this.vertAlign=this.definition.vertAlign,this.titleElement.style.textAlign=this.definition.headerHozAlign}_buildColumnHeaderContent(){var e=document.createElement("div");return e.classList.add("tabulator-col-content"),this.titleHolderElement=document.createElement("div"),this.titleHolderElement.classList.add("tabulator-col-title-holder"),e.appendChild(this.titleHolderElement),this.titleElement=this._buildColumnHeaderTitle(),this.titleHolderElement.appendChild(this.titleElement),e}_buildColumnHeaderTitle(){var e=this.definition,t=document.createElement("div");if(t.classList.add("tabulator-col-title"),e.headerWordWrap&&t.classList.add("tabulator-col-title-wrap"),e.editableTitle){var i=document.createElement("input");i.classList.add("tabulator-title-editor"),i.addEventListener("click",s=>{s.stopPropagation(),i.focus()}),i.addEventListener("mousedown",s=>{s.stopPropagation()}),i.addEventListener("change",()=>{e.title=i.value,this.dispatchExternal("columnTitleChanged",this.getComponent())}),t.appendChild(i),e.field?this.langBind("columns|"+e.field,s=>{i.value=s||e.title||" "}):i.value=e.title||" "}else e.field?this.langBind("columns|"+e.field,s=>{this._formatColumnHeaderTitle(t,s||e.title||" ")}):this._formatColumnHeaderTitle(t,e.title||" ");return t}_formatColumnHeaderTitle(e,t){var i=this.chain("column-format",[this,t,e],null,()=>t);switch(typeof i){case"object":i instanceof Node?e.appendChild(i):(e.innerHTML="",console.warn("Format Error - Title formatter has returned a type of object, the only valid formatter object return is an instance of Node, the formatter returned:",i));break;case"undefined":e.innerHTML="";break;default:e.innerHTML=i}}_buildGroupHeader(){if(this.element.classList.add("tabulator-col-group"),this.element.setAttribute("role","columngroup"),this.element.setAttribute("aria-title",this.definition.title),this.definition.cssClass){var e=this.definition.cssClass.split(" ");e.forEach(t=>{this.element.classList.add(t)})}this.titleElement.style.textAlign=this.definition.headerHozAlign,this.element.appendChild(this.groupElement)}_getFlatData(e){return e[this.field]}_getNestedData(e){var t=e,i=this.fieldStructure,s=i.length,n;for(let r=0;r{t.push(i),t=t.concat(i.getColumns(!0))}):t=this.columns,t}getCells(){return this.cells}getTopColumn(){return this.parent.isGroup?this.parent.getTopColumn():this}getDefinition(e){var t=[];return this.isGroup&&e&&(this.columns.forEach(function(i){t.push(i.getDefinition(!0))}),this.definition.columns=t),this.definition}checkColumnVisibility(){var e=!1;this.columns.forEach(function(t){t.visible&&(e=!0)}),e?(this.show(),this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1)):this.hide()}show(e,t){this.visible||(this.visible=!0,this.element.style.display="",this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.show()}),!this.isGroup&&this.width===null&&this.reinitializeWidth(),this.table.columnManager.verticalAlignHeaders(),this.dispatch("column-show",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!0),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}hide(e,t){this.visible&&(this.visible=!1,this.element.style.display="none",this.table.columnManager.verticalAlignHeaders(),this.parent.isGroup&&this.parent.checkColumnVisibility(),this.cells.forEach(function(i){i.hide()}),this.dispatch("column-hide",this,t),e||this.dispatchExternal("columnVisibilityChanged",this.getComponent(),!1),this.parent.isGroup&&this.parent.matchChildWidths(),this.silent||this.table.columnManager.rerenderColumns())}matchChildWidths(){var e=0;this.contentElement&&this.columns.length&&(this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}),this.contentElement.style.maxWidth=e-1+"px",this.parent.isGroup&&this.parent.matchChildWidths())}removeChild(e){var t=this.columns.indexOf(e);t>-1&&this.columns.splice(t,1),this.columns.length||this.delete()}setWidth(e){this.widthFixed=!0,this.setWidthActual(e)}setWidthActual(e){isNaN(e)&&(e=Math.floor(this.table.element.clientWidth/100*parseInt(e))),e=Math.max(this.minWidth,e),this.maxWidth&&(e=Math.min(this.maxWidth,e)),this.width=e,this.widthStyled=e?e+"px":"",this.element.style.width=this.widthStyled,this.isGroup||this.cells.forEach(function(t){t.setWidth()}),this.parent.isGroup&&this.parent.matchChildWidths(),this.dispatch("column-width",this),this.subscribedExternal("columnWidth")&&this.dispatchExternal("columnWidth",this.getComponent())}checkCellHeights(){var e=[];this.cells.forEach(function(t){t.row.heightInitialized&&(t.row.getElement().offsetParent!==null?(e.push(t.row),t.row.clearCellHeight()):t.row.heightInitialized=!1)}),e.forEach(function(t){t.calcHeight()}),e.forEach(function(t){t.setCellHeight()})}getWidth(){var e=0;return this.isGroup?this.columns.forEach(function(t){t.visible&&(e+=t.getWidth())}):e=this.width,e}getLeftOffset(){var e=this.element.offsetLeft;return this.parent.isGroup&&(e+=this.parent.getLeftOffset()),e}getHeight(){return Math.ceil(this.element.getBoundingClientRect().height)}setMinWidth(e){this.maxWidth&&e>this.maxWidth&&(e=this.maxWidth,console.warn("the minWidth ("+e+"px) for column '"+this.field+"' cannot be bigger that its maxWidth ("+this.maxWidthStyled+")")),this.minWidth=e,this.minWidthStyled=e?e+"px":"",this.element.style.minWidth=this.minWidthStyled,this.cells.forEach(function(t){t.setMinWidth()})}setMaxWidth(e){this.minWidth&&e{this.isGroup&&this.columns.forEach(function(s){s.delete()}),this.dispatch("column-delete",this);var i=this.cells.length;for(let s=0;s-1?this._nextVisibleColumn(e+1):!1}_nextVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._nextVisibleColumn(e+1)}prevColumn(){var e=this.table.columnManager.findColumnIndex(this);return e>-1?this._prevVisibleColumn(e-1):!1}_prevVisibleColumn(e){var t=this.table.columnManager.getColumnByIndex(e);return!t||t.visible?t:this._prevVisibleColumn(e-1)}reinitializeWidth(e){this.widthFixed=!1,typeof this.definition.width<"u"&&!e&&this.setWidth(this.definition.width),this.dispatch("column-width-fit-before",this),this.fitToData(e),this.dispatch("column-width-fit-after",this)}fitToData(e){if(!this.isGroup){this.widthFixed||(this.element.style.width="",this.cells.forEach(s=>{s.clearWidth()}));var t=this.element.offsetWidth;if((!this.width||!this.widthFixed)&&(this.cells.forEach(s=>{var n=s.getWidth();n>t&&(t=n)}),t)){var i=t+1;this.maxInitialWidth&&!e&&(i=Math.min(i,this.maxInitialWidth)),this.setWidthActual(i)}}}updateDefinition(e){var t;return this.isGroup||this.parent.isGroup?(console.error("Column Update Error - The updateDefinition function is only available on ungrouped columns"),Promise.reject("Column Update Error - The updateDefinition function is only available on columns, not column groups")):(t=Object.assign({},this.getDefinition()),t=Object.assign(t,e),this.table.columnManager.addColumn(t,!1,this).then(i=>(t.field==this.field&&(this.field=!1),this.delete().then(()=>i.getComponent()))))}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}getComponent(){return this.component||(this.component=new Qe(this)),this.component}getPosition(){return this.table.columnManager.getVisibleColumnsByIndex().indexOf(this)+1}getParentComponent(){return this.parent instanceof W?this.parent.getComponent():!1}};b(W,"defaultOptionList",Ze);let U=W;class oe{constructor(e){return this._row=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._row.table.componentFunctionBinder.handle("row",t._row,i)}})}getData(e){return this._row.getData(e)}getElement(){return this._row.getElement()}getCells(){var e=[];return this._row.getCells().forEach(function(t){e.push(t.getComponent())}),e}getCell(e){var t=this._row.getCell(e);return t?t.getComponent():!1}getIndex(){return this._row.getData("data")[this._row.table.options.index]}getPosition(){return this._row.getPosition()}watchPosition(e){return this._row.watchPosition(e)}delete(){return this._row.delete()}scrollTo(e,t){return this._row.table.rowManager.scrollToRow(this._row,e,t)}move(e,t){this._row.moveToRow(e,t)}update(e){return this._row.updateData(e)}normalizeHeight(){this._row.normalizeHeight(!0)}_getSelf(){return this._row}reformat(){return this._row.reinitialize()}getTable(){return this._row.table}getNextRow(){var e=this._row.nextRow();return e&&e.getComponent()}getPrevRow(){var e=this._row.prevRow();return e&&e.getComponent()}}class S extends M{constructor(e,t,i="row"){super(t.table),this.parent=t,this.data={},this.type=i,this.element=!1,this.modules={},this.cells=[],this.height=0,this.heightStyled="",this.manualHeight=!1,this.outerHeight=0,this.initialized=!1,this.heightInitialized=!1,this.position=0,this.positionWatchers=[],this.component=null,this.created=!1,this.setData(e)}create(){this.created||(this.created=!0,this.generateElement())}createElement(){var e=document.createElement("div");e.classList.add("tabulator-row"),e.setAttribute("role","row"),this.element=e}getElement(){return this.create(),this.element}detachElement(){this.element&&this.element.parentNode&&this.element.parentNode.removeChild(this.element)}generateElement(){this.createElement(),this.dispatch("row-init",this)}generateCells(){this.cells=this.table.columnManager.generateCells(this)}initialize(e,t){if(this.create(),!this.initialized||e){for(this.deleteCells();this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.dispatch("row-layout-before",this),this.generateCells(),this.initialized=!0,this.table.columnManager.renderer.renderRowCells(this,t),e&&this.normalizeHeight(),this.dispatch("row-layout",this),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent()),this.dispatch("row-layout-after",this)}else this.table.columnManager.renderer.rerenderRowCells(this,t)}rendered(){this.cells.forEach(e=>{e.cellRendered()})}reinitializeHeight(){this.heightInitialized=!1,this.element&&this.element.offsetParent!==null&&this.normalizeHeight(!0)}deinitialize(){this.initialized=!1}deinitializeHeight(){this.heightInitialized=!1}reinitialize(e){this.initialized=!1,this.heightInitialized=!1,this.manualHeight||(this.height=0,this.heightStyled=""),this.element&&this.element.offsetParent!==null&&this.initialize(!0),this.dispatch("row-relayout",this)}calcHeight(e){var t=0,i=0;this.table.options.rowHeight?this.height=this.table.options.rowHeight:(i=this.calcMinHeight(),t=this.calcMaxHeight(),e?this.height=Math.max(t,i):this.height=this.manualHeight?this.height:Math.max(t,i)),this.heightStyled=this.height?this.height+"px":"",this.outerHeight=this.element.offsetHeight}calcMinHeight(){return this.table.options.resizableRows?this.element.clientHeight:0}calcMaxHeight(){var e=0;return this.cells.forEach(function(t){var i=t.getHeight();i>e&&(e=i)}),e}setCellHeight(){this.cells.forEach(function(e){e.setHeight()}),this.heightInitialized=!0}clearCellHeight(){this.cells.forEach(function(e){e.clearHeight()})}normalizeHeight(e){e&&!this.table.options.rowHeight&&this.clearCellHeight(),this.calcHeight(e),this.setCellHeight()}setHeight(e,t){(this.height!=e||t)&&(this.manualHeight=!0,this.height=e,this.heightStyled=e?e+"px":"",this.setCellHeight(),this.outerHeight=this.element.offsetHeight,this.subscribedExternal("rowHeight")&&this.dispatchExternal("rowHeight",this.getComponent()))}getHeight(){return this.outerHeight}getWidth(){return this.element.offsetWidth}deleteCell(e){var t=this.cells.indexOf(e);t>-1&&this.cells.splice(t,1)}setData(e){this.data=this.chain("row-data-init-before",[this,e],void 0,e),this.dispatch("row-data-init-after",this)}updateData(e){var t=this.element&&x.elVisible(this.element),i={},s;return new Promise((n,r)=>{typeof e=="string"&&(e=JSON.parse(e)),this.dispatch("row-data-save-before",this),this.subscribed("row-data-changing")&&(i=Object.assign(i,this.data),i=Object.assign(i,e)),s=this.chain("row-data-changing",[this,i,e],null,e);for(let o in s)this.data[o]=s[o];this.dispatch("row-data-save-after",this);for(let o in e)this.table.columnManager.getColumnsByFieldRoot(o).forEach(h=>{let d=this.getCell(h.getField());if(d){let u=h.getFieldValue(s);d.getValue()!==u&&(d.setValueProcessData(u),t&&d.cellRendered())}});t?(this.normalizeHeight(!0),this.table.options.rowFormatter&&this.table.options.rowFormatter(this.getComponent())):(this.initialized=!1,this.height=0,this.heightStyled=""),this.dispatch("row-data-changed",this,t,e),this.dispatchExternal("rowUpdated",this.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),n()})}getData(e){return e?this.chain("row-data-retrieve",[this,e],null,this.data):this.data}getCell(e){var t=!1;return e=this.table.columnManager.findColumn(e),!this.initialized&&this.cells.length===0&&this.generateCells(),t=this.cells.find(function(i){return i.column===e}),t}getCellIndex(e){return this.cells.findIndex(function(t){return t===e})}findCell(e){return this.cells.find(t=>t.element===e)}getCells(){return!this.initialized&&this.cells.length===0&&this.generateCells(),this.cells}nextRow(){var e=this.table.rowManager.nextDisplayRow(this,!0);return e||!1}prevRow(){var e=this.table.rowManager.prevDisplayRow(this,!0);return e||!1}moveToRow(e,t){var i=this.table.rowManager.findRow(e);i?(this.table.rowManager.moveRowActual(this,i,!t),this.table.rowManager.refreshActiveData("display",!1,!0)):console.warn("Move Error - No matching row found:",e)}delete(){return this.dispatch("row-delete",this),this.deleteActual(),Promise.resolve()}deleteActual(e){this.detachModules(),this.table.rowManager.deleteRow(this,e),this.deleteCells(),this.initialized=!1,this.heightInitialized=!1,this.element=!1,this.dispatch("row-deleted",this)}detachModules(){this.dispatch("row-deleting",this)}deleteCells(){var e=this.cells.length;for(let t=0;t{t(this.position)}))}watchPosition(e){this.positionWatchers.push(e),e(this.position)}getGroup(){return this.modules.group||!1}getComponent(){return this.component||(this.component=new oe(this)),this.component}}var Vt={avg:function(l,e,t){var i=0,s=typeof t.precision<"u"?t.precision:2;return l.length&&(i=l.reduce(function(n,r){return Number(n)+Number(r)}),i=i/l.length,i=s!==!1?i.toFixed(s):i),parseFloat(i).toString()},max:function(l,e,t){var i=null,s=typeof t.precision<"u"?t.precision:!1;return l.forEach(function(n){n=Number(n),(n>i||i===null)&&(i=n)}),i!==null?s!==!1?i.toFixed(s):i:""},min:function(l,e,t){var i=null,s=typeof t.precision<"u"?t.precision:!1;return l.forEach(function(n){n=Number(n),(n(l||s===0)&&l.indexOf(s)===n);return i.length}};const B=class B extends w{constructor(e){super(e),this.topCalcs=[],this.botCalcs=[],this.genColumn=!1,this.topElement=this.createElement(),this.botElement=this.createElement(),this.topRow=!1,this.botRow=!1,this.topInitialized=!1,this.botInitialized=!1,this.blocked=!1,this.recalcAfterBlock=!1,this.registerTableOption("columnCalcs",!0),this.registerColumnOption("topCalc"),this.registerColumnOption("topCalcParams"),this.registerColumnOption("topCalcFormatter"),this.registerColumnOption("topCalcFormatterParams"),this.registerColumnOption("bottomCalc"),this.registerColumnOption("bottomCalcParams"),this.registerColumnOption("bottomCalcFormatter"),this.registerColumnOption("bottomCalcFormatterParams")}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-calcs-holder"),e}initialize(){this.genColumn=new U({field:"value"},this),this.subscribe("cell-value-changed",this.cellValueChanged.bind(this)),this.subscribe("column-init",this.initializeColumnCheck.bind(this)),this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("column-moved",this.recalcActiveRows.bind(this)),this.subscribe("column-add",this.recalcActiveRows.bind(this)),this.subscribe("data-refreshed",this.recalcActiveRowsRefresh.bind(this)),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("rows-visible",this.visibleRows.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this)),this.subscribe("redraw-blocked",this.blockRedraw.bind(this)),this.subscribe("redraw-restored",this.restoreRedraw.bind(this)),this.subscribe("table-redrawing",this.resizeHolderWidth.bind(this)),this.subscribe("column-resized",this.resizeHolderWidth.bind(this)),this.subscribe("column-show",this.resizeHolderWidth.bind(this)),this.subscribe("column-hide",this.resizeHolderWidth.bind(this)),this.registerTableFunction("getCalcResults",this.getResults.bind(this)),this.registerTableFunction("recalc",this.userRecalc.bind(this)),this.resizeHolderWidth()}resizeHolderWidth(){this.topElement.style.minWidth=this.table.columnManager.headersElement.offsetWidth+"px"}tableRedraw(e){this.recalc(this.table.rowManager.activeRows),e&&this.redraw()}blockRedraw(){this.blocked=!0,this.recalcAfterBlock=!1}restoreRedraw(){this.blocked=!1,this.recalcAfterBlock&&(this.recalcAfterBlock=!1,this.recalcActiveRowsRefresh())}userRecalc(){this.recalc(this.table.rowManager.activeRows)}blockCheck(){return this.blocked&&(this.recalcAfterBlock=!0),this.blocked}visibleRows(e,t){return this.topRow&&t.unshift(this.topRow),this.botRow&&t.push(this.botRow),t}rowsUpdated(e){this.table.options.groupBy?this.recalcRowGroup(e):this.recalcActiveRows()}recalcActiveRowsRefresh(){this.table.options.groupBy&&this.table.options.dataTreeStartExpanded&&this.table.options.dataTree?this.recalcAll():this.recalcActiveRows()}recalcActiveRows(){this.recalc(this.table.rowManager.activeRows)}cellValueChanged(e){(e.column.definition.topCalc||e.column.definition.bottomCalc)&&(this.table.options.groupBy?((this.table.options.columnCalcs=="table"||this.table.options.columnCalcs=="both")&&this.recalcActiveRows(),this.table.options.columnCalcs!="table"&&this.recalcRowGroup(e.row)):this.recalcActiveRows())}initializeColumnCheck(e){(e.definition.topCalc||e.definition.bottomCalc)&&this.initializeColumn(e)}initializeColumn(e){var t=e.definition,i={topCalcParams:t.topCalcParams||{},botCalcParams:t.bottomCalcParams||{}};if(t.topCalc){switch(typeof t.topCalc){case"string":B.calculations[t.topCalc]?i.topCalc=B.calculations[t.topCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.topCalc);break;case"function":i.topCalc=t.topCalc;break}i.topCalc&&(e.modules.columnCalcs=i,this.topCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeTopRow())}if(t.bottomCalc){switch(typeof t.bottomCalc){case"string":B.calculations[t.bottomCalc]?i.botCalc=B.calculations[t.bottomCalc]:console.warn("Column Calc Error - No such calculation found, ignoring: ",t.bottomCalc);break;case"function":i.botCalc=t.bottomCalc;break}i.botCalc&&(e.modules.columnCalcs=i,this.botCalcs.push(e),this.table.options.columnCalcs!="group"&&this.initializeBottomRow())}}registerColumnField(){}removeCalcs(){var e=!1;this.topInitialized&&(this.topInitialized=!1,this.topElement.parentNode.removeChild(this.topElement),e=!0),this.botInitialized&&(this.botInitialized=!1,this.footerRemove(this.botElement),e=!0),e&&this.table.rowManager.adjustTableSize()}reinitializeCalcs(){this.topCalcs.length&&this.initializeTopRow(),this.botCalcs.length&&this.initializeBottomRow()}initializeTopRow(){var e=document.createDocumentFragment();this.topInitialized||(e.appendChild(document.createElement("br")),e.appendChild(this.topElement),this.table.columnManager.getContentsElement().insertBefore(e,this.table.columnManager.headersElement.nextSibling),this.topInitialized=!0)}initializeBottomRow(){this.botInitialized||(this.footerPrepend(this.botElement),this.botInitialized=!0)}scrollHorizontal(e){this.botInitialized&&this.botRow&&(this.botElement.scrollLeft=e)}recalc(e){var t,i;if(!this.blockCheck()&&(this.topInitialized||this.botInitialized)){if(t=this.rowsToData(e),this.topInitialized){for(this.topRow&&this.topRow.deleteCells(),i=this.generateRow("top",t),this.topRow=i;this.topElement.firstChild;)this.topElement.removeChild(this.topElement.firstChild);this.topElement.appendChild(i.getElement()),i.initialize(!0)}if(this.botInitialized){for(this.botRow&&this.botRow.deleteCells(),i=this.generateRow("bottom",t),this.botRow=i;this.botElement.firstChild;)this.botElement.removeChild(this.botElement.firstChild);this.botElement.appendChild(i.getElement()),i.initialize(!0)}this.table.rowManager.adjustTableSize(),this.table.modExists("frozenColumns")&&this.table.modules.frozenColumns.layout()}}recalcRowGroup(e){this.recalcGroup(this.table.modules.groupRows.getRowGroup(e))}recalcAll(){if((this.topCalcs.length||this.botCalcs.length)&&(this.table.options.columnCalcs!=="group"&&this.recalcActiveRows(),this.table.options.groupBy&&this.table.options.columnCalcs!=="table")){var e=this.table.modules.groupRows.getChildGroups();e.forEach(t=>{this.recalcGroup(t)})}}recalcGroup(e){var t,i;this.blockCheck()||e&&e.calcs&&(e.calcs.bottom&&(t=this.rowsToData(e.rows),i=this.generateRowData("bottom",t),e.calcs.bottom.updateData(i),e.calcs.bottom.reinitialize()),e.calcs.top&&(t=this.rowsToData(e.rows),i=this.generateRowData("top",t),e.calcs.top.updateData(i),e.calcs.top.reinitialize()))}generateTopRow(e){return this.generateRow("top",this.rowsToData(e))}generateBottomRow(e){return this.generateRow("bottom",this.rowsToData(e))}rowsToData(e){var t=[],i=this.table.options.dataTree&&this.table.options.dataTreeChildColumnCalcs,s=this.table.modules.dataTree;return e.forEach(n=>{var r;t.push(n.getData()),i&&((r=n.modules.dataTree)!=null&&r.open)&&this.rowsToData(s.getFilteredTreeChildren(n)).forEach(o=>{t.push(n)})}),t}generateRow(e,t){var i=this.generateRowData(e,t),s;return this.table.modExists("mutator")&&this.table.modules.mutator.disable(),s=new S(i,this,"calc"),this.table.modExists("mutator")&&this.table.modules.mutator.enable(),s.getElement().classList.add("tabulator-calcs","tabulator-calcs-"+e),s.component=!1,s.getComponent=()=>(s.component||(s.component=new Bt(s)),s.component),s.generateCells=()=>{var n=[];this.table.columnManager.columnsByIndex.forEach(r=>{this.genColumn.setField(r.getField()),this.genColumn.hozAlign=r.hozAlign,r.definition[e+"CalcFormatter"]&&this.table.modExists("format")?this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter(r.definition[e+"CalcFormatter"]),params:r.definition[e+"CalcFormatterParams"]||{}}:this.genColumn.modules.format={formatter:this.table.modules.format.getFormatter("plaintext"),params:{}},this.genColumn.definition.cssClass=r.definition.cssClass;var o=new ne(this.genColumn,s);o.getElement(),o.column=r,o.setWidth(),r.cells.push(o),n.push(o),r.visible||o.hide()}),s.cells=n},s}generateRowData(e,t){var i={},s=e=="top"?this.topCalcs:this.botCalcs,n=e=="top"?"topCalc":"botCalc",r,o;return s.forEach(function(a){var h=[];a.modules.columnCalcs&&a.modules.columnCalcs[n]&&(t.forEach(function(d){h.push(a.getFieldValue(d))}),o=n+"Params",r=typeof a.modules.columnCalcs[o]=="function"?a.modules.columnCalcs[o](h,t):a.modules.columnCalcs[o],a.setFieldValue(i,a.modules.columnCalcs[n](h,t,r)))}),i}hasTopCalcs(){return!!this.topCalcs.length}hasBottomCalcs(){return!!this.botCalcs.length}redraw(){this.topRow&&this.topRow.normalizeHeight(!0),this.botRow&&this.botRow.normalizeHeight(!0)}getResults(){var e={},t;return this.table.options.groupBy&&this.table.modExists("groupRows")?(t=this.table.modules.groupRows.getGroups(!0),t.forEach(i=>{e[i.getKey()]=this.getGroupResults(i)})):e={top:this.topRow?this.topRow.getData():{},bottom:this.botRow?this.botRow.getData():{}},e}getGroupResults(e){var t=e._getSelf(),i=e.getSubGroups(),s={},n={};return i.forEach(r=>{s[r.getKey()]=this.getGroupResults(r)}),n={top:t.calcs.top?t.calcs.top.getData():{},bottom:t.calcs.bottom?t.calcs.bottom.getData():{},groups:s},n}adjustForScrollbar(e){this.botRow&&(this.table.rtl?this.botElement.style.paddingLeft=e+"px":this.botElement.style.paddingRight=e+"px")}};b(B,"moduleName","columnCalcs"),b(B,"calculations",Vt);let be=B;class et extends w{constructor(e){super(e),this.indent=10,this.field="",this.collapseEl=null,this.expandEl=null,this.branchEl=null,this.elementField=!1,this.startOpen=function(){},this.registerTableOption("dataTree",!1),this.registerTableOption("dataTreeFilter",!0),this.registerTableOption("dataTreeSort",!0),this.registerTableOption("dataTreeElementColumn",!1),this.registerTableOption("dataTreeBranchElement",!0),this.registerTableOption("dataTreeChildIndent",9),this.registerTableOption("dataTreeChildField","_children"),this.registerTableOption("dataTreeCollapseElement",!1),this.registerTableOption("dataTreeExpandElement",!1),this.registerTableOption("dataTreeStartExpanded",!1),this.registerTableOption("dataTreeChildColumnCalcs",!1),this.registerTableOption("dataTreeSelectPropagate",!1),this.registerComponentFunction("row","treeCollapse",this.collapseRow.bind(this)),this.registerComponentFunction("row","treeExpand",this.expandRow.bind(this)),this.registerComponentFunction("row","treeToggle",this.toggleRow.bind(this)),this.registerComponentFunction("row","getTreeParent",this.getTreeParent.bind(this)),this.registerComponentFunction("row","getTreeChildren",this.getRowChildren.bind(this)),this.registerComponentFunction("row","addTreeChild",this.addTreeChildRow.bind(this)),this.registerComponentFunction("row","isTreeExpanded",this.isRowExpanded.bind(this))}initialize(){if(this.table.options.dataTree){var e=null,t=this.table.options;switch(this.field=t.dataTreeChildField,this.indent=t.dataTreeChildIndent,this.options("movableRows")&&console.warn("The movableRows option is not available with dataTree enabled, moving of child rows could result in unpredictable behavior"),t.dataTreeBranchElement?t.dataTreeBranchElement===!0?(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch")):typeof t.dataTreeBranchElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeBranchElement,this.branchEl=e.firstChild):this.branchEl=t.dataTreeBranchElement:(this.branchEl=document.createElement("div"),this.branchEl.classList.add("tabulator-data-tree-branch-empty")),t.dataTreeCollapseElement?typeof t.dataTreeCollapseElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeCollapseElement,this.collapseEl=e.firstChild):this.collapseEl=t.dataTreeCollapseElement:(this.collapseEl=document.createElement("div"),this.collapseEl.classList.add("tabulator-data-tree-control"),this.collapseEl.tabIndex=0,this.collapseEl.innerHTML="
"),t.dataTreeExpandElement?typeof t.dataTreeExpandElement=="string"?(e=document.createElement("div"),e.innerHTML=t.dataTreeExpandElement,this.expandEl=e.firstChild):this.expandEl=t.dataTreeExpandElement:(this.expandEl=document.createElement("div"),this.expandEl.classList.add("tabulator-data-tree-control"),this.expandEl.tabIndex=0,this.expandEl.innerHTML="
"),typeof t.dataTreeStartExpanded){case"boolean":this.startOpen=function(i,s){return t.dataTreeStartExpanded};break;case"function":this.startOpen=t.dataTreeStartExpanded;break;default:this.startOpen=function(i,s){return t.dataTreeStartExpanded[s]};break}this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("row-deleted",this.rowDelete.bind(this),0),this.subscribe("row-data-changed",this.rowDataChanged.bind(this),10),this.subscribe("cell-value-updated",this.cellValueChanged.bind(this)),this.subscribe("edit-cancelled",this.cellValueChanged.bind(this)),this.subscribe("column-moving-rows",this.columnMoving.bind(this)),this.subscribe("table-built",this.initializeElementField.bind(this)),this.subscribe("table-redrawing",this.tableRedrawing.bind(this)),this.registerDisplayHandler(this.getRows.bind(this),30)}}tableRedrawing(e){var t;e&&(t=this.table.rowManager.getRows(),t.forEach(i=>{this.reinitializeRowChildren(i)}))}initializeElementField(){var e=this.table.columnManager.getFirstVisibleColumn();this.elementField=this.table.options.dataTreeElementColumn||(e?e.field:!1)}getRowChildren(e){return this.getTreeChildren(e,!0)}columnMoving(){var e=[];return this.table.rowManager.rows.forEach(t=>{e=e.concat(this.getTreeChildren(t,!1,!0))}),e}rowDataChanged(e,t,i){this.redrawNeeded(i)&&(this.initializeRow(e),t&&(this.layoutRow(e),this.refreshData(!0)))}cellValueChanged(e){var t=e.column.getField();t===this.elementField&&this.layoutRow(e.row)}initializeRow(e){var t=e.getData()[this.field],i=Array.isArray(t),s=i||!i&&typeof t=="object"&&t!==null;!s&&e.modules.dataTree&&e.modules.dataTree.branchEl&&e.modules.dataTree.branchEl.parentNode.removeChild(e.modules.dataTree.branchEl),!s&&e.modules.dataTree&&e.modules.dataTree.controlEl&&e.modules.dataTree.controlEl.parentNode.removeChild(e.modules.dataTree.controlEl),e.modules.dataTree={index:e.modules.dataTree?e.modules.dataTree.index:0,open:s?e.modules.dataTree?e.modules.dataTree.open:this.startOpen(e.getComponent(),0):!1,controlEl:e.modules.dataTree&&s?e.modules.dataTree.controlEl:!1,branchEl:e.modules.dataTree&&s?e.modules.dataTree.branchEl:!1,parent:e.modules.dataTree?e.modules.dataTree.parent:!1,children:s}}reinitializeRowChildren(e){var t=this.getTreeChildren(e,!1,!0);t.forEach(function(i){i.reinitialize(!0)})}layoutRow(e){var t=this.elementField?e.getCell(this.elementField):e.getCells()[0],i=t.getElement(),s=e.modules.dataTree;s.branchEl&&(s.branchEl.parentNode&&s.branchEl.parentNode.removeChild(s.branchEl),s.branchEl=!1),s.controlEl&&(s.controlEl.parentNode&&s.controlEl.parentNode.removeChild(s.controlEl),s.controlEl=!1),this.generateControlElement(e,i),e.getElement().classList.add("tabulator-tree-level-"+s.index),s.index&&(this.branchEl?(s.branchEl=this.branchEl.cloneNode(!0),i.insertBefore(s.branchEl,i.firstChild),this.table.rtl?s.branchEl.style.marginRight=(s.branchEl.offsetWidth+s.branchEl.style.marginLeft)*(s.index-1)+s.index*this.indent+"px":s.branchEl.style.marginLeft=(s.branchEl.offsetWidth+s.branchEl.style.marginRight)*(s.index-1)+s.index*this.indent+"px"):this.table.rtl?i.style.paddingRight=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-right"))+s.index*this.indent+"px":i.style.paddingLeft=parseInt(window.getComputedStyle(i,null).getPropertyValue("padding-left"))+s.index*this.indent+"px")}generateControlElement(e,t){var i=e.modules.dataTree,s=i.controlEl;t=t||e.getCells()[0].getElement(),i.children!==!1&&(i.open?(i.controlEl=this.collapseEl.cloneNode(!0),i.controlEl.addEventListener("click",n=>{n.stopPropagation(),this.collapseRow(e)})):(i.controlEl=this.expandEl.cloneNode(!0),i.controlEl.addEventListener("click",n=>{n.stopPropagation(),this.expandRow(e)})),i.controlEl.addEventListener("mousedown",n=>{n.stopPropagation()}),s&&s.parentNode===t?s.parentNode.replaceChild(i.controlEl,s):t.insertBefore(i.controlEl,t.firstChild))}getRows(e){var t=[];return e.forEach((i,s)=>{var n,r;t.push(i),i instanceof S&&(i.create(),n=i.modules.dataTree,!n.index&&n.children!==!1&&(r=this.getChildren(i,!1,!0),r.forEach(o=>{o.create(),t.push(o)})))}),t}getChildren(e,t,i){var s=e.modules.dataTree,n=[],r=[];return s.children!==!1&&(s.open||t)&&(Array.isArray(s.children)||(s.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?n=this.table.modules.filter.filter(s.children):n=s.children,this.table.modExists("sort")&&this.table.options.dataTreeSort&&this.table.modules.sort.sort(n,i),n.forEach(o=>{r.push(o);var a=this.getChildren(o,!1,!0);a.forEach(h=>{r.push(h)})})),r}generateChildren(e){var t=[],i=e.getData()[this.field];return Array.isArray(i)||(i=[i]),i.forEach(s=>{var n=new S(s||{},this.table.rowManager);n.create(),n.modules.dataTree.index=e.modules.dataTree.index+1,n.modules.dataTree.parent=e,n.modules.dataTree.children&&(n.modules.dataTree.open=this.startOpen(n.getComponent(),n.modules.dataTree.index)),t.push(n)}),t}expandRow(e,t){var i=e.modules.dataTree;i.children!==!1&&(i.open=!0,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowExpanded",e.getComponent(),e.modules.dataTree.index))}collapseRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open=!1,e.reinitialize(),this.refreshData(!0),this.dispatchExternal("dataTreeRowCollapsed",e.getComponent(),e.modules.dataTree.index))}toggleRow(e){var t=e.modules.dataTree;t.children!==!1&&(t.open?this.collapseRow(e):this.expandRow(e))}isRowExpanded(e){return e.modules.dataTree.open}getTreeParent(e){return e.modules.dataTree.parent?e.modules.dataTree.parent.getComponent():!1}getTreeParentRoot(e){return e.modules.dataTree&&e.modules.dataTree.parent?this.getTreeParentRoot(e.modules.dataTree.parent):e}getFilteredTreeChildren(e){var t=e.modules.dataTree,i=[],s;return t.children&&(Array.isArray(t.children)||(t.children=this.generateChildren(e)),this.table.modExists("filter")&&this.table.options.dataTreeFilter?s=this.table.modules.filter.filter(t.children):s=t.children,s.forEach(n=>{n instanceof S&&i.push(n)})),i}rowDelete(e){var t=e.modules.dataTree.parent,i;t&&(i=this.findChildIndex(e,t),i!==!1&&t.data[this.field].splice(i,1),t.data[this.field].length||delete t.data[this.field],this.initializeRow(t),this.layoutRow(t)),this.refreshData(!0)}addTreeChildRow(e,t,i,s){var n=!1;typeof t=="string"&&(t=JSON.parse(t)),Array.isArray(e.data[this.field])||(e.data[this.field]=[],e.modules.dataTree.open=this.startOpen(e.getComponent(),e.modules.dataTree.index)),typeof s<"u"&&(n=this.findChildIndex(s,e),n!==!1&&e.data[this.field].splice(i?n:n+1,0,t)),n===!1&&(i?e.data[this.field].unshift(t):e.data[this.field].push(t)),this.initializeRow(e),this.layoutRow(e),this.refreshData(!0)}findChildIndex(e,t){var i=!1;return typeof e=="object"?e instanceof S?i=e.data:e instanceof oe?i=e._getSelf().data:typeof HTMLElement<"u"&&e instanceof HTMLElement?t.modules.dataTree&&(i=t.modules.dataTree.children.find(s=>s instanceof S?s.element===e:!1),i&&(i=i.data)):e===null&&(i=!1):typeof e>"u"?i=!1:i=t.data[this.field].find(s=>s.data[this.table.options.index]==e),i&&(Array.isArray(t.data[this.field])&&(i=t.data[this.field].indexOf(i)),i==-1&&(i=!1)),i}getTreeChildren(e,t,i){var s=e.modules.dataTree,n=[];return s&&s.children&&(Array.isArray(s.children)||(s.children=this.generateChildren(e)),s.children.forEach(r=>{r instanceof S&&(n.push(t?r.getComponent():r),i&&this.getTreeChildren(r,t,i).forEach(o=>{n.push(o)}))})),n}getChildField(){return this.field}redrawNeeded(e){return(this.field?typeof e[this.field]<"u":!1)||(this.elementField?typeof e[this.elementField]<"u":!1)}}b(et,"moduleName","dataTree");function It(l,e={},t){var i=e.delimiter?e.delimiter:",",s=[],n=[];l.forEach(r=>{var o=[];switch(r.type){case"group":console.warn("Download Warning - CSV downloader cannot process row groups");break;case"calc":console.warn("Download Warning - CSV downloader cannot process column calculations");break;case"header":r.columns.forEach((a,h)=>{a&&a.depth===1&&(n[h]=typeof a.value>"u"||a.value===null?"":'"'+String(a.value).split('"').join('""')+'"')});break;case"row":r.columns.forEach(a=>{if(a){switch(typeof a.value){case"object":a.value=a.value!==null?JSON.stringify(a.value):"";break;case"undefined":a.value="";break}o.push('"'+String(a.value).split('"').join('""')+'"')}}),s.push(o.join(i));break}}),n.length&&s.unshift(n.join(i)),s=s.join(` +`),e.bom&&(s="\uFEFF"+s),t(s,"text/csv")}function Nt(l,e,t){var i=[];l.forEach(s=>{var n={};switch(s.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":s.columns.forEach(r=>{r&&(n[r.component.getTitleDownload()||r.component.getField()]=r.value)}),i.push(n);break}}),i=JSON.stringify(i,null," "),t(i,"application/json")}function Wt(l,e={},t){var i=[],s=[],n={},r=e.rowGroupStyles||{fontStyle:"bold",fontSize:12,cellPadding:6,fillColor:220},o=e.rowCalcStyles||{fontStyle:"bold",fontSize:10,cellPadding:4,fillColor:232},a=e.jsPDF||{},h=e.title?e.title:"";a.orientation||(a.orientation=e.orientation||"landscape"),a.unit||(a.unit="pt"),l.forEach(c=>{switch(c.type){case"header":i.push(d(c));break;case"group":s.push(d(c,r));break;case"calc":s.push(d(c,o));break;case"row":s.push(d(c));break}});function d(c,f){var g=[];return c.columns.forEach(p=>{var v;if(p){switch(typeof p.value){case"object":p.value=p.value!==null?JSON.stringify(p.value):"";break;case"undefined":p.value="";break}v={content:p.value,colSpan:p.width,rowSpan:p.height},f&&(v.styles=f),g.push(v)}}),g}var u=new jspdf.jsPDF(a);e.autoTable&&(typeof e.autoTable=="function"?n=e.autoTable(u)||{}:n=e.autoTable),h&&(n.didDrawPage=function(c){u.text(h,40,30)}),n.head=i,n.body=s,u.autoTable(n),e.documentProcessing&&e.documentProcessing(u),t(u.output("arraybuffer"),"application/pdf")}function Gt(l,e,t){var i=this,s=e.sheetName||"Sheet1",n=XLSX.utils.book_new(),r=new M(this),o="compress"in e?e.compress:!0,a=e.writeOptions||{bookType:"xlsx",bookSST:!0,compression:o},h;a.type="binary",n.SheetNames=[],n.Sheets={};function d(){var f=[],g=[],p={},v={s:{c:0,r:0},e:{c:l[0]?l[0].columns.reduce((m,C)=>m+(C&&C.width?C.width:1),0):0,r:l.length}};return l.forEach((m,C)=>{var T=[];m.columns.forEach(function(y,k){y?(T.push(!(y.value instanceof Date)&&typeof y.value=="object"?JSON.stringify(y.value):y.value),(y.width>1||y.height>-1)&&(y.height>1||y.width>1)&&g.push({s:{r:C,c:k},e:{r:C+y.height-1,c:k+y.width-1}})):T.push("")}),f.push(T)}),XLSX.utils.sheet_add_aoa(p,f),p["!ref"]=XLSX.utils.encode_range(v),g.length&&(p["!merges"]=g),p}if(e.sheetOnly){t(d());return}if(e.sheets)for(var u in e.sheets)e.sheets[u]===!0?(n.SheetNames.push(u),n.Sheets[u]=d()):(n.SheetNames.push(u),r.commsSend(e.sheets[u],"download","intercept",{type:"xlsx",options:{sheetOnly:!0},active:i.active,intercept:function(f){n.Sheets[u]=f}}));else n.SheetNames.push(s),n.Sheets[s]=d();e.documentProcessing&&(n=e.documentProcessing(n));function c(f){for(var g=new ArrayBuffer(f.length),p=new Uint8Array(g),v=0;v!=f.length;++v)p[v]=f.charCodeAt(v)&255;return g}h=XLSX.write(n,a),t(c(h),"application/octet-stream")}function jt(l,e,t){this.modExists("export",!0)&&t(this.modules.export.generateHTMLTable(l),"text/html")}function Ut(l,e,t){const i=[];l.forEach(s=>{const n={};switch(s.type){case"header":break;case"group":console.warn("Download Warning - JSON downloader cannot process row groups");break;case"calc":console.warn("Download Warning - JSON downloader cannot process column calculations");break;case"row":s.columns.forEach(r=>{r&&(n[r.component.getTitleDownload()||r.component.getField()]=r.value)}),i.push(JSON.stringify(n));break}}),t(i.join(` +`),"application/x-ndjson")}var Xt={csv:It,json:Nt,jsonLines:Ut,pdf:Wt,xlsx:Gt,html:jt};const q=class q extends w{constructor(e){super(e),this.registerTableOption("downloadEncoder",function(t,i){return new Blob([t],{type:i})}),this.registerTableOption("downloadConfig",{}),this.registerTableOption("downloadRowRange","active"),this.registerColumnOption("download"),this.registerColumnOption("titleDownload")}initialize(){this.deprecatedOptionsCheck(),this.registerTableFunction("download",this.download.bind(this)),this.registerTableFunction("downloadToTab",this.downloadToTab.bind(this))}deprecatedOptionsCheck(){}downloadToTab(e,t,i,s){this.download(e,t,i,s,!0)}download(e,t,i,s,n){var r=!1;function o(h,d){n?n===!0?this.triggerDownload(h,d,e,t,!0):n(h):this.triggerDownload(h,d,e,t)}if(typeof e=="function"?r=e:q.downloaders[e]?r=q.downloaders[e]:console.warn("Download Error - No such download type found: ",e),r){var a=this.generateExportList(s);r.call(this.table,a,i||{},o.bind(this))}}generateExportList(e){var t=this.table.modules.export.generateExportList(this.table.options.downloadConfig,!1,e||this.table.options.downloadRowRange,"download"),i=this.table.options.groupHeaderDownload;return i&&!Array.isArray(i)&&(i=[i]),t.forEach(s=>{var n;s.type==="group"&&(n=s.columns[0],i&&i[s.indent]&&(n.value=i[s.indent](n.value,s.component._group.getRowCount(),s.component._group.getData(),s.component)))}),t}triggerDownload(e,t,i,s,n){var r=document.createElement("a"),o=this.table.options.downloadEncoder(e,t);o&&(n?window.open(window.URL.createObjectURL(o)):(s=s||"Tabulator."+(typeof i=="function"?"txt":i),navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(o,s):(r.setAttribute("href",window.URL.createObjectURL(o)),r.setAttribute("download",s),r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r))),this.dispatchExternal("downloadComplete"))}commsReceived(e,t,i){switch(t){case"intercept":this.download(i.type,"",i.options,i.active,i.intercept);break}}};b(q,"moduleName","download"),b(q,"downloaders",Xt);let ve=q;function ae(l,e){var t=e.mask,i=typeof e.maskLetterChar<"u"?e.maskLetterChar:"A",s=typeof e.maskNumberChar<"u"?e.maskNumberChar:"9",n=typeof e.maskWildcardChar<"u"?e.maskWildcardChar:"*";function r(o){var a=t[o];typeof a<"u"&&a!==n&&a!==i&&a!==s&&(l.value=l.value+""+a,r(o+1))}l.addEventListener("keydown",o=>{var a=l.value.length,h=o.key;if(o.keyCode>46&&!o.ctrlKey&&!o.metaKey){if(a>=t.length)return o.preventDefault(),o.stopPropagation(),!1;switch(t[a]){case i:if(h.toUpperCase()==h.toLowerCase())return o.preventDefault(),o.stopPropagation(),!1;break;case s:if(isNaN(h))return o.preventDefault(),o.stopPropagation(),!1;break;case n:break;default:if(h!==t[a])return o.preventDefault(),o.stopPropagation(),!1}}}),l.addEventListener("keyup",o=>{o.keyCode>46&&e.maskAutoFill&&r(l.value.length)}),l.placeholder||(l.placeholder=t),e.maskAutoFill&&r(l.value.length)}function Jt(l,e,t,i,s){var n=l.getValue(),r=document.createElement("input");if(r.setAttribute("type",s.search?"search":"text"),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let a in s.elementAttributes)a.charAt(0)=="+"?(a=a.slice(1),r.setAttribute(a,r.getAttribute(a)+s.elementAttributes["+"+a])):r.setAttribute(a,s.elementAttributes[a]);r.value=typeof n<"u"?n:"",e(function(){l.getType()==="cell"&&(r.focus({preventScroll:!0}),r.style.height="100%",s.selectContents&&r.select())});function o(a){(n===null||typeof n>"u")&&r.value!==""||r.value!==n?t(r.value)&&(n=r.value):i()}return r.addEventListener("change",o),r.addEventListener("blur",o),r.addEventListener("keydown",function(a){switch(a.keyCode){case 13:o();break;case 27:i();break;case 35:case 36:a.stopPropagation();break}}),s.mask&&ae(r,s),r}function Kt(l,e,t,i,s){var n=l.getValue(),r=s.verticalNavigation||"hybrid",o=String(n!==null&&typeof n<"u"?n:""),a=document.createElement("textarea"),h=0;if(a.style.display="block",a.style.padding="2px",a.style.height="100%",a.style.width="100%",a.style.boxSizing="border-box",a.style.whiteSpace="pre-wrap",a.style.resize="none",s.elementAttributes&&typeof s.elementAttributes=="object")for(let u in s.elementAttributes)u.charAt(0)=="+"?(u=u.slice(1),a.setAttribute(u,a.getAttribute(u)+s.elementAttributes["+"+u])):a.setAttribute(u,s.elementAttributes[u]);a.value=o,e(function(){l.getType()==="cell"&&(a.focus({preventScroll:!0}),a.style.height="100%",a.scrollHeight,a.style.height=a.scrollHeight+"px",l.getRow().normalizeHeight(),s.selectContents&&a.select())});function d(u){(n===null||typeof n>"u")&&a.value!==""||a.value!==n?(t(a.value)&&(n=a.value),setTimeout(function(){l.getRow().normalizeHeight()},300)):i()}return a.addEventListener("change",d),a.addEventListener("blur",d),a.addEventListener("keyup",function(){a.style.height="";var u=a.scrollHeight;a.style.height=u+"px",u!=h&&(h=u,l.getRow().normalizeHeight())}),a.addEventListener("keydown",function(u){switch(u.keyCode){case 13:u.shiftKey&&s.shiftEnterSubmit&&d();break;case 27:i();break;case 38:(r=="editor"||r=="hybrid"&&a.selectionStart)&&(u.stopImmediatePropagation(),u.stopPropagation());break;case 40:(r=="editor"||r=="hybrid"&&a.selectionStart!==a.value.length)&&(u.stopImmediatePropagation(),u.stopPropagation());break;case 35:case 36:u.stopPropagation();break}}),s.mask&&ae(a,s),a}function qt(l,e,t,i,s){var n=l.getValue(),r=s.verticalNavigation||"editor",o=document.createElement("input");if(o.setAttribute("type","number"),typeof s.max<"u"&&o.setAttribute("max",s.max),typeof s.min<"u"&&o.setAttribute("min",s.min),typeof s.step<"u"&&o.setAttribute("step",s.step),o.style.padding="4px",o.style.width="100%",o.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let d in s.elementAttributes)d.charAt(0)=="+"?(d=d.slice(1),o.setAttribute(d,o.getAttribute(d)+s.elementAttributes["+"+d])):o.setAttribute(d,s.elementAttributes[d]);o.value=n;var a=function(d){h()};e(function(){l.getType()==="cell"&&(o.removeEventListener("blur",a),o.focus({preventScroll:!0}),o.style.height="100%",o.addEventListener("blur",a),s.selectContents&&o.select())});function h(){var d=o.value;!isNaN(d)&&d!==""&&(d=Number(d)),d!==n?t(d)&&(n=d):i()}return o.addEventListener("keydown",function(d){switch(d.keyCode){case 13:h();break;case 27:i();break;case 38:case 40:r=="editor"&&(d.stopImmediatePropagation(),d.stopPropagation());break;case 35:case 36:d.stopPropagation();break}}),s.mask&&ae(o,s),o}function Yt(l,e,t,i,s){var n=l.getValue(),r=document.createElement("input");if(r.setAttribute("type","range"),typeof s.max<"u"&&r.setAttribute("max",s.max),typeof s.min<"u"&&r.setAttribute("min",s.min),typeof s.step<"u"&&r.setAttribute("step",s.step),r.style.padding="4px",r.style.width="100%",r.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let a in s.elementAttributes)a.charAt(0)=="+"?(a=a.slice(1),r.setAttribute(a,r.getAttribute(a)+s.elementAttributes["+"+a])):r.setAttribute(a,s.elementAttributes[a]);r.value=n,e(function(){l.getType()==="cell"&&(r.focus({preventScroll:!0}),r.style.height="100%")});function o(){var a=r.value;!isNaN(a)&&a!==""&&(a=Number(a)),a!=n?t(a)&&(n=a):i()}return r.addEventListener("blur",function(a){o()}),r.addEventListener("keydown",function(a){switch(a.keyCode){case 13:o();break;case 27:i();break}}),r}function $t(l,e,t,i,s){var n=s.format,r=s.verticalNavigation||"editor",o=n?window.DateTime||luxon.DateTime:null,a=l.getValue(),h=document.createElement("input");function d(c){var f;return o.isDateTime(c)?f=c:n==="iso"?f=o.fromISO(String(c)):f=o.fromFormat(String(c),n),f.toFormat("yyyy-MM-dd")}if(h.type="date",h.style.padding="4px",h.style.width="100%",h.style.boxSizing="border-box",s.max&&h.setAttribute("max",n?d(s.max):s.max),s.min&&h.setAttribute("min",n?d(s.min):s.min),s.elementAttributes&&typeof s.elementAttributes=="object")for(let c in s.elementAttributes)c.charAt(0)=="+"?(c=c.slice(1),h.setAttribute(c,h.getAttribute(c)+s.elementAttributes["+"+c])):h.setAttribute(c,s.elementAttributes[c]);a=typeof a<"u"?a:"",n&&(o?a=d(a):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),h.value=a,e(function(){l.getType()==="cell"&&(h.focus({preventScroll:!0}),h.style.height="100%",s.selectContents&&h.select())});function u(){var c=h.value,f;if((a===null||typeof a>"u")&&c!==""||c!==a){if(c&&n)switch(f=o.fromFormat(String(c),"yyyy-MM-dd"),n){case!0:c=f;break;case"iso":c=f.toISO();break;default:c=f.toFormat(n)}t(c)&&(a=h.value)}else i()}return h.addEventListener("blur",function(c){(c.relatedTarget||c.rangeParent||c.explicitOriginalTarget!==h)&&u()}),h.addEventListener("keydown",function(c){switch(c.keyCode){case 13:u();break;case 27:i();break;case 35:case 36:c.stopPropagation();break;case 38:case 40:r=="editor"&&(c.stopImmediatePropagation(),c.stopPropagation());break}}),h}function Qt(l,e,t,i,s){var n=s.format,r=s.verticalNavigation||"editor",o=n?window.DateTime||luxon.DateTime:null,a,h=l.getValue(),d=document.createElement("input");if(d.type="time",d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let c in s.elementAttributes)c.charAt(0)=="+"?(c=c.slice(1),d.setAttribute(c,d.getAttribute(c)+s.elementAttributes["+"+c])):d.setAttribute(c,s.elementAttributes[c]);h=typeof h<"u"?h:"",n&&(o?(o.isDateTime(h)?a=h:n==="iso"?a=o.fromISO(String(h)):a=o.fromFormat(String(h),n),h=a.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),d.value=h,e(function(){l.getType()=="cell"&&(d.focus({preventScroll:!0}),d.style.height="100%",s.selectContents&&d.select())});function u(){var c=d.value,f;if((h===null||typeof h>"u")&&c!==""||c!==h){if(c&&n)switch(f=o.fromFormat(String(c),"hh:mm"),n){case!0:c=f;break;case"iso":c=f.toISO();break;default:c=f.toFormat(n)}t(c)&&(h=d.value)}else i()}return d.addEventListener("blur",function(c){(c.relatedTarget||c.rangeParent||c.explicitOriginalTarget!==d)&&u()}),d.addEventListener("keydown",function(c){switch(c.keyCode){case 13:u();break;case 27:i();break;case 35:case 36:c.stopPropagation();break;case 38:case 40:r=="editor"&&(c.stopImmediatePropagation(),c.stopPropagation());break}}),d}function Zt(l,e,t,i,s){var n=s.format,r=s.verticalNavigation||"editor",o=n?window.DateTime||luxon.DateTime:null,a,h=l.getValue(),d=document.createElement("input");if(d.type="datetime-local",d.style.padding="4px",d.style.width="100%",d.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let c in s.elementAttributes)c.charAt(0)=="+"?(c=c.slice(1),d.setAttribute(c,d.getAttribute(c)+s.elementAttributes["+"+c])):d.setAttribute(c,s.elementAttributes[c]);h=typeof h<"u"?h:"",n&&(o?(o.isDateTime(h)?a=h:n==="iso"?a=o.fromISO(String(h)):a=o.fromFormat(String(h),n),h=a.toFormat("yyyy-MM-dd")+"T"+a.toFormat("HH:mm")):console.error("Editor Error - 'date' editor 'format' param is dependant on luxon.js")),d.value=h,e(function(){l.getType()==="cell"&&(d.focus({preventScroll:!0}),d.style.height="100%",s.selectContents&&d.select())});function u(){var c=d.value,f;if((h===null||typeof h>"u")&&c!==""||c!==h){if(c&&n)switch(f=o.fromISO(String(c)),n){case!0:c=f;break;case"iso":c=f.toISO();break;default:c=f.toFormat(n)}t(c)&&(h=d.value)}else i()}return d.addEventListener("blur",function(c){(c.relatedTarget||c.rangeParent||c.explicitOriginalTarget!==d)&&u()}),d.addEventListener("keydown",function(c){switch(c.keyCode){case 13:u();break;case 27:i();break;case 35:case 36:c.stopPropagation();break;case 38:case 40:r=="editor"&&(c.stopImmediatePropagation(),c.stopPropagation());break}}),d}let ei=class{constructor(e,t,i,s,n,r){this.edit=e,this.table=e.table,this.cell=t,this.params=this._initializeParams(r),this.data=[],this.displayItems=[],this.currentItems=[],this.focusedItem=null,this.input=this._createInputElement(),this.listEl=this._createListElement(),this.initialValues=null,this.isFilter=t.getType()==="header",this.filterTimeout=null,this.filtered=!1,this.typing=!1,this.values=[],this.popup=null,this.listIteration=0,this.lastAction="",this.filterTerm="",this.blurable=!0,this.actions={success:s,cancel:n},this._deprecatedOptionsCheck(),this._initializeValue(),i(this._onRendered.bind(this))}_deprecatedOptionsCheck(){}_initializeValue(){var e=this.cell.getValue();typeof e>"u"&&typeof this.params.defaultValue<"u"&&(e=this.params.defaultValue),this.initialValues=this.params.multiselect?e:[e],this.isFilter&&(this.input.value=this.initialValues?this.initialValues.join(","):"",this.headerFilterInitialListGen())}_onRendered(){var e=this.cell.getElement();function t(i){i.stopPropagation()}this.isFilter||(this.input.style.height="100%",this.input.focus({preventScroll:!0})),e.addEventListener("click",t),setTimeout(()=>{e.removeEventListener("click",t)},1e3),this.input.addEventListener("mousedown",this._preventPopupBlur.bind(this))}_createListElement(){var e=document.createElement("div");return e.classList.add("tabulator-edit-list"),e.addEventListener("mousedown",this._preventBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e}_setListWidth(){var e=this.isFilter?this.input:this.cell.getElement();this.listEl.style.minWidth=e.offsetWidth+"px",this.params.maxWidth&&(this.params.maxWidth===!0?this.listEl.style.maxWidth=e.offsetWidth+"px":typeof this.params.maxWidth=="number"?this.listEl.style.maxWidth=this.params.maxWidth+"px":this.listEl.style.maxWidth=this.params.maxWidth)}_createInputElement(){var e=this.params.elementAttributes,t=document.createElement("input");if(t.setAttribute("type",this.params.clearable?"search":"text"),t.style.padding="4px",t.style.width="100%",t.style.boxSizing="border-box",this.params.autocomplete||(t.style.cursor="default",t.style.caretColor="transparent"),e&&typeof e=="object")for(let i in e)i.charAt(0)=="+"?(i=i.slice(1),t.setAttribute(i,t.getAttribute(i)+e["+"+i])):t.setAttribute(i,e[i]);return this.params.mask&&ae(t,this.params),this._bindInputEvents(t),t}_initializeParams(e){var t=["values","valuesURL","valuesLookup"],i;return e=Object.assign({},e),e.verticalNavigation=e.verticalNavigation||"editor",e.placeholderLoading=typeof e.placeholderLoading>"u"?"Searching ...":e.placeholderLoading,e.placeholderEmpty=typeof e.placeholderEmpty>"u"?"No Results Found":e.placeholderEmpty,e.filterDelay=typeof e.filterDelay>"u"?300:e.filterDelay,e.emptyValue=Object.keys(e).includes("emptyValue")?e.emptyValue:"",i=Object.keys(e).filter(s=>t.includes(s)).length,i?i>1&&console.warn("list editor config error - only one of the values, valuesURL, or valuesLookup options can be set on the same editor"):console.warn("list editor config error - either the values, valuesURL, or valuesLookup option must be set"),e.autocomplete?e.multiselect&&(e.multiselect=!1,console.warn("list editor config error - multiselect option is not available when autocomplete is enabled")):(e.freetext&&(e.freetext=!1,console.warn("list editor config error - freetext option is only available when autocomplete is enabled")),e.filterFunc&&(e.filterFunc=!1,console.warn("list editor config error - filterFunc option is only available when autocomplete is enabled")),e.filterRemote&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option is only available when autocomplete is enabled")),e.mask&&(e.mask=!1,console.warn("list editor config error - mask option is only available when autocomplete is enabled")),e.allowEmpty&&(e.allowEmpty=!1,console.warn("list editor config error - allowEmpty option is only available when autocomplete is enabled")),e.listOnEmpty&&(e.listOnEmpty=!1,console.warn("list editor config error - listOnEmpty option is only available when autocomplete is enabled"))),e.filterRemote&&!(typeof e.valuesLookup=="function"||e.valuesURL)&&(e.filterRemote=!1,console.warn("list editor config error - filterRemote option should only be used when values list is populated from a remote source")),e}_bindInputEvents(e){e.addEventListener("focus",this._inputFocus.bind(this)),e.addEventListener("click",this._inputClick.bind(this)),e.addEventListener("blur",this._inputBlur.bind(this)),e.addEventListener("keydown",this._inputKeyDown.bind(this)),e.addEventListener("search",this._inputSearch.bind(this)),this.params.autocomplete&&e.addEventListener("keyup",this._inputKeyUp.bind(this))}_inputFocus(e){this.rebuildOptionsList()}_filter(){this.params.filterRemote?(clearTimeout(this.filterTimeout),this.filterTimeout=setTimeout(()=>{this.rebuildOptionsList()},this.params.filterDelay)):this._filterList()}_inputClick(e){e.stopPropagation()}_inputBlur(e){this.blurable&&(this.popup?this.popup.hide():this._resolveValue(!0))}_inputSearch(){this._clearChoices()}_inputKeyDown(e){switch(e.keyCode){case 38:this._keyUp(e);break;case 40:this._keyDown(e);break;case 37:case 39:this._keySide(e);break;case 13:this._keyEnter();break;case 27:this._keyEsc();break;case 36:case 35:this._keyHomeEnd(e);break;case 9:this._keyTab(e);break;default:this._keySelectLetter(e)}}_inputKeyUp(e){switch(e.keyCode){case 38:case 37:case 39:case 40:case 13:case 27:break;default:this._keyAutoCompLetter(e)}}_preventPopupBlur(){this.popup&&this.popup.blockHide(),setTimeout(()=>{this.popup&&this.popup.restoreHide()},10)}_preventBlur(){this.blurable=!1,setTimeout(()=>{this.blurable=!0},10)}_keyTab(e){this.params.autocomplete&&this.lastAction==="typing"?this._resolveValue(!0):this.focusedItem&&this._chooseItem(this.focusedItem,!0)}_keyUp(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t)&&(e.stopImmediatePropagation(),e.stopPropagation(),e.preventDefault(),t>0&&this._focusItem(this.displayItems[t-1]))}_keyDown(e){var t=this.displayItems.indexOf(this.focusedItem);(this.params.verticalNavigation=="editor"||this.params.verticalNavigation=="hybrid"&&t=38&&e.keyCode<=90&&this._scrollToValue(e.keyCode))}_keyAutoCompLetter(e){this._filter(),this.lastAction="typing",this.typing=!0}_scrollToValue(e){clearTimeout(this.filterTimeout);var t=String.fromCharCode(e).toLowerCase();this.filterTerm+=t.toLowerCase();var i=this.displayItems.find(s=>typeof s.label<"u"&&s.label.toLowerCase().startsWith(this.filterTerm));i&&this._focusItem(i),this.filterTimeout=setTimeout(()=>{this.filterTerm=""},800)}_focusItem(e){this.lastAction="focus",this.focusedItem&&this.focusedItem.element&&this.focusedItem.element.classList.remove("focused"),this.focusedItem=e,e&&e.element&&(e.element.classList.add("focused"),e.element.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"}))}headerFilterInitialListGen(){this._generateOptions(!0)}rebuildOptionsList(){this._generateOptions().then(this._sortOptions.bind(this)).then(this._buildList.bind(this)).then(this._showList.bind(this)).catch(e=>{Number.isInteger(e)||console.error("List generation error",e)})}_filterList(){this._buildList(this._filterOptions()),this._showList()}_generateOptions(e){var t=[],i=++this.listIteration;return this.filtered=!1,this.params.values?t=this.params.values:this.params.valuesURL?t=this._ajaxRequest(this.params.valuesURL,this.input.value):typeof this.params.valuesLookup=="function"?t=this.params.valuesLookup(this.cell,this.input.value):this.params.valuesLookup&&(t=this._uniqueColumnValues(this.params.valuesLookupField)),t instanceof Promise?(e||this._addPlaceholder(this.params.placeholderLoading),t.then().then(s=>this.listIteration===i?this._parseList(s):Promise.reject(i))):Promise.resolve(this._parseList(t))}_addPlaceholder(e){var t=document.createElement("div");typeof e=="function"&&(e=e(this.cell.getComponent(),this.listEl)),e&&(this._clearList(),e instanceof HTMLElement?t=e:(t.classList.add("tabulator-edit-list-placeholder"),t.innerHTML=e),this.listEl.appendChild(t),this._showList())}_ajaxRequest(e,t){var i=this.params.filterRemote?{term:t}:{};return e=Ye(e,{},i),fetch(e).then(s=>s.ok?s.json().catch(n=>(console.warn("List Ajax Load Error - Invalid JSON returned",n),Promise.reject(n))):(console.error("List Ajax Load Error - Connection Error: "+s.status,s.statusText),Promise.reject(s))).catch(s=>(console.error("List Ajax Load Error - Connection Error: ",s),Promise.reject(s)))}_uniqueColumnValues(e){var t={},i=this.table.getData(this.params.valuesLookup),s;return e?s=this.table.columnManager.getColumnByField(e):s=this.cell.getColumn()._getSelf(),s?i.forEach(n=>{var r=s.getFieldValue(n);r!==null&&typeof r<"u"&&r!==""&&(t[r]=!0)}):(console.warn("unable to find matching column to create select lookup list:",e),t=[]),Object.keys(t)}_parseList(e){var t=[];return Array.isArray(e)||(e=Object.entries(e).map(([i,s])=>({label:s,value:i}))),e.forEach(i=>{typeof i!="object"&&(i={label:i,value:i}),this._parseListItem(i,t,0)}),!this.currentItems.length&&this.params.freetext&&(this.input.value=this.initialValues,this.typing=!0,this.lastAction="typing"),this.data=t,t}_parseListItem(e,t,i){var s={};e.options?s=this._parseListGroup(e,i+1):(s={label:e.label,value:e.value,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,selected:!1,visible:!0,level:i,original:e},this.initialValues&&this.initialValues.indexOf(e.value)>-1&&this._chooseItem(s,!0)),t.push(s)}_parseListGroup(e,t){var i={label:e.label,group:!0,itemParams:e.itemParams,elementAttributes:e.elementAttributes,element:!1,visible:!0,level:t,options:[],original:e};return e.options.forEach(s=>{this._parseListItem(s,i.options,t)}),i}_sortOptions(e){var t;return this.params.sort&&(t=typeof this.params.sort=="function"?this.params.sort:this._defaultSortFunction.bind(this),this._sortGroup(t,e)),e}_sortGroup(e,t){t.sort((i,s)=>e(i.label,s.label,i.value,s.value,i.original,s.original)),t.forEach(i=>{i.group&&this._sortGroup(e,i.options)})}_defaultSortFunction(e,t){var i,s,n,r,o=0,a,h=/(\d+)|(\D+)/g,d=/\d/,u=0;if(this.params.sort==="desc"&&([e,t]=[t,e]),!e&&e!==0)u=!t&&t!==0?0:-1;else if(!t&&t!==0)u=1;else{if(isFinite(e)&&isFinite(t))return e-t;if(i=String(e).toLowerCase(),s=String(t).toLowerCase(),i===s)return 0;if(!(d.test(i)&&d.test(s)))return i>s?1:-1;for(i=i.match(h),s=s.match(h),a=i.length>s.length?s.length:i.length;or?1:-1;return i.length>s.length}return u}_filterOptions(){var e=this.params.filterFunc||this._defaultFilterFunc,t=this.input.value;return t?(this.filtered=!0,this.data.forEach(i=>{this._filterItem(e,t,i)})):this.filtered=!1,this.data}_filterItem(e,t,i){var s=!1;return i.group?(i.options.forEach(n=>{this._filterItem(e,t,n)&&(s=!0)}),i.visible=s):i.visible=e(t,i.label,i.value,i.original),i.visible}_defaultFilterFunc(e,t,i,s){return e=String(e).toLowerCase(),t!==null&&typeof t<"u"&&(String(t).toLowerCase().indexOf(e)>-1||String(i).toLowerCase().indexOf(e)>-1)}_clearList(){for(;this.listEl.firstChild;)this.listEl.removeChild(this.listEl.firstChild);this.displayItems=[]}_buildList(e){this._clearList(),e.forEach(t=>{this._buildItem(t)}),this.displayItems.length||this._addPlaceholder(this.params.placeholderEmpty)}_buildItem(e){var t=e.element,i;if(!this.filtered||e.visible){if(!t){if(t=document.createElement("div"),t.tabIndex=0,i=this.params.itemFormatter?this.params.itemFormatter(e.label,e.value,e.original,t):e.label,i instanceof HTMLElement?t.appendChild(i):t.innerHTML=i,e.group?t.classList.add("tabulator-edit-list-group"):t.classList.add("tabulator-edit-list-item"),t.classList.add("tabulator-edit-list-group-level-"+e.level),e.elementAttributes&&typeof e.elementAttributes=="object")for(let s in e.elementAttributes)s.charAt(0)=="+"?(s=s.slice(1),t.setAttribute(s,this.input.getAttribute(s)+e.elementAttributes["+"+s])):t.setAttribute(s,e.elementAttributes[s]);e.group?t.addEventListener("click",this._groupClick.bind(this,e)):t.addEventListener("click",this._itemClick.bind(this,e)),t.addEventListener("mousedown",this._preventBlur.bind(this)),e.element=t}this._styleItem(e),this.listEl.appendChild(t),e.group?e.options.forEach(s=>{this._buildItem(s)}):this.displayItems.push(e)}}_showList(){var e=this.popup&&this.popup.isVisible();if(this.input.parentNode){if(this.params.autocomplete&&this.input.value===""&&!this.params.listOnEmpty){this.popup&&this.popup.hide(!0);return}this._setListWidth(),this.popup||(this.popup=this.edit.popup(this.listEl)),this.popup.show(this.cell.getElement(),"bottom"),e||setTimeout(()=>{this.popup.hideOnBlur(this._resolveValue.bind(this,!0))},10)}}_styleItem(e){e&&e.element&&(e.selected?e.element.classList.add("active"):e.element.classList.remove("active"))}_itemClick(e,t){t.stopPropagation(),this._chooseItem(e)}_groupClick(e,t){t.stopPropagation()}_cancel(){this.popup.hide(!0),this.actions.cancel()}_clearChoices(){this.typing=!0,this.currentItems.forEach(e=>{e.selected=!1,this._styleItem(e)}),this.currentItems=[],this.focusedItem=null}_chooseItem(e,t){var i;this.typing=!1,this.params.multiselect?(i=this.currentItems.indexOf(e),i>-1?(this.currentItems.splice(i,1),e.selected=!1):(this.currentItems.push(e),e.selected=!0),this.input.value=this.currentItems.map(s=>s.label).join(","),this._styleItem(e)):(this.currentItems=[e],e.selected=!0,this.input.value=e.label,this._styleItem(e),t||this._resolveValue()),this._focusItem(e)}_resolveValue(e){var t,i;if(this.popup&&this.popup.hide(!0),this.params.multiselect)t=this.currentItems.map(s=>s.value);else if(e&&this.params.autocomplete&&this.typing)if(this.params.freetext||this.params.allowEmpty&&this.input.value==="")t=this.input.value;else{this.actions.cancel();return}else this.currentItems[0]?t=this.currentItems[0].value:(i=Array.isArray(this.initialValues)?this.initialValues[0]:this.initialValues,i===null||typeof i>"u"||i===""?t=i:t=this.params.emptyValue);t===""&&(t=this.params.emptyValue),this.actions.success(t),this.isFilter&&(this.initialValues=t&&!Array.isArray(t)?[t]:t,this.currentItems=[])}};function ti(l,e,t,i,s){var n=new ei(this,l,e,t,i,s);return n.input}function ii(l,e,t,i,s){var n=this,r=l.getElement(),o=l.getValue(),a=r.getElementsByTagName("svg").length||5,h=r.getElementsByTagName("svg")[0]?r.getElementsByTagName("svg")[0].getAttribute("width"):14,d=[],u=document.createElement("div"),c=document.createElementNS("http://www.w3.org/2000/svg","svg");function f(m){d.forEach(function(C,T){T'):(n.table.browser=="ie"?C.setAttribute("class","tabulator-star-inactive"):C.classList.replace("tabulator-star-active","tabulator-star-inactive"),C.innerHTML='')})}function g(m){var C=document.createElement("span"),T=c.cloneNode(!0);d.push(T),C.addEventListener("mouseenter",function(y){y.stopPropagation(),y.stopImmediatePropagation(),f(m)}),C.addEventListener("mousemove",function(y){y.stopPropagation(),y.stopImmediatePropagation()}),C.addEventListener("click",function(y){y.stopPropagation(),y.stopImmediatePropagation(),t(m),r.blur()}),C.appendChild(T),u.appendChild(C)}function p(m){o=m,f(m)}if(r.style.whiteSpace="nowrap",r.style.overflow="hidden",r.style.textOverflow="ellipsis",u.style.verticalAlign="middle",u.style.display="inline-block",u.style.padding="4px",c.setAttribute("width",h),c.setAttribute("height",h),c.setAttribute("viewBox","0 0 512 512"),c.setAttribute("xml:space","preserve"),c.style.padding="0 1px",s.elementAttributes&&typeof s.elementAttributes=="object")for(let m in s.elementAttributes)m.charAt(0)=="+"?(m=m.slice(1),u.setAttribute(m,u.getAttribute(m)+s.elementAttributes["+"+m])):u.setAttribute(m,s.elementAttributes[m]);for(var v=1;v<=a;v++)g(v);return o=Math.min(parseInt(o),a),f(o),u.addEventListener("mousemove",function(m){f(0)}),u.addEventListener("click",function(m){t(0)}),r.addEventListener("blur",function(m){i()}),r.addEventListener("keydown",function(m){switch(m.keyCode){case 39:p(o+1);break;case 37:p(o-1);break;case 13:t(o);break;case 27:i();break}}),u}function si(l,e,t,i,s){var n=l.getElement(),r=typeof s.max>"u"?n.getElementsByTagName("div")[0]&&n.getElementsByTagName("div")[0].getAttribute("max")||100:s.max,o=typeof s.min>"u"?n.getElementsByTagName("div")[0]&&n.getElementsByTagName("div")[0].getAttribute("min")||0:s.min,a=(r-o)/100,h=l.getValue()||0,d=document.createElement("div"),u=document.createElement("div"),c,f;function g(){var p=window.getComputedStyle(n,null),v=a*Math.round(u.offsetWidth/((n.clientWidth-parseInt(p.getPropertyValue("padding-left"))-parseInt(p.getPropertyValue("padding-right")))/100))+o;t(v),n.setAttribute("aria-valuenow",v),n.setAttribute("aria-label",h)}if(d.style.position="absolute",d.style.right="0",d.style.top="0",d.style.bottom="0",d.style.width="5px",d.classList.add("tabulator-progress-handle"),u.style.display="inline-block",u.style.position="relative",u.style.height="100%",u.style.backgroundColor="#488CE9",u.style.maxWidth="100%",u.style.minWidth="0%",s.elementAttributes&&typeof s.elementAttributes=="object")for(let p in s.elementAttributes)p.charAt(0)=="+"?(p=p.slice(1),u.setAttribute(p,u.getAttribute(p)+s.elementAttributes["+"+p])):u.setAttribute(p,s.elementAttributes[p]);return n.style.padding="4px 4px",h=Math.min(parseFloat(h),r),h=Math.max(parseFloat(h),o),h=Math.round((h-o)/a),u.style.width=h+"%",n.setAttribute("aria-valuemin",o),n.setAttribute("aria-valuemax",r),u.appendChild(d),d.addEventListener("mousedown",function(p){c=p.screenX,f=u.offsetWidth}),d.addEventListener("mouseover",function(){d.style.cursor="ew-resize"}),n.addEventListener("mousemove",function(p){c&&(u.style.width=f+p.screenX-c+"px")}),n.addEventListener("mouseup",function(p){c&&(p.stopPropagation(),p.stopImmediatePropagation(),c=!1,f=!1,g())}),n.addEventListener("keydown",function(p){switch(p.keyCode){case 39:p.preventDefault(),u.style.width=u.clientWidth+n.clientWidth/100+"px";break;case 37:p.preventDefault(),u.style.width=u.clientWidth-n.clientWidth/100+"px";break;case 9:case 13:g();break;case 27:i();break}}),n.addEventListener("blur",function(){i()}),u}function ni(l,e,t,i,s){var n=l.getValue(),r=document.createElement("input"),o=s.tristate,a=typeof s.indeterminateValue>"u"?null:s.indeterminateValue,h=!1,d=Object.keys(s).includes("trueValue"),u=Object.keys(s).includes("falseValue");if(r.setAttribute("type","checkbox"),r.style.marginTop="5px",r.style.boxSizing="border-box",s.elementAttributes&&typeof s.elementAttributes=="object")for(let f in s.elementAttributes)f.charAt(0)=="+"?(f=f.slice(1),r.setAttribute(f,r.getAttribute(f)+s.elementAttributes["+"+f])):r.setAttribute(f,s.elementAttributes[f]);r.value=n,o&&(typeof n>"u"||n===a||n==="")&&(h=!0,r.indeterminate=!0),this.table.browser!="firefox"&&this.table.browser!="safari"&&e(function(){l.getType()==="cell"&&r.focus({preventScroll:!0})}),r.checked=d?n===s.trueValue:n===!0||n==="true"||n==="True"||n===1;function c(f){var g=r.checked;return d&&g?g=s.trueValue:u&&!g&&(g=s.falseValue),o?f?h?a:g:r.checked&&!h?(r.checked=!1,r.indeterminate=!0,h=!0,a):(h=!1,g):g}return r.addEventListener("change",function(f){t(c())}),r.addEventListener("blur",function(f){t(c(!0))}),r.addEventListener("keydown",function(f){f.keyCode==13&&t(c()),f.keyCode==27&&i()}),r}var ri={input:Jt,textarea:Kt,number:qt,range:Yt,date:$t,time:Qt,datetime:Zt,list:ti,star:ii,progress:si,tickCross:ni};const Z=class Z extends w{constructor(e){super(e),this.currentCell=!1,this.mouseClick=!1,this.recursionBlock=!1,this.invalidEdit=!1,this.editedCells=[],this.convertEmptyValues=!1,this.editors=Z.editors,this.registerTableOption("editTriggerEvent","focus"),this.registerTableOption("editorEmptyValue"),this.registerTableOption("editorEmptyValueFunc",this.emptyValueCheck.bind(this)),this.registerColumnOption("editable"),this.registerColumnOption("editor"),this.registerColumnOption("editorParams"),this.registerColumnOption("editorEmptyValue"),this.registerColumnOption("editorEmptyValueFunc"),this.registerColumnOption("cellEditing"),this.registerColumnOption("cellEdited"),this.registerColumnOption("cellEditCancelled"),this.registerTableFunction("getEditedCells",this.getEditedCells.bind(this)),this.registerTableFunction("clearCellEdited",this.clearCellEdited.bind(this)),this.registerTableFunction("navigatePrev",this.navigatePrev.bind(this)),this.registerTableFunction("navigateNext",this.navigateNext.bind(this)),this.registerTableFunction("navigateLeft",this.navigateLeft.bind(this)),this.registerTableFunction("navigateRight",this.navigateRight.bind(this)),this.registerTableFunction("navigateUp",this.navigateUp.bind(this)),this.registerTableFunction("navigateDown",this.navigateDown.bind(this)),this.registerComponentFunction("cell","isEdited",this.cellIsEdited.bind(this)),this.registerComponentFunction("cell","clearEdited",this.clearEdited.bind(this)),this.registerComponentFunction("cell","edit",this.editCell.bind(this)),this.registerComponentFunction("cell","cancelEdit",this.cellCancelEdit.bind(this)),this.registerComponentFunction("cell","navigatePrev",this.navigatePrev.bind(this)),this.registerComponentFunction("cell","navigateNext",this.navigateNext.bind(this)),this.registerComponentFunction("cell","navigateLeft",this.navigateLeft.bind(this)),this.registerComponentFunction("cell","navigateRight",this.navigateRight.bind(this)),this.registerComponentFunction("cell","navigateUp",this.navigateUp.bind(this)),this.registerComponentFunction("cell","navigateDown",this.navigateDown.bind(this))}initialize(){this.subscribe("cell-init",this.bindEditor.bind(this)),this.subscribe("cell-delete",this.clearEdited.bind(this)),this.subscribe("cell-value-changed",this.updateCellClass.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("column-delete",this.columnDeleteCheck.bind(this)),this.subscribe("row-deleting",this.rowDeleteCheck.bind(this)),this.subscribe("row-layout",this.rowEditableCheck.bind(this)),this.subscribe("data-refreshing",this.cancelEdit.bind(this)),this.subscribe("clipboard-paste",this.pasteBlocker.bind(this)),this.subscribe("keybinding-nav-prev",this.navigatePrev.bind(this,void 0)),this.subscribe("keybinding-nav-next",this.keybindingNavigateNext.bind(this)),this.subscribe("keybinding-nav-up",this.navigateUp.bind(this,void 0)),this.subscribe("keybinding-nav-down",this.navigateDown.bind(this,void 0)),Object.keys(this.table.options).includes("editorEmptyValue")&&(this.convertEmptyValues=!0)}pasteBlocker(e){if(this.currentCell)return!0}keybindingNavigateNext(e){var t=this.currentCell,i=this.options("tabEndNewRow");t&&(this.navigateNext(t,e)||i&&(t.getElement().firstChild.blur(),this.invalidEdit||(i===!0?i=this.table.addRow({}):typeof i=="function"?i=this.table.addRow(i(t.row.getComponent())):i=this.table.addRow(Object.assign({},i)),i.then(()=>{setTimeout(()=>{t.getComponent().navigateNext()})}))))}cellIsEdited(e){return!!e.modules.edit&&e.modules.edit.edited}cellCancelEdit(e){e===this.currentCell?this.table.modules.edit.cancelEdit():console.warn("Cancel Editor Error - This cell is not currently being edited ")}updateCellClass(e){this.allowEdit(e)?e.getElement().classList.add("tabulator-editable"):e.getElement().classList.remove("tabulator-editable")}clearCellEdited(e){e||(e=this.table.modules.edit.getEditedCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.table.modules.edit.clearEdited(t._getSelf())})}navigatePrev(e=this.currentCell,t){var i,s;if(e){if(t&&t.preventDefault(),i=this.navigateLeft(),i)return!0;if(s=this.table.rowManager.prevDisplayRow(e.row,!0),s&&(i=this.findPrevEditableCell(s,s.cells.length),i))return i.getComponent().edit(),!0}return!1}navigateNext(e=this.currentCell,t){var i,s;if(e){if(t&&t.preventDefault(),i=this.navigateRight(),i)return!0;if(s=this.table.rowManager.nextDisplayRow(e.row,!0),s&&(i=this.findNextEditableCell(s,-1),i))return i.getComponent().edit(),!0}return!1}navigateLeft(e=this.currentCell,t){var i,s;return e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.findPrevEditableCell(e.row,i),s)?(s.getComponent().edit(),!0):!1}navigateRight(e=this.currentCell,t){var i,s;return e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.findNextEditableCell(e.row,i),s)?(s.getComponent().edit(),!0):!1}navigateUp(e=this.currentCell,t){var i,s;return e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.table.rowManager.prevDisplayRow(e.row,!0),s)?(s.cells[i].getComponent().edit(),!0):!1}navigateDown(e=this.currentCell,t){var i,s;return e&&(t&&t.preventDefault(),i=e.getIndex(),s=this.table.rowManager.nextDisplayRow(e.row,!0),s)?(s.cells[i].getComponent().edit(),!0):!1}findNextEditableCell(e,t){var i=!1;if(t0)for(var s=t-1;s>=0;s--){let n=e.cells[s];if(n.column.modules.edit&&x.elVisible(n.getElement())&&this.allowEdit(n)){i=n;break}}return i}initializeColumnCheck(e){typeof e.definition.editor<"u"&&this.initializeColumn(e)}columnDeleteCheck(e){this.currentCell&&this.currentCell.column===e&&this.cancelEdit()}rowDeleteCheck(e){this.currentCell&&this.currentCell.row===e&&this.cancelEdit()}rowEditableCheck(e){e.getCells().forEach(t=>{t.column.modules.edit&&typeof t.column.modules.edit.check=="function"&&this.updateCellClass(t)})}initializeColumn(e){var t=Object.keys(e.definition).includes("editorEmptyValue"),i={editor:!1,blocked:!1,check:e.definition.editable,params:e.definition.editorParams||{},convertEmptyValues:t,editorEmptyValue:e.definition.editorEmptyValue,editorEmptyValueFunc:e.definition.editorEmptyValueFunc};switch(typeof e.definition.editor){case"string":this.editors[e.definition.editor]?i.editor=this.editors[e.definition.editor]:console.warn("Editor Error - No such editor found: ",e.definition.editor);break;case"function":i.editor=e.definition.editor;break;case"boolean":e.definition.editor===!0&&(typeof e.definition.formatter!="function"?this.editors[e.definition.formatter]?i.editor=this.editors[e.definition.formatter]:i.editor=this.editors.input:console.warn("Editor Error - Cannot auto lookup editor for a custom formatter: ",e.definition.formatter));break}i.editor&&(e.modules.edit=i)}getCurrentCell(){return this.currentCell?this.currentCell.getComponent():!1}clearEditor(e){var t=this.currentCell,i;if(this.invalidEdit=!1,t){for(this.currentCell=!1,i=t.getElement(),this.dispatch("edit-editor-clear",t,e),i.classList.remove("tabulator-editing");i.firstChild;)i.removeChild(i.firstChild);t.row.getElement().classList.remove("tabulator-editing"),t.table.element.classList.remove("tabulator-editing")}}cancelEdit(){if(this.currentCell){var e=this.currentCell,t=this.currentCell.getComponent();this.clearEditor(!0),e.setValueActual(e.getValue()),e.cellRendered(),(e.column.definition.editor=="textarea"||e.column.definition.variableHeight)&&e.row.normalizeHeight(!0),e.column.definition.cellEditCancelled&&e.column.definition.cellEditCancelled.call(this.table,t),this.dispatch("edit-cancelled",e),this.dispatchExternal("cellEditCancelled",t)}}bindEditor(e){if(e.column.modules.edit){var t=this,i=e.getElement(!0);this.updateCellClass(e),i.setAttribute("tabindex",0),i.addEventListener("mousedown",function(s){s.button===2?s.preventDefault():t.mouseClick=!0}),this.options("editTriggerEvent")==="dblclick"&&i.addEventListener("dblclick",function(s){i.classList.contains("tabulator-editing")||(i.focus({preventScroll:!0}),t.edit(e,s,!1))}),(this.options("editTriggerEvent")==="focus"||this.options("editTriggerEvent")==="click")&&i.addEventListener("click",function(s){i.classList.contains("tabulator-editing")||(i.focus({preventScroll:!0}),t.edit(e,s,!1))}),this.options("editTriggerEvent")==="focus"&&i.addEventListener("focus",function(s){t.recursionBlock||t.edit(e,s,!1)})}}focusCellNoEvent(e,t){this.recursionBlock=!0,t&&this.table.browser==="ie"||e.getElement().focus({preventScroll:!0}),this.recursionBlock=!1}editCell(e,t){this.focusCellNoEvent(e),this.edit(e,!1,t)}focusScrollAdjust(e){if(this.table.rowManager.getRenderMode()=="virtual"){var t=this.table.rowManager.element.scrollTop,i=this.table.rowManager.element.clientHeight+this.table.rowManager.element.scrollTop,s=e.row.getElement();s.offsetTopi&&(this.table.rowManager.element.scrollTop+=s.offsetTop+s.offsetHeight-i);var n=this.table.rowManager.element.scrollLeft,r=this.table.rowManager.element.clientWidth+this.table.rowManager.element.scrollLeft,o=e.getElement();this.table.modExists("frozenColumns")&&(n+=parseInt(this.table.modules.frozenColumns.leftMargin||0),r-=parseInt(this.table.modules.frozenColumns.rightMargin||0)),this.table.options.renderHorizontal==="virtual"&&(n-=parseInt(this.table.columnManager.renderer.vDomPadLeft),r-=parseInt(this.table.columnManager.renderer.vDomPadLeft)),o.offsetLeftr&&(this.table.rowManager.element.scrollLeft+=o.offsetLeft+o.offsetWidth-r)}}allowEdit(e){var t=!!e.column.modules.edit;if(e.column.modules.edit)switch(typeof e.column.modules.edit.check){case"function":e.row.initialized&&(t=e.column.modules.edit.check(e.getComponent()));break;case"string":t=!!e.row.data[e.column.modules.edit.check];break;case"boolean":t=e.column.modules.edit.check;break}return t}edit(e,t,i){var s=this,n=!0,r=function(){},o=e.getElement(),a=!1,h,d,u;if(this.currentCell){!this.invalidEdit&&this.currentCell!==e&&this.cancelEdit();return}function c(m){if(s.currentCell===e&&!a){var C=s.chain("edit-success",[e,m],!0,!0);return C===!0||s.table.options.validationMode==="highlight"?(a=!0,s.clearEditor(),e.modules.edit||(e.modules.edit={}),e.modules.edit.edited=!0,s.editedCells.indexOf(e)==-1&&s.editedCells.push(e),m=s.transformEmptyValues(m,e),e.setValue(m,!0),C===!0):(a=!0,s.invalidEdit=!0,s.focusCellNoEvent(e,!0),r(),setTimeout(()=>{a=!1},10),!1)}}function f(){s.currentCell===e&&!a&&s.cancelEdit()}function g(m){r=m}if(e.column.modules.edit.blocked)return this.mouseClick=!1,this.blur(o),!1;if(t&&t.stopPropagation(),n=this.allowEdit(e),n||i){if(s.cancelEdit(),s.currentCell=e,this.focusScrollAdjust(e),d=e.getComponent(),this.mouseClick&&(this.mouseClick=!1,e.column.definition.cellClick&&e.column.definition.cellClick.call(this.table,t,d)),e.column.definition.cellEditing&&e.column.definition.cellEditing.call(this.table,d),this.dispatch("cell-editing",e),this.dispatchExternal("cellEditing",d),u=typeof e.column.modules.edit.params=="function"?e.column.modules.edit.params(d):e.column.modules.edit.params,h=e.column.modules.edit.editor.call(s,d,g,c,f,u),this.currentCell&&h!==!1)if(h instanceof Node){for(o.classList.add("tabulator-editing"),e.row.getElement().classList.add("tabulator-editing"),e.table.element.classList.add("tabulator-editing");o.firstChild;)o.removeChild(o.firstChild);o.appendChild(h),r();for(var p=o.children,v=0;v"u"}transformEmptyValues(e,t){var i=t.column.modules.edit,s=i.convertEmptyValues||this.convertEmptyValues,n;return s&&(n=i.editorEmptyValueFunc||this.options("editorEmptyValueFunc"),n&&n(e)&&(e=i.convertEmptyValues?i.editorEmptyValue:this.options("editorEmptyValue"))),e}blur(e){this.confirm("edit-blur",[e])||e.blur()}getEditedCells(){var e=[];return this.editedCells.forEach(t=>{e.push(t.getComponent())}),e}clearEdited(e){var t;e.modules.edit&&e.modules.edit.edited&&(e.modules.edit.edited=!1,this.dispatch("edit-edited-clear",e)),t=this.editedCells.indexOf(e),t>-1&&this.editedCells.splice(t,1)}};b(Z,"moduleName","edit"),b(Z,"editors",ri);let we=Z;class Ue{constructor(e,t,i,s){this.type=e,this.columns=t,this.component=i||!1,this.indent=s||0}}class de{constructor(e,t,i,s,n){this.value=e,this.component=t||!1,this.width=i,this.height=s,this.depth=n}}var oi={},ai={visible:function(){return this.rowManager.getVisibleRows(!1,!0)},all:function(){return this.rowManager.rows},selected:function(){return this.modules.selectRow.selectedRows},active:function(){return this.options.pagination?this.rowManager.getDisplayRows(this.rowManager.displayRows.length-2):this.rowManager.getDisplayRows()}};const V=class V extends w{constructor(e){super(e),this.config={},this.cloneTableStyle=!0,this.colVisProp="",this.colVisPropAttach="",this.registerTableOption("htmlOutputConfig",!1),this.registerColumnOption("htmlOutput"),this.registerColumnOption("titleHtmlOutput")}initialize(){this.registerTableFunction("getHtml",this.getHtml.bind(this))}generateExportList(e,t,i,s){var n,r,o,a;return this.cloneTableStyle=t,this.config=e||{},this.colVisProp=s,this.colVisPropAttach=this.colVisProp.charAt(0).toUpperCase()+this.colVisProp.slice(1),a=V.columnLookups[i],a&&(o=a.call(this.table),o=o.filter(h=>this.columnVisCheck(h))),n=this.config.columnHeaders!==!1?this.headersToExportRows(this.generateColumnGroupHeaders(o)):[],o&&(o=o.map(h=>h.getComponent())),r=this.bodyToExportRows(this.rowLookup(i),o),n.concat(r)}generateTable(e,t,i,s){var n=this.generateExportList(e,t,i,s);return this.generateTableElement(n)}rowLookup(e){var t=[],i;return typeof e=="function"?e.call(this.table).forEach(s=>{s=this.table.rowManager.findRow(s),s&&t.push(s)}):(i=V.rowLookups[e]||V.rowLookups.active,t=i.call(this.table)),Object.assign([],t)}generateColumnGroupHeaders(e){var t=[];return e||(e=this.config.columnGroups!==!1?this.table.columnManager.columns:this.table.columnManager.columnsByIndex),e.forEach(i=>{var s=this.processColumnGroup(i);s&&t.push(s)}),t}processColumnGroup(e){var t=e.columns,i=0,s=e.definition["title"+this.colVisPropAttach]||e.definition.title,n={title:s,column:e,depth:1};if(t.length){if(n.subGroups=[],n.width=0,t.forEach(r=>{var o=this.processColumnGroup(r);o&&(n.width+=o.width,n.subGroups.push(o),o.depth>i&&(i=o.depth))}),n.depth+=i,!n.width)return!1}else if(this.columnVisCheck(e))n.width=1;else return!1;return n}columnVisCheck(e){var t=e.definition[this.colVisProp];return this.config.rowHeaders===!1&&e.isRowHeader?!1:(typeof t=="function"&&(t=t.call(this.table,e.getComponent())),t===!1||t===!0?t:e.visible&&e.field)}headersToExportRows(e){var t=[],i=0,s=[];function n(r,o){var a=i-o;if(typeof t[o]>"u"&&(t[o]=[]),r.height=r.subGroups?1:a-r.depth+1,t[o].push(r),r.height>1)for(let h=1;h"u"&&(t[o+h]=[]),t[o+h].push(!1);if(r.width>1)for(let h=1;hi&&(i=r.depth)}),e.forEach(function(r){n(r,0)}),t.forEach(r=>{var o=[];r.forEach(a=>{if(a){let h=typeof a.title>"u"?"":a.title;o.push(new de(h,a.column.getComponent(),a.width,a.height,a.depth))}else o.push(null)}),s.push(new Ue("header",o))}),s}bodyToExportRows(e,t=[]){var i=[];return t.length===0&&this.table.columnManager.columnsByIndex.forEach(s=>{this.columnVisCheck(s)&&t.push(s.getComponent())}),this.config.columnCalcs!==!1&&this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&e.unshift(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&e.push(this.table.modules.columnCalcs.botRow)),e=e.filter(s=>{switch(s.type){case"group":return this.config.rowGroups!==!1;case"calc":return this.config.columnCalcs!==!1;case"row":return!(this.table.options.dataTree&&this.config.dataTree===!1&&s.modules.dataTree.parent)}return!0}),e.forEach((s,n)=>{var r=s.getData(this.colVisProp),o=[],a=0;switch(s.type){case"group":a=s.level,o.push(new de(s.key,s.getComponent(),t.length,1));break;case"calc":case"row":t.forEach(h=>{o.push(new de(h._column.getFieldValue(r),h,1,1))}),this.table.options.dataTree&&this.config.dataTree!==!1&&(a=s.modules.dataTree.index);break}i.push(new Ue(s.type,o,s.getComponent(),a))}),i}generateTableElement(e){var t=document.createElement("table"),i=document.createElement("thead"),s=document.createElement("tbody"),n=this.lookupTableStyles(),r=this.table.options["rowFormatter"+this.colVisPropAttach],o={};return o.rowFormatter=r!==null?r:this.table.options.rowFormatter,this.table.options.dataTree&&this.config.dataTree!==!1&&this.table.modExists("columnCalcs")&&(o.treeElementField=this.table.modules.dataTree.elementField),o.groupHeader=this.table.options["groupHeader"+this.colVisPropAttach],o.groupHeader&&!Array.isArray(o.groupHeader)&&(o.groupHeader=[o.groupHeader]),t.classList.add("tabulator-print-table"),this.mapElementStyles(this.table.columnManager.getHeadersElement(),i,["border-top","border-left","border-right","border-bottom","background-color","color","font-weight","font-family","font-size"]),e.length>1e3&&console.warn("It may take a long time to render an HTML table with more than 1000 rows"),e.forEach((a,h)=>{let d;switch(a.type){case"header":i.appendChild(this.generateHeaderElement(a,o,n));break;case"group":s.appendChild(this.generateGroupElement(a,o,n));break;case"calc":s.appendChild(this.generateCalcElement(a,o,n));break;case"row":d=this.generateRowElement(a,o,n),this.mapElementStyles(h%2&&n.evenRow?n.evenRow:n.oddRow,d,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),s.appendChild(d);break}}),i.innerHTML&&t.appendChild(i),t.appendChild(s),this.mapElementStyles(this.table.element,t,["border-top","border-left","border-right","border-bottom"]),t}lookupTableStyles(){var e={};return this.cloneTableStyle&&window.getComputedStyle&&(e.oddRow=this.table.element.querySelector(".tabulator-row-odd:not(.tabulator-group):not(.tabulator-calcs)"),e.evenRow=this.table.element.querySelector(".tabulator-row-even:not(.tabulator-group):not(.tabulator-calcs)"),e.calcRow=this.table.element.querySelector(".tabulator-row.tabulator-calcs"),e.firstRow=this.table.element.querySelector(".tabulator-row:not(.tabulator-group):not(.tabulator-calcs)"),e.firstGroup=this.table.element.getElementsByClassName("tabulator-group")[0],e.firstRow&&(e.styleCells=e.firstRow.getElementsByClassName("tabulator-cell"),e.styleRowHeader=e.firstRow.getElementsByClassName("tabulator-row-header")[0],e.firstCell=e.styleCells[0],e.lastCell=e.styleCells[e.styleCells.length-1])),e}generateHeaderElement(e,t,i){var s=document.createElement("tr");return e.columns.forEach(n=>{if(n){var r=document.createElement("th"),o=n.component._column.definition.cssClass?n.component._column.definition.cssClass.split(" "):[];r.colSpan=n.width,r.rowSpan=n.height,r.innerHTML=n.value,this.cloneTableStyle&&(r.style.boxSizing="border-box"),o.forEach(function(a){r.classList.add(a)}),this.mapElementStyles(n.component.getElement(),r,["text-align","border-left","border-right","background-color","color","font-weight","font-family","font-size"]),this.mapElementStyles(n.component._column.contentElement,r,["padding-top","padding-left","padding-right","padding-bottom"]),n.component._column.visible?this.mapElementStyles(n.component.getElement(),r,["width"]):n.component._column.definition.width&&(r.style.width=n.component._column.definition.width+"px"),n.component._column.parent&&n.component._column.parent.isGroup?this.mapElementStyles(n.component._column.parent.groupElement,r,["border-top"]):this.mapElementStyles(n.component.getElement(),r,["border-top"]),n.component._column.isGroup?this.mapElementStyles(n.component.getElement(),r,["border-bottom"]):this.mapElementStyles(this.table.columnManager.getElement(),r,["border-bottom"]),s.appendChild(r)}}),s}generateGroupElement(e,t,i){var s=document.createElement("tr"),n=document.createElement("td"),r=e.columns[0];return s.classList.add("tabulator-print-table-row"),t.groupHeader&&t.groupHeader[e.indent]?r.value=t.groupHeader[e.indent](r.value,e.component._group.getRowCount(),e.component._group.getData(),e.component):t.groupHeader!==!1&&(r.value=e.component._group.generator(r.value,e.component._group.getRowCount(),e.component._group.getData(),e.component)),n.colSpan=r.width,n.innerHTML=r.value,s.classList.add("tabulator-print-table-group"),s.classList.add("tabulator-group-level-"+e.indent),r.component.isVisible()&&s.classList.add("tabulator-group-visible"),this.mapElementStyles(i.firstGroup,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),this.mapElementStyles(i.firstGroup,n,["padding-top","padding-left","padding-right","padding-bottom"]),s.appendChild(n),s}generateCalcElement(e,t,i){var s=this.generateRowElement(e,t,i);return s.classList.add("tabulator-print-table-calcs"),this.mapElementStyles(i.calcRow,s,["border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","background-color"]),s}generateRowElement(e,t,i){var s=document.createElement("tr");if(s.classList.add("tabulator-print-table-row"),e.columns.forEach((n,r)=>{if(n){var o=document.createElement("td"),a=n.component._column,h=this.table,d=h.columnManager.findColumnIndex(a),u=n.value,c,f,g={modules:{},getValue:function(){return u},getField:function(){return a.definition.field},getElement:function(){return o},getType:function(){return"cell"},getColumn:function(){return a.getComponent()},getData:function(){return e.component.getData()},getRow:function(){return e.component},getTable:function(){return h},getComponent:function(){return g},column:a},p=a.definition.cssClass?a.definition.cssClass.split(" "):[];if(p.forEach(function(v){o.classList.add(v)}),this.table.modExists("format")&&this.config.formatCells!==!1)u=this.table.modules.format.formatExportValue(g,this.colVisProp);else switch(typeof u){case"object":u=u!==null?JSON.stringify(u):"";break;case"undefined":u="";break}u instanceof Node?o.appendChild(u):o.innerHTML=u,f=["padding-top","padding-left","padding-right","padding-bottom","border-top","border-left","border-right","border-bottom","color","font-weight","font-family","font-size","text-align"],a.isRowHeader?(c=i.styleRowHeader,f.push("background-color")):c=i.styleCells&&i.styleCells[d]?i.styleCells[d]:i.firstCell,c&&(this.mapElementStyles(c,o,f),a.definition.align&&(o.style.textAlign=a.definition.align)),this.table.options.dataTree&&this.config.dataTree!==!1&&(t.treeElementField&&t.treeElementField==a.field||!t.treeElementField&&r==0)&&(e.component._row.modules.dataTree.controlEl&&o.insertBefore(e.component._row.modules.dataTree.controlEl.cloneNode(!0),o.firstChild),e.component._row.modules.dataTree.branchEl&&o.insertBefore(e.component._row.modules.dataTree.branchEl.cloneNode(!0),o.firstChild)),s.appendChild(o),g.modules.format&&g.modules.format.renderedCallback&&g.modules.format.renderedCallback()}}),t.rowFormatter&&e.type==="row"&&this.config.formatCells!==!1){let n=Object.assign(e.component);n.getElement=function(){return s},t.rowFormatter(e.component)}return s}generateHTMLTable(e){var t=document.createElement("div");return t.appendChild(this.generateTableElement(e)),t.innerHTML}getHtml(e,t,i,s){var n=this.generateExportList(i||this.table.options.htmlOutputConfig,t,e,s||"htmlOutput");return this.generateHTMLTable(n)}mapElementStyles(e,t,i){if(this.cloneTableStyle&&e&&t){var s={"background-color":"backgroundColor",color:"fontColor",width:"width","font-weight":"fontWeight","font-family":"fontFamily","font-size":"fontSize","text-align":"textAlign","border-top":"borderTop","border-left":"borderLeft","border-right":"borderRight","border-bottom":"borderBottom","padding-top":"paddingTop","padding-left":"paddingLeft","padding-right":"paddingRight","padding-bottom":"paddingBottom"};if(window.getComputedStyle){var n=window.getComputedStyle(e);i.forEach(function(r){t.style[s[r]]||(t.style[s[r]]=n.getPropertyValue(r))})}}}};b(V,"moduleName","export"),b(V,"columnLookups",oi),b(V,"rowLookups",ai);let Ce=V;var li={"=":function(l,e,t,i){return e==l},"<":function(l,e,t,i){return e":function(l,e,t,i){return e>l},">=":function(l,e,t,i){return e>=l},"!=":function(l,e,t,i){return e!=l},regex:function(l,e,t,i){return typeof l=="string"&&(l=new RegExp(l)),l.test(e)},like:function(l,e,t,i){return l===null||typeof l>"u"?e===l:typeof e<"u"&&e!==null?String(e).toLowerCase().indexOf(l.toLowerCase())>-1:!1},keywords:function(l,e,t,i){var s=l.toLowerCase().split(typeof i.separator>"u"?" ":i.separator),n=String(e===null||typeof e>"u"?"":e).toLowerCase(),r=[];return s.forEach(o=>{n.includes(o)&&r.push(!0)}),i.matchAll?r.length===s.length:!!r.length},starts:function(l,e,t,i){return l===null||typeof l>"u"?e===l:typeof e<"u"&&e!==null?String(e).toLowerCase().startsWith(l.toLowerCase()):!1},ends:function(l,e,t,i){return l===null||typeof l>"u"?e===l:typeof e<"u"&&e!==null?String(e).toLowerCase().endsWith(l.toLowerCase()):!1},in:function(l,e,t,i){return Array.isArray(l)?l.length?l.indexOf(e)>-1:!0:(console.warn("Filter Error - filter value is not an array:",l),!1)}};const O=class O extends w{constructor(e){super(e),this.filterList=[],this.headerFilters={},this.headerFilterColumns=[],this.prevHeaderFilterChangeCheck="",this.prevHeaderFilterChangeCheck="{}",this.changed=!1,this.tableInitialized=!1,this.registerTableOption("filterMode","local"),this.registerTableOption("initialFilter",!1),this.registerTableOption("initialHeaderFilter",!1),this.registerTableOption("headerFilterLiveFilterDelay",300),this.registerTableOption("placeholderHeaderFilter",!1),this.registerColumnOption("headerFilter"),this.registerColumnOption("headerFilterPlaceholder"),this.registerColumnOption("headerFilterParams"),this.registerColumnOption("headerFilterEmptyCheck"),this.registerColumnOption("headerFilterFunc"),this.registerColumnOption("headerFilterFuncParams"),this.registerColumnOption("headerFilterLiveFilter"),this.registerTableFunction("searchRows",this.searchRows.bind(this)),this.registerTableFunction("searchData",this.searchData.bind(this)),this.registerTableFunction("setFilter",this.userSetFilter.bind(this)),this.registerTableFunction("refreshFilter",this.userRefreshFilter.bind(this)),this.registerTableFunction("addFilter",this.userAddFilter.bind(this)),this.registerTableFunction("getFilters",this.getFilters.bind(this)),this.registerTableFunction("setHeaderFilterFocus",this.userSetHeaderFilterFocus.bind(this)),this.registerTableFunction("getHeaderFilterValue",this.userGetHeaderFilterValue.bind(this)),this.registerTableFunction("setHeaderFilterValue",this.userSetHeaderFilterValue.bind(this)),this.registerTableFunction("getHeaderFilters",this.getHeaderFilters.bind(this)),this.registerTableFunction("removeFilter",this.userRemoveFilter.bind(this)),this.registerTableFunction("clearFilter",this.userClearFilter.bind(this)),this.registerTableFunction("clearHeaderFilter",this.userClearHeaderFilter.bind(this)),this.registerComponentFunction("column","headerFilterFocus",this.setHeaderFilterFocus.bind(this)),this.registerComponentFunction("column","reloadHeaderFilter",this.reloadHeaderFilter.bind(this)),this.registerComponentFunction("column","getHeaderFilterValue",this.getHeaderFilterValue.bind(this)),this.registerComponentFunction("column","setHeaderFilterValue",this.setHeaderFilterValue.bind(this))}initialize(){this.subscribe("column-init",this.initializeColumnHeaderFilter.bind(this)),this.subscribe("column-width-fit-before",this.hideHeaderFilterElements.bind(this)),this.subscribe("column-width-fit-after",this.showHeaderFilterElements.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.subscribe("placeholder",this.generatePlaceholder.bind(this)),this.table.options.filterMode==="remote"&&this.subscribe("data-params",this.remoteFilterParams.bind(this)),this.registerDataHandler(this.filter.bind(this),10)}tableBuilt(){this.table.options.initialFilter&&this.setFilter(this.table.options.initialFilter),this.table.options.initialHeaderFilter&&this.table.options.initialHeaderFilter.forEach(e=>{var t=this.table.columnManager.findColumn(e.field);if(t)this.setHeaderFilterValue(t,e.value);else return console.warn("Column Filter Error - No matching column found:",e.field),!1}),this.tableInitialized=!0}remoteFilterParams(e,t,i,s){return s.filter=this.getFilters(!0,!0),s}generatePlaceholder(e){if(this.table.options.placeholderHeaderFilter&&Object.keys(this.headerFilters).length)return this.table.options.placeholderHeaderFilter}userSetFilter(e,t,i,s){this.setFilter(e,t,i,s),this.refreshFilter()}userRefreshFilter(){this.refreshFilter()}userAddFilter(e,t,i,s){this.addFilter(e,t,i,s),this.refreshFilter()}userSetHeaderFilterFocus(e){var t=this.table.columnManager.findColumn(e);if(t)this.setHeaderFilterFocus(t);else return console.warn("Column Filter Focus Error - No matching column found:",e),!1}userGetHeaderFilterValue(e){var t=this.table.columnManager.findColumn(e);if(t)return this.getHeaderFilterValue(t);console.warn("Column Filter Error - No matching column found:",e)}userSetHeaderFilterValue(e,t){var i=this.table.columnManager.findColumn(e);if(i)this.setHeaderFilterValue(i,t);else return console.warn("Column Filter Error - No matching column found:",e),!1}userRemoveFilter(e,t,i){this.removeFilter(e,t,i),this.refreshFilter()}userClearFilter(e){this.clearFilter(e),this.refreshFilter()}userClearHeaderFilter(){this.clearHeaderFilter(),this.refreshFilter()}searchRows(e,t,i){return this.search("rows",e,t,i)}searchData(e,t,i){return this.search("data",e,t,i)}initializeColumnHeaderFilter(e){var t=e.definition;t.headerFilter&&this.initializeColumn(e)}initializeColumn(e,t){var i=this,s=e.getField();function n(r){var o=e.modules.filter.tagType=="input"&&e.modules.filter.attrType=="text"||e.modules.filter.tagType=="textarea"?"partial":"match",a="",h="",d;if(typeof e.modules.filter.prevSuccess>"u"||e.modules.filter.prevSuccess!==r){if(e.modules.filter.prevSuccess=r,e.modules.filter.emptyFunc(r))delete i.headerFilters[s];else{switch(e.modules.filter.value=r,typeof e.definition.headerFilterFunc){case"string":O.filters[e.definition.headerFilterFunc]?(a=e.definition.headerFilterFunc,d=function(u){var c=e.definition.headerFilterFuncParams||{},f=e.getFieldValue(u);return c=typeof c=="function"?c(r,f,u):c,O.filters[e.definition.headerFilterFunc](r,f,u,c)}):console.warn("Header Filter Error - Matching filter function not found: ",e.definition.headerFilterFunc);break;case"function":d=function(u){var c=e.definition.headerFilterFuncParams||{},f=e.getFieldValue(u);return c=typeof c=="function"?c(r,f,u):c,e.definition.headerFilterFunc(r,f,u,c)},a=d;break}if(!d)switch(o){case"partial":d=function(u){var c=e.getFieldValue(u);return typeof c<"u"&&c!==null?String(c).toLowerCase().indexOf(String(r).toLowerCase())>-1:!1},a="like";break;default:d=function(u){return e.getFieldValue(u)==r},a="="}i.headerFilters[s]={value:r,func:d,type:a}}e.modules.filter.value=r,h=JSON.stringify(i.headerFilters),i.prevHeaderFilterChangeCheck!==h&&(i.prevHeaderFilterChangeCheck=h,i.trackChanges(),i.refreshFilter())}return!0}e.modules.filter={success:n,attrType:!1,tagType:!1,emptyFunc:!1},this.generateHeaderFilterElement(e)}generateHeaderFilterElement(e,t,i){var s=this,n=e.modules.filter.success,r=e.getField(),o,a,h,d,u,c,f,g;e.modules.filter.value=t;function p(){}function v(m){g=m}if(e.modules.filter.headerElement&&e.modules.filter.headerElement.parentNode&&e.contentElement.removeChild(e.modules.filter.headerElement.parentNode),r){switch(e.modules.filter.emptyFunc=e.definition.headerFilterEmptyCheck||function(m){return!m&&m!==0},o=document.createElement("div"),o.classList.add("tabulator-header-filter"),typeof e.definition.headerFilter){case"string":s.table.modules.edit.editors[e.definition.headerFilter]?(a=s.table.modules.edit.editors[e.definition.headerFilter],(e.definition.headerFilter==="tick"||e.definition.headerFilter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(m){return m!==!0&&m!==!1})):console.warn("Filter Error - Cannot build header filter, No such editor found: ",e.definition.editor);break;case"function":a=e.definition.headerFilter;break;case"boolean":e.modules.edit&&e.modules.edit.editor?a=e.modules.edit.editor:e.definition.formatter&&s.table.modules.edit.editors[e.definition.formatter]?(a=s.table.modules.edit.editors[e.definition.formatter],(e.definition.formatter==="tick"||e.definition.formatter==="tickCross")&&!e.definition.headerFilterEmptyCheck&&(e.modules.filter.emptyFunc=function(m){return m!==!0&&m!==!1})):a=s.table.modules.edit.editors.input;break}if(a){if(d={getValue:function(){return typeof t<"u"?t:""},getField:function(){return e.definition.field},getElement:function(){return o},getColumn:function(){return e.getComponent()},getTable:()=>this.table,getType:()=>"header",getRow:function(){return{normalizeHeight:function(){}}}},f=e.definition.headerFilterParams||{},f=typeof f=="function"?f.call(s.table,d):f,h=a.call(this.table.modules.edit,d,v,n,p,f),!h){console.warn("Filter Error - Cannot add filter to "+r+" column, editor returned a value of false");return}if(!(h instanceof Node)){console.warn("Filter Error - Cannot add filter to "+r+" column, editor should return an instance of Node, the editor returned:",h);return}s.langBind("headerFilters|columns|"+e.definition.field,function(m){h.setAttribute("placeholder",typeof m<"u"&&m?m:e.definition.headerFilterPlaceholder||s.langText("headerFilters|default"))}),h.addEventListener("click",function(m){m.stopPropagation(),h.focus()}),h.addEventListener("focus",m=>{var C=this.table.columnManager.contentsElement.scrollLeft,T=this.table.rowManager.element.scrollLeft;C!==T&&(this.table.rowManager.scrollHorizontal(C),this.table.columnManager.scrollHorizontal(C))}),u=!1,c=function(m){u&&clearTimeout(u),u=setTimeout(function(){n(h.value)},s.table.options.headerFilterLiveFilterDelay)},e.modules.filter.headerElement=h,e.modules.filter.attrType=h.hasAttribute("type")?h.getAttribute("type").toLowerCase():"",e.modules.filter.tagType=h.tagName.toLowerCase(),e.definition.headerFilterLiveFilter!==!1&&(e.definition.headerFilter==="autocomplete"||e.definition.headerFilter==="tickCross"||(e.definition.editor==="autocomplete"||e.definition.editor==="tickCross")&&e.definition.headerFilter===!0||(h.addEventListener("keyup",c),h.addEventListener("search",c),e.modules.filter.attrType=="number"&&h.addEventListener("change",function(m){n(h.value)}),e.modules.filter.attrType=="text"&&this.table.browser!=="ie"&&h.setAttribute("type","search")),(e.modules.filter.tagType=="input"||e.modules.filter.tagType=="select"||e.modules.filter.tagType=="textarea")&&h.addEventListener("mousedown",function(m){m.stopPropagation()})),o.appendChild(h),e.contentElement.appendChild(o),i||s.headerFilterColumns.push(e),g&&g()}}else console.warn("Filter Error - Cannot add header filter, column has no field set:",e.definition.title)}hideHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="none")})}showHeaderFilterElements(){this.headerFilterColumns.forEach(function(e){e.modules.filter&&e.modules.filter.headerElement&&(e.modules.filter.headerElement.style.display="")})}setHeaderFilterFocus(e){e.modules.filter&&e.modules.filter.headerElement?e.modules.filter.headerElement.focus():console.warn("Column Filter Focus Error - No header filter set on column:",e.getField())}getHeaderFilterValue(e){if(e.modules.filter&&e.modules.filter.headerElement)return e.modules.filter.value;console.warn("Column Filter Error - No header filter set on column:",e.getField())}setHeaderFilterValue(e,t){e&&(e.modules.filter&&e.modules.filter.headerElement?(this.generateHeaderFilterElement(e,t,!0),e.modules.filter.success(t)):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}reloadHeaderFilter(e){e&&(e.modules.filter&&e.modules.filter.headerElement?this.generateHeaderFilterElement(e,e.modules.filter.value,!0):console.warn("Column Filter Error - No header filter set on column:",e.getField()))}refreshFilter(){this.tableInitialized&&(this.table.options.filterMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0))}trackChanges(){this.changed=!0,this.dispatch("filter-changed")}hasChanged(){var e=this.changed;return this.changed=!1,e}setFilter(e,t,i,s){this.filterList=[],Array.isArray(e)||(e=[{field:e,type:t,value:i,params:s}]),this.addFilter(e)}addFilter(e,t,i,s){var n=!1;Array.isArray(e)||(e=[{field:e,type:t,value:i,params:s}]),e.forEach(r=>{r=this.findFilter(r),r&&(this.filterList.push(r),n=!0)}),n&&this.trackChanges()}findFilter(e){var t;if(Array.isArray(e))return this.findSubFilters(e);var i=!1;return typeof e.field=="function"?i=function(s){return e.field(s,e.type||{})}:O.filters[e.type]?(t=this.table.columnManager.getColumnByField(e.field),t?i=function(s){return O.filters[e.type](e.value,t.getFieldValue(s),s,e.params||{})}:i=function(s){return O.filters[e.type](e.value,s[e.field],s,e.params||{})}):console.warn("Filter Error - No such filter type found, ignoring: ",e.type),e.func=i,e.func?e:!1}findSubFilters(e){var t=[];return e.forEach(i=>{i=this.findFilter(i),i&&t.push(i)}),t.length?t:!1}getFilters(e,t){var i=[];return e&&(i=this.getHeaderFilters()),t&&i.forEach(function(s){typeof s.type=="function"&&(s.type="function")}),i=i.concat(this.filtersToArray(this.filterList,t)),i}filtersToArray(e,t){var i=[];return e.forEach(s=>{var n;Array.isArray(s)?i.push(this.filtersToArray(s,t)):(n={field:s.field,type:s.type,value:s.value},t&&typeof n.type=="function"&&(n.type="function"),i.push(n))}),i}getHeaderFilters(){var e=[];for(var t in this.headerFilters)e.push({field:t,type:this.headerFilters[t].type,value:this.headerFilters[t].value});return e}removeFilter(e,t,i){Array.isArray(e)||(e=[{field:e,type:t,value:i}]),e.forEach(s=>{var n=-1;typeof s.field=="object"?n=this.filterList.findIndex(r=>s===r):n=this.filterList.findIndex(r=>s.field===r.field&&s.type===r.type&&s.value===r.value),n>-1?this.filterList.splice(n,1):console.warn("Filter Error - No matching filter type found, ignoring: ",s.type)}),this.trackChanges()}clearFilter(e){this.filterList=[],e&&this.clearHeaderFilter(),this.trackChanges()}clearHeaderFilter(){this.headerFilters={},this.prevHeaderFilterChangeCheck="{}",this.headerFilterColumns.forEach(e=>{typeof e.modules.filter.value<"u"&&delete e.modules.filter.value,e.modules.filter.prevSuccess=void 0,this.reloadHeaderFilter(e)}),this.trackChanges()}search(e,t,i,s){var n=[],r=[];return Array.isArray(t)||(t=[{field:t,type:i,value:s}]),t.forEach(o=>{o=this.findFilter(o),o&&r.push(o)}),this.table.rowManager.rows.forEach(o=>{var a=!0;r.forEach(h=>{this.filterRecurse(h,o.getData())||(a=!1)}),a&&n.push(e==="data"?o.getData("data"):o.getComponent())}),n}filter(e,t){var i=[],s=[];return this.subscribedExternal("dataFiltering")&&this.dispatchExternal("dataFiltering",this.getFilters(!0)),this.table.options.filterMode!=="remote"&&(this.filterList.length||Object.keys(this.headerFilters).length)?e.forEach(n=>{this.filterRow(n)&&i.push(n)}):i=e.slice(0),this.subscribedExternal("dataFiltered")&&(i.forEach(n=>{s.push(n.getComponent())}),this.dispatchExternal("dataFiltered",this.getFilters(!0),s)),i}filterRow(e,t){var i=!0,s=e.getData();this.filterList.forEach(r=>{this.filterRecurse(r,s)||(i=!1)});for(var n in this.headerFilters)this.headerFilters[n].func(s)||(i=!1);return i}filterRecurse(e,t){var i=!1;return Array.isArray(e)?e.forEach(s=>{this.filterRecurse(s,t)&&(i=!0)}):i=e.func(t),i}};b(O,"moduleName","filter"),b(O,"filters",li);let Ee=O;function hi(l,e,t){return this.emptyToSpace(this.sanitizeHTML(l.getValue()))}function di(l,e,t){return l.getValue()}function ui(l,e,t){return l.getElement().style.whiteSpace="pre-wrap",this.emptyToSpace(this.sanitizeHTML(l.getValue()))}function ci(l,e,t){var i=parseFloat(l.getValue()),s="",n,r,o,a,h,d=e.decimal||".",u=e.thousand||",",c=e.negativeSign||"-",f=e.symbol||"",g=!!e.symbolAfter,p=typeof e.precision<"u"?e.precision:2;if(isNaN(i))return this.emptyToSpace(this.sanitizeHTML(l.getValue()));if(i<0&&(i=Math.abs(i),s=c),n=p!==!1?i.toFixed(p):i,n=String(n).split("."),r=n[0],o=n.length>1?d+n[1]:"",e.thousand!==!1)for(a=/(\d+)(\d{3})/;a.test(r);)r=r.replace(a,"$1"+u+"$2");return h=r+o,s===!0?(h="("+h+")",g?h+f:f+h):g?s+h+f:s+f+h}function fi(l,e,t){var i=l.getValue(),s=e.urlPrefix||"",n=e.download,r=i,o=document.createElement("a"),a;function h(d,u){var c=d.shift(),f=u[c];return d.length&&typeof f=="object"?h(d,f):f}if(e.labelField&&(a=l.getData(),r=h(e.labelField.split(this.table.options.nestedFieldSeparator),a)),e.label)switch(typeof e.label){case"string":r=e.label;break;case"function":r=e.label(l);break}if(r){if(e.urlField&&(a=l.getData(),i=x.retrieveNestedData(this.table.options.nestedFieldSeparator,e.urlField,a)),e.url)switch(typeof e.url){case"string":i=e.url;break;case"function":i=e.url(l);break}return o.setAttribute("href",s+i),e.target&&o.setAttribute("target",e.target),e.download&&(typeof n=="function"?n=n(l):n=n===!0?"":n,o.setAttribute("download",n)),o.innerHTML=this.emptyToSpace(this.sanitizeHTML(r)),o}else return" "}function pi(l,e,t){var i=document.createElement("img"),s=l.getValue();switch(e.urlPrefix&&(s=e.urlPrefix+l.getValue()),e.urlSuffix&&(s=s+e.urlSuffix),i.setAttribute("src",s),typeof e.height){case"number":i.style.height=e.height+"px";break;case"string":i.style.height=e.height;break}switch(typeof e.width){case"number":i.style.width=e.width+"px";break;case"string":i.style.width=e.width;break}return i.addEventListener("load",function(){l.getRow().normalizeHeight()}),i}function mi(l,e,t){var i=l.getValue(),s=l.getElement(),n=e.allowEmpty,r=e.allowTruthy,o=Object.keys(e).includes("trueValue"),a=typeof e.tickElement<"u"?e.tickElement:'',h=typeof e.crossElement<"u"?e.crossElement:'';return o&&i===e.trueValue||!o&&(r&&i||i===!0||i==="true"||i==="True"||i===1||i==="1")?(s.setAttribute("aria-checked",!0),a||""):n&&(i==="null"||i===""||i===null||typeof i>"u")?(s.setAttribute("aria-checked","mixed"),""):(s.setAttribute("aria-checked",!1),h||"")}function gi(l,e,t){var i=window.DateTime||luxon.DateTime,s=e.inputFormat||"yyyy-MM-dd HH:mm:ss",n=e.outputFormat||"dd/MM/yyyy HH:mm:ss",r=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",o=l.getValue();if(typeof i<"u"){var a;return i.isDateTime(o)?a=o:s==="iso"?a=i.fromISO(String(o)):a=i.fromFormat(String(o),s),a.isValid?(e.timezone&&(a=a.setZone(e.timezone)),a.toFormat(n)):r===!0||!o?o:typeof r=="function"?r(o):r}else console.error("Format Error - 'datetime' formatter is dependant on luxon.js")}function bi(l,e,t){var i=window.DateTime||luxon.DateTime,s=e.inputFormat||"yyyy-MM-dd HH:mm:ss",n=typeof e.invalidPlaceholder<"u"?e.invalidPlaceholder:"",r=typeof e.suffix<"u"?e.suffix:!1,o=typeof e.unit<"u"?e.unit:"days",a=typeof e.humanize<"u"?e.humanize:!1,h=typeof e.date<"u"?e.date:i.now(),d=l.getValue();if(typeof i<"u"){var u;return i.isDateTime(d)?u=d:s==="iso"?u=i.fromISO(String(d)):u=i.fromFormat(String(d),s),u.isValid?a?u.diff(h,o).toHuman()+(r?" "+r:""):parseInt(u.diff(h,o)[o])+(r?" "+r:""):n===!0?d:typeof n=="function"?n(d):n}else console.error("Format Error - 'datetimediff' formatter is dependant on luxon.js")}function vi(l,e,t){var i=l.getValue();return typeof e[i]>"u"?(console.warn("Missing display value for "+i),i):e[i]}function wi(l,e,t){var i=l.getValue(),s=l.getElement(),n=e&&e.stars?e.stars:5,r=document.createElement("span"),o=document.createElementNS("http://www.w3.org/2000/svg","svg"),a='',h='';r.style.verticalAlign="middle",o.setAttribute("width","14"),o.setAttribute("height","14"),o.setAttribute("viewBox","0 0 512 512"),o.setAttribute("xml:space","preserve"),o.style.padding="0 1px",i=i&&!isNaN(i)?parseInt(i):0,i=Math.max(0,Math.min(i,n));for(var d=1;d<=n;d++){var u=o.cloneNode(!0);u.innerHTML=d<=i?a:h,r.appendChild(u)}return s.style.whiteSpace="nowrap",s.style.overflow="hidden",s.style.textOverflow="ellipsis",s.setAttribute("aria-label",i),r}function Ci(l,e,t){var i=this.sanitizeHTML(l.getValue())||0,s=document.createElement("span"),n=e&&e.max?e.max:100,r=e&&e.min?e.min:0,o=e&&typeof e.color<"u"?e.color:["red","orange","green"],a="#666666",h,d;if(!(isNaN(i)||typeof l.getValue()>"u")){switch(s.classList.add("tabulator-traffic-light"),d=parseFloat(i)<=n?parseFloat(i):n,d=parseFloat(d)>=r?parseFloat(d):r,h=(n-r)/100,d=Math.round((d-r)/h),typeof o){case"string":a=o;break;case"function":a=o(i);break;case"object":if(Array.isArray(o)){var u=100/o.length,c=Math.floor(d/u);c=Math.min(c,o.length-1),c=Math.max(c,0),a=o[c];break}}return s.style.backgroundColor=a,s}}function Ei(l,e={},t){var i=this.sanitizeHTML(l.getValue())||0,s=l.getElement(),n=e.max?e.max:100,r=e.min?e.min:0,o=e.legendAlign?e.legendAlign:"center",a,h,d,u,c;switch(h=parseFloat(i)<=n?parseFloat(i):n,h=parseFloat(h)>=r?parseFloat(h):r,a=(n-r)/100,h=Math.round((h-r)/a),typeof e.color){case"string":d=e.color;break;case"function":d=e.color(i);break;case"object":if(Array.isArray(e.color)){let v=100/e.color.length,m=Math.floor(h/v);m=Math.min(m,e.color.length-1),m=Math.max(m,0),d=e.color[m];break}default:d="#2DC214"}switch(typeof e.legend){case"string":u=e.legend;break;case"function":u=e.legend(i);break;case"boolean":u=i;break;default:u=!1}switch(typeof e.legendColor){case"string":c=e.legendColor;break;case"function":c=e.legendColor(i);break;case"object":if(Array.isArray(e.legendColor)){let v=100/e.legendColor.length,m=Math.floor(h/v);m=Math.min(m,e.legendColor.length-1),m=Math.max(m,0),c=e.legendColor[m]}break;default:c="#000"}s.style.minWidth="30px",s.style.position="relative",s.setAttribute("aria-label",h);var f=document.createElement("div");f.style.display="inline-block",f.style.width=h+"%",f.style.backgroundColor=d,f.style.height="100%",f.setAttribute("data-max",n),f.setAttribute("data-min",r);var g=document.createElement("div");if(g.style.position="relative",g.style.width="100%",g.style.height="100%",u){var p=document.createElement("div");p.style.position="absolute",p.style.top=0,p.style.left=0,p.style.textAlign=o,p.style.width="100%",p.style.color=c,p.innerHTML=u}return t(function(){if(!(l instanceof $e)){var v=document.createElement("div");v.style.position="absolute",v.style.top="4px",v.style.bottom="4px",v.style.left="4px",v.style.right="4px",s.appendChild(v),s=v}s.appendChild(g),g.appendChild(f),u&&g.appendChild(p)}),""}function yi(l,e,t){return l.getElement().style.backgroundColor=this.sanitizeHTML(l.getValue()),""}function Ri(l,e,t){return''}function xi(l,e,t){return''}function Ti(l,e,t){var i=l.getValue(),s=e.size||15,n=s+"px",r,o,a=e.hasOwnProperty("onValue")?e.onValue:!0,h=e.hasOwnProperty("offValue")?e.offValue:!1,d=e.onTruthy?i:i===a;return r=document.createElement("div"),r.classList.add("tabulator-toggle"),d?(r.classList.add("tabulator-toggle-on"),r.style.flexDirection="row-reverse",e.onColor&&(r.style.background=e.onColor)):e.offColor&&(r.style.background=e.offColor),r.style.width=2.5*s+"px",r.style.borderRadius=n,e.clickable&&r.addEventListener("click",u=>{l.setValue(d?h:a)}),o=document.createElement("div"),o.classList.add("tabulator-toggle-switch"),o.style.height=n,o.style.width=n,o.style.borderRadius=n,r.appendChild(o),r}function ki(l,e,t){var i=document.createElement("span"),s=l.getRow(),n=l.getTable();return s.watchPosition(r=>{e.relativeToPage&&(r+=n.modules.page.getPageSize()*(n.modules.page.getPage()-1)),i.innerText=r}),i}function Mi(l,e,t){return l.getElement().classList.add("tabulator-row-handle"),"
"}var Li={plaintext:hi,html:di,textarea:ui,money:ci,link:fi,image:pi,tickCross:mi,datetime:gi,datetimediff:bi,lookup:vi,star:wi,traffic:Ci,progress:Ei,color:yi,buttonTick:Ri,buttonCross:xi,toggle:Ti,rownum:ki,handle:Mi};const H=class H extends w{constructor(e){super(e),this.registerColumnOption("formatter"),this.registerColumnOption("formatterParams"),this.registerColumnOption("formatterPrint"),this.registerColumnOption("formatterPrintParams"),this.registerColumnOption("formatterClipboard"),this.registerColumnOption("formatterClipboardParams"),this.registerColumnOption("formatterHtmlOutput"),this.registerColumnOption("formatterHtmlOutputParams"),this.registerColumnOption("titleFormatter"),this.registerColumnOption("titleFormatterParams")}initialize(){this.subscribe("cell-format",this.formatValue.bind(this)),this.subscribe("cell-rendered",this.cellRendered.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-format",this.formatHeader.bind(this))}initializeColumn(e){e.modules.format=this.lookupFormatter(e,""),typeof e.definition.formatterPrint<"u"&&(e.modules.format.print=this.lookupFormatter(e,"Print")),typeof e.definition.formatterClipboard<"u"&&(e.modules.format.clipboard=this.lookupFormatter(e,"Clipboard")),typeof e.definition.formatterHtmlOutput<"u"&&(e.modules.format.htmlOutput=this.lookupFormatter(e,"HtmlOutput"))}lookupFormatter(e,t){var i={params:e.definition["formatter"+t+"Params"]||{}},s=e.definition["formatter"+t];switch(typeof s){case"string":H.formatters[s]?i.formatter=H.formatters[s]:(console.warn("Formatter Error - No such formatter found: ",s),i.formatter=H.formatters.plaintext);break;case"function":i.formatter=s;break;default:i.formatter=H.formatters.plaintext;break}return i}cellRendered(e){e.modules.format&&e.modules.format.renderedCallback&&!e.modules.format.rendered&&(e.modules.format.renderedCallback(),e.modules.format.rendered=!0)}formatHeader(e,t,i){var s,n,r,o;return e.definition.titleFormatter?(s=this.getFormatter(e.definition.titleFormatter),r=a=>{e.titleFormatterRendered=a},o={getValue:function(){return t},getElement:function(){return i},getType:function(){return"header"},getColumn:function(){return e.getComponent()},getTable:()=>this.table},n=e.definition.titleFormatterParams||{},n=typeof n=="function"?n():n,s.call(this,o,n,r)):t}formatValue(e){var t=e.getComponent(),i=typeof e.column.modules.format.params=="function"?e.column.modules.format.params(t):e.column.modules.format.params;function s(n){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=n,e.modules.format.rendered=!1}return e.column.modules.format.formatter.call(this,t,i,s)}formatExportValue(e,t){var i=e.column.modules.format[t],s;if(i){let n=function(r){e.modules.format||(e.modules.format={}),e.modules.format.renderedCallback=r,e.modules.format.rendered=!1};return s=typeof i.params=="function"?i.params(e.getComponent()):i.params,i.formatter.call(this,e.getComponent(),s,n)}else return this.formatValue(e)}sanitizeHTML(e){if(e){var t={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/","`":"`","=":"="};return String(e).replace(/[&<>"'`=/]/g,function(i){return t[i]})}else return e}emptyToSpace(e){return e===null||typeof e>"u"||e===""?" ":e}getFormatter(e){switch(typeof e){case"string":H.formatters[e]?e=H.formatters[e]:(console.warn("Formatter Error - No such formatter found: ",e),e=H.formatters.plaintext);break;case"function":break;default:e=H.formatters.plaintext;break}return e}};b(H,"moduleName","format"),b(H,"formatters",Li);let ye=H;class tt extends w{constructor(e){super(e),this.leftColumns=[],this.rightColumns=[],this.initializationMode="left",this.active=!1,this.blocked=!0,this.registerColumnOption("frozen")}reset(){this.initializationMode="left",this.leftColumns=[],this.rightColumns=[],this.active=!1}initialize(){this.subscribe("cell-layout",this.layoutCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-width",this.layout.bind(this)),this.subscribe("row-layout-after",this.layoutRow.bind(this)),this.subscribe("table-layout",this.layout.bind(this)),this.subscribe("columns-loading",this.reset.bind(this)),this.subscribe("column-add",this.reinitializeColumns.bind(this)),this.subscribe("column-deleted",this.reinitializeColumns.bind(this)),this.subscribe("column-hide",this.reinitializeColumns.bind(this)),this.subscribe("column-show",this.reinitializeColumns.bind(this)),this.subscribe("columns-loaded",this.reinitializeColumns.bind(this)),this.subscribe("table-redraw",this.layout.bind(this)),this.subscribe("layout-refreshing",this.blockLayout.bind(this)),this.subscribe("layout-refreshed",this.unblockLayout.bind(this)),this.subscribe("scrollbar-vertical",this.adjustForScrollbar.bind(this))}blockLayout(){this.blocked=!0}unblockLayout(){this.blocked=!1}layoutCell(e){this.layoutElement(e.element,e.column)}reinitializeColumns(){this.reset(),this.table.columnManager.columnsByIndex.forEach(e=>{this.initializeColumn(e)}),this.layout()}initializeColumn(e){var t={margin:0,edge:!1};e.isGroup||(this.frozenCheck(e)?(t.position=this.initializationMode,this.initializationMode=="left"?this.leftColumns.push(e):this.rightColumns.unshift(e),this.active=!0,e.modules.frozen=t):this.initializationMode="right")}frozenCheck(e){return e.parent.isGroup&&e.definition.frozen&&console.warn("Frozen Column Error - Parent column group must be frozen, not individual columns or sub column groups"),e.parent.isGroup?this.frozenCheck(e.parent):e.definition.frozen}layoutCalcRows(){this.table.modExists("columnCalcs")&&(this.table.modules.columnCalcs.topInitialized&&this.table.modules.columnCalcs.topRow&&this.layoutRow(this.table.modules.columnCalcs.topRow),this.table.modules.columnCalcs.botInitialized&&this.table.modules.columnCalcs.botRow&&this.layoutRow(this.table.modules.columnCalcs.botRow),this.table.modExists("groupRows")&&this.layoutGroupCalcs(this.table.modules.groupRows.getGroups()))}layoutGroupCalcs(e){e.forEach(t=>{t.calcs.top&&this.layoutRow(t.calcs.top),t.calcs.bottom&&this.layoutRow(t.calcs.bottom),t.groupList&&t.groupList.length&&this.layoutGroupCalcs(t.groupList)})}layoutColumnPosition(e){var t=[],i=0,s=0;this.leftColumns.forEach((n,r)=>{if(n.modules.frozen.marginValue=i,n.modules.frozen.margin=n.modules.frozen.marginValue+"px",n.visible&&(i+=n.getWidth()),r==this.leftColumns.length-1?n.modules.frozen.edge=!0:n.modules.frozen.edge=!1,n.parent.isGroup){var o=this.getColGroupParentElement(n);t.includes(o)||(this.layoutElement(o,n),t.push(o)),o.classList.toggle("tabulator-frozen-left",n.modules.frozen.edge&&n.modules.frozen.position==="left"),o.classList.toggle("tabulator-frozen-right",n.modules.frozen.edge&&n.modules.frozen.position==="right")}else this.layoutElement(n.getElement(),n);e&&n.cells.forEach(a=>{this.layoutElement(a.getElement(!0),n)})}),this.rightColumns.forEach((n,r)=>{n.modules.frozen.marginValue=s,n.modules.frozen.margin=n.modules.frozen.marginValue+"px",n.visible&&(s+=n.getWidth()),r==this.rightColumns.length-1?n.modules.frozen.edge=!0:n.modules.frozen.edge=!1,n.parent.isGroup?this.layoutElement(this.getColGroupParentElement(n),n):this.layoutElement(n.getElement(),n),e&&n.cells.forEach(o=>{this.layoutElement(o.getElement(!0),n)})})}getColGroupParentElement(e){return e.parent.isGroup?this.getColGroupParentElement(e.parent):e.getElement()}layout(){this.active&&!this.blocked&&(this.layoutColumnPosition(),this.reinitializeRows(),this.layoutCalcRows())}reinitializeRows(){var e=this.table.rowManager.getVisibleRows(!0),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));t.forEach(i=>{i.deinitialize()}),e.forEach(i=>{i.type==="row"&&this.layoutRow(i)})}layoutRow(e){this.table.options.layout==="fitDataFill"&&this.rightColumns.length&&(this.table.rowManager.getTableElement().style.minWidth="calc(100% - "+this.rightMargin+")"),this.leftColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)}),this.rightColumns.forEach(t=>{var i=e.getCell(t);i&&this.layoutElement(i.getElement(!0),t)})}layoutElement(e,t){var i;t.modules.frozen&&e&&(e.style.position="sticky",this.table.rtl?i=t.modules.frozen.position==="left"?"right":"left":i=t.modules.frozen.position,e.style[i]=t.modules.frozen.margin,e.classList.add("tabulator-frozen"),e.classList.toggle("tabulator-frozen-left",t.modules.frozen.edge&&t.modules.frozen.position==="left"),e.classList.toggle("tabulator-frozen-right",t.modules.frozen.edge&&t.modules.frozen.position==="right"))}adjustForScrollbar(e){this.rightColumns.length&&(this.table.columnManager.getContentsElement().style.width="calc(100% - "+e+"px)")}getFrozenColumns(){return this.leftColumns.concat(this.rightColumns)}_calcSpace(e,t){var i=0;for(let s=0;s{this.initializeRow(e)})}initializeRow(e){var t=this.table.options.frozenRows,i=typeof t;i==="number"?e.getPosition()&&e.getPosition()+this.rows.length<=t&&this.freezeRow(e):i==="function"?t.call(this.table,e.getComponent())&&this.freezeRow(e):Array.isArray(t)&&t.includes(e.data[this.options("frozenRowsField")])&&this.freezeRow(e)}isRowFrozen(e){var t=this.rows.indexOf(e);return t>-1}isFrozen(){return!!this.rows.length}visibleRows(e,t){return this.rows.forEach(i=>{t.push(i)}),t}getRows(e){var t=e.slice(0);return this.rows.forEach(function(i){var s=t.indexOf(i);s>-1&&t.splice(s,1)}),t}freezeRow(e){e.modules.frozen?console.warn("Freeze Error - Row is already frozen"):(e.modules.frozen=!0,this.topElement.appendChild(e.getElement()),e.initialize(),e.normalizeHeight(),this.rows.push(e),this.refreshData(!1,"display"),this.table.rowManager.adjustTableSize(),this.styleRows())}unfreezeRow(e){e.modules.frozen?(e.modules.frozen=!1,this.detachRow(e),this.table.rowManager.adjustTableSize(),this.refreshData(!1,"display"),this.rows.length&&this.styleRows()):console.warn("Freeze Error - Row is already unfrozen")}detachRow(e){var t=this.rows.indexOf(e);if(t>-1){var i=e.getElement();i.parentNode&&i.parentNode.removeChild(i),this.rows.splice(t,1)}}styleRows(e){this.rows.forEach((t,i)=>{this.table.rowManager.styleRow(t,i)})}}b(it,"moduleName","frozenRows");class Si{constructor(e){return this._group=e,this.type="GroupComponent",new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._group.groupManager.table.componentFunctionBinder.handle("group",t._group,i)}})}getKey(){return this._group.key}getField(){return this._group.field}getElement(){return this._group.element}getRows(){return this._group.getRows(!0)}getSubGroups(){return this._group.getSubGroups(!0)}getParentGroup(){return this._group.parent?this._group.parent.getComponent():!1}isVisible(){return this._group.visible}show(){this._group.show()}hide(){this._group.hide()}toggle(){this._group.toggleVisibility()}scrollTo(e,t){return this._group.groupManager.table.rowManager.scrollToRow(this._group,e,t)}_getSelf(){return this._group}getTable(){return this._group.groupManager.table}}class J{constructor(e,t,i,s,n,r,o){this.groupManager=e,this.parent=t,this.key=s,this.level=i,this.field=n,this.hasSubGroups=i{t.modules&&delete t.modules.group})),this.element=!1,this.arrowElement=!1,this.elementContents=!1}createElements(){var e=document.createElement("div");e.classList.add("tabulator-arrow"),this.element=document.createElement("div"),this.element.classList.add("tabulator-row"),this.element.classList.add("tabulator-group"),this.element.classList.add("tabulator-group-level-"+this.level),this.element.setAttribute("role","rowgroup"),this.arrowElement=document.createElement("div"),this.arrowElement.classList.add("tabulator-group-toggle"),this.arrowElement.appendChild(e),this.groupManager.table.options.movableRows!==!1&&this.groupManager.table.modExists("moveRow")&&this.groupManager.table.modules.moveRow.initializeGroupHeader(this)}createValueGroups(){var e=this.level+1;this.groupManager.allowedValues&&this.groupManager.allowedValues[e]&&this.groupManager.allowedValues[e].forEach(t=>{this._createGroup(t,e)})}addBindings(){var e;this.groupManager.table.options.groupToggleElement&&(e=this.groupManager.table.options.groupToggleElement=="arrow"?this.arrowElement:this.element,e.addEventListener("click",t=>{this.groupManager.table.options.groupToggleElement==="arrow"&&(t.stopPropagation(),t.stopImmediatePropagation()),setTimeout(()=>{this.toggleVisibility()})}))}_createGroup(e,t){var i=t+"_"+e,s=new J(this.groupManager,this,t,e,this.groupManager.groupIDLookups[t].field,this.groupManager.headerGenerator[t]||this.groupManager.headerGenerator[0],this.old?this.old.groups[i]:!1);this.groups[i]=s,this.groupList.push(s)}_addRowToGroup(e){var t=this.level+1;if(this.hasSubGroups){var i=this.groupManager.groupIDLookups[t].func(e.getData()),s=t+"_"+i;this.groupManager.allowedValues&&this.groupManager.allowedValues[t]?this.groups[s]&&this.groups[s].addRow(e):(this.groups[s]||this._createGroup(i,t),this.groups[s].addRow(e))}}_addRow(e){this.rows.push(e),e.modules.group=this}insertRow(e,t,i){var s=this.conformRowData({});e.updateData(s);var n=this.rows.indexOf(t);n>-1?i?this.rows.splice(n+1,0,e):this.rows.splice(n,0,e):i?this.rows.push(e):this.rows.unshift(e),e.modules.group=this,this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this),this.groupManager.updateGroupRows(!0)}scrollHeader(e){this.arrowElement&&(this.arrowElement.style.marginLeft=e,this.groupList.forEach(function(t){t.scrollHeader(e)}))}getRowIndex(e){}conformRowData(e){return this.field?e[this.field]=this.key:console.warn("Data Conforming Error - Cannot conform row data to match new group as groupBy is a function"),this.parent&&(e=this.parent.conformRowData(e)),e}removeRow(e){var t=this.rows.indexOf(e),i=e.getElement();t>-1&&this.rows.splice(t,1),!this.groupManager.table.options.groupValues&&!this.rows.length?(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this),this.groupManager.updateGroupRows(!0)):(i.parentNode&&i.parentNode.removeChild(i),this.groupManager.blockRedraw||(this.generateGroupHeaderContents(),this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modules.columnCalcs.recalcGroup(this)))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1),this.groupList.length||(this.parent?this.parent.removeGroup(this):this.groupManager.removeGroup(this)))}getHeadersAndRows(){var e=[];return e.push(this),this._visSet(),this.calcs.top&&(this.calcs.top.detachElement(),this.calcs.top.deleteCells()),this.calcs.bottom&&(this.calcs.bottom.detachElement(),this.calcs.bottom.deleteCells()),this.visible?this.groupList.length?this.groupList.forEach(function(t){e=e.concat(t.getHeadersAndRows())}):(this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),e=e.concat(this.rows),this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))):!this.groupList.length&&this.groupManager.table.options.columnCalcs!="table"&&this.groupManager.table.modExists("columnCalcs")&&(this.groupManager.table.modules.columnCalcs.hasTopCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.top=this.groupManager.table.modules.columnCalcs.generateTopRow(this.rows),e.push(this.calcs.top)),this.groupManager.table.modules.columnCalcs.hasBottomCalcs()&&this.groupManager.table.options.groupClosedShowCalcs&&(this.calcs.bottom=this.groupManager.table.modules.columnCalcs.generateBottomRow(this.rows),e.push(this.calcs.bottom))),e}getData(e,t){var i=[];return this._visSet(),(!e||e&&this.visible)&&this.rows.forEach(s=>{i.push(s.getData(t||"data"))}),i}getRowCount(){var e=0;return this.groupList.length?this.groupList.forEach(t=>{e+=t.getRowCount()}):e=this.rows.length,e}toggleVisibility(){this.visible?this.hide():this.show()}hide(){this.visible=!1,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination?(this.element.classList.remove("tabulator-group-visible"),this.groupList.length?this.groupList.forEach(e=>{var t=e.getHeadersAndRows();t.forEach(i=>{i.detachElement()})}):this.rows.forEach(e=>{var t=e.getElement();t.parentNode.removeChild(t)}),this.groupManager.updateGroupRows(!0)):this.groupManager.updateGroupRows(!0),this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!1)}show(){if(this.visible=!0,this.groupManager.table.rowManager.getRenderMode()=="basic"&&!this.groupManager.table.options.pagination){this.element.classList.add("tabulator-group-visible");var e=this.generateElement();this.groupList.length?this.groupList.forEach(t=>{var i=t.getHeadersAndRows();i.forEach(s=>{var n=s.getElement();e.parentNode.insertBefore(n,e.nextSibling),s.initialize(),e=n})}):this.rows.forEach(t=>{var i=t.getElement();e.parentNode.insertBefore(i,e.nextSibling),t.initialize(),e=i}),this.groupManager.updateGroupRows(!0)}else this.groupManager.updateGroupRows(!0);this.groupManager.table.externalEvents.dispatch("groupVisibilityChanged",this.getComponent(),!0)}_visSet(){var e=[];typeof this.visible=="function"&&(this.rows.forEach(function(t){e.push(t.getData())}),this.visible=this.visible(this.key,this.getRowCount(),e,this.getComponent()))}getRowGroup(e){var t=!1;return this.groupList.length?this.groupList.forEach(function(i){var s=i.getRowGroup(e);s&&(t=s)}):this.rows.find(function(i){return i===e})&&(t=this),t}getSubGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getRows(e,t){var i=[];return t&&this.groupList.length?this.groupList.forEach(s=>{i=i.concat(s.getRows(e,t))}):this.rows.forEach(function(s){i.push(e?s.getComponent():s)}),i}generateGroupHeaderContents(){var e=[],t=this.getRows(!1,!0);for(t.forEach(function(i){e.push(i.getData())}),this.elementContents=this.generator(this.key,this.getRowCount(),e,this.getComponent());this.element.firstChild;)this.element.removeChild(this.element.firstChild);typeof this.elementContents=="string"?this.element.innerHTML=this.elementContents:this.element.appendChild(this.elementContents),this.element.insertBefore(this.arrowElement,this.element.firstChild)}getPath(e=[]){return e.unshift(this.key),this.parent&&this.parent.getPath(e),e}getElement(){return this.elementContents?this.element:this.generateElement()}generateElement(){this.addBindings=!1,this._visSet(),this.visible?this.element.classList.add("tabulator-group-visible"):this.element.classList.remove("tabulator-group-visible");for(var e=0;ei.length&&console.warn("Error creating group headers, groupHeader array is shorter than groupBy array"),this.headerGenerator=[function(){return""}],this.startOpen=[function(){return!1}],this.langBind("groups|item",(n,r)=>{this.headerGenerator[0]=(o,a,h)=>(typeof o>"u"?"":o)+"("+a+" "+(a===1?n:r.groups.items)+")"}),this.groupIDLookups=[],e)this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="table"&&this.table.options.columnCalcs!="both"&&this.table.modules.columnCalcs.removeCalcs();else if(this.table.modExists("columnCalcs")&&this.table.options.columnCalcs!="group"){var s=this.table.columnManager.getRealColumns();s.forEach(n=>{n.definition.topCalc&&this.table.modules.columnCalcs.initializeTopRow(),n.definition.bottomCalc&&this.table.modules.columnCalcs.initializeBottomRow()})}Array.isArray(e)||(e=[e]),e.forEach((n,r)=>{var o,a;typeof n=="function"?o=n:(a=this.table.columnManager.getColumnByField(n),a?o=function(h){return a.getFieldValue(h)}:o=function(h){return h[n]}),this.groupIDLookups.push({field:typeof n=="function"?!1:n,func:o,values:this.allowedValues?this.allowedValues[r]:!1})}),t&&(Array.isArray(t)||(t=[t]),t.forEach(n=>{}),this.startOpen=t),i&&(this.headerGenerator=Array.isArray(i)?i:[i])}else this.groupList=[],this.groups={}}rowSample(e,t){if(this.table.options.groupBy){var i=this.getGroups(!1)[0];t.push(i.getRows(!1)[0])}return t}virtualRenderFill(){var e=this.table.rowManager.tableElement,t=this.table.rowManager.getVisibleRows();if(this.table.options.groupBy)t=t.filter(i=>i.type!=="group"),e.style.minWidth=t.length?"":this.table.columnManager.getWidth()+"px";else return t}rowAddingIndex(e,t,i){if(this.table.options.groupBy){this.assignRowToGroup(e);var s=e.modules.group.rows;return s.length>1&&(!t||t&&s.indexOf(t)==-1?i?s[0]!==e&&(t=s[0],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):s[s.length-1]!==e&&(t=s[s.length-1],this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)):this.table.rowManager.moveRowInArray(e.modules.group.rows,e,t,!i)),t}}trackChanges(){this.dispatch("group-changed")}setGroupBy(e){this.table.options.groupBy=e,this.initialized||this.initialize(),this.configureGroupSetup(),!e&&this.table.modExists("columnCalcs")&&this.table.options.columnCalcs===!0&&this.table.modules.columnCalcs.reinitializeCalcs(),this.refreshData(),this.trackChanges()}setGroupValues(e){this.table.options.groupValues=e,this.configureGroupSetup(),this.refreshData(),this.trackChanges()}setGroupStartOpen(e){this.table.options.groupStartOpen=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}setGroupHeader(e){this.table.options.groupHeader=e,this.configureGroupSetup(),this.table.options.groupBy?(this.refreshData(),this.trackChanges()):console.warn("Grouping Update - cant refresh view, no groups have been set")}userGetGroups(e){return this.getGroups(!0)}userGetGroupedData(){return this.table.options.groupBy?this.getGroupedData():this.getData()}rowGetGroup(e){return e.modules.group?e.modules.group.getComponent():!1}rowMoving(e,t,i){if(this.table.options.groupBy){!i&&t instanceof J&&(t=this.table.rowManager.prevDisplayRow(e)||t);var s=t instanceof J?t:t.modules.group,n=e instanceof J?e:e.modules.group;s===n?this.table.rowManager.moveRowInArray(s.rows,e,t,i):(n&&n.removeRow(e),s.insertRow(e,t,i))}}rowDeleting(e){this.table.options.groupBy&&e.modules.group&&e.modules.group.removeRow(e)}rowsUpdated(e){this.table.options.groupBy&&this.updateGroupRows(!0)}cellUpdated(e){this.table.options.groupBy&&this.reassignRowToGroup(e.row)}getRows(e){return this.table.options.groupBy&&this.groupIDLookups.length?(this.dispatchExternal("dataGrouping"),this.generateGroups(e),this.subscribedExternal("dataGrouped")&&this.dispatchExternal("dataGrouped",this.getGroups(!0)),this.updateGroupRows()):e.slice(0)}getGroups(e){var t=[];return this.groupList.forEach(function(i){t.push(e?i.getComponent():i)}),t}getChildGroups(e){var t=[];return e||(e=this),e.groupList.forEach(i=>{i.groupList.length?t=t.concat(this.getChildGroups(i)):t.push(i)}),t}wipe(){this.table.options.groupBy&&(this.groupList.forEach(function(e){e.wipe()}),this.groupList=[],this.groups={})}pullGroupListData(e){var t=[];return e.forEach(i=>{var s={};s.level=0,s.rowCount=0,s.headerContent="";var n=[];i.hasSubGroups?(n=this.pullGroupListData(i.groupList),s.level=i.level,s.rowCount=n.length-i.groupList.length,s.headerContent=i.generator(i.key,s.rowCount,i.rows,i),t.push(s),t=t.concat(n)):(s.level=i.level,s.headerContent=i.generator(i.key,i.rows.length,i.rows,i),s.rowCount=i.getRows().length,t.push(s),i.getRows().forEach(r=>{t.push(r.getData("data"))}))}),t}getGroupedData(){return this.pullGroupListData(this.groupList)}getRowGroup(e){var t=!1;return this.options("dataTree")&&(e=this.table.modules.dataTree.getTreeParentRoot(e)),this.groupList.forEach(i=>{var s=i.getRowGroup(e);s&&(t=s)}),t}countGroups(){return this.groupList.length}generateGroups(e){var t=this.groups;this.groups={},this.groupList=[],this.allowedValues&&this.allowedValues[0]?(this.allowedValues[0].forEach(i=>{this.createGroup(i,0,t)}),e.forEach(i=>{this.assignRowToExistingGroup(i,t)})):e.forEach(i=>{this.assignRowToGroup(i,t)}),Object.values(t).forEach(i=>{i.wipe(!0)})}createGroup(e,t,i){var s=t+"_"+e,n;i=i||[],n=new J(this,!1,t,e,this.groupIDLookups[0].field,this.headerGenerator[0],i[s]),this.groups[s]=n,this.groupList.push(n)}assignRowToExistingGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),s="0_"+i;this.groups[s]&&this.groups[s].addRow(e)}assignRowToGroup(e,t){var i=this.groupIDLookups[0].func(e.getData()),s=!this.groups["0_"+i];return s&&this.createGroup(i,0,t),this.groups["0_"+i].addRow(e),!s}reassignRowToGroup(e){if(e.type==="row"){var t=e.modules.group,i=t.getPath(),s=this.getExpectedPath(e),n;n=i.length==s.length&&i.every((r,o)=>r===s[o]),n||(t.removeRow(e),this.assignRowToGroup(e,this.groups),this.refreshData(!0))}}getExpectedPath(e){var t=[],i=e.getData();return this.groupIDLookups.forEach(s=>{t.push(s.func(i))}),t}updateGroupRows(e){var t=[];return this.blockRedraw||(this.groupList.forEach(i=>{t=t.concat(i.getHeadersAndRows())}),e&&this.refreshData(!0)),t}scrollHeaders(e){this.table.options.groupBy&&(this.table.options.renderHorizontal==="virtual"&&(e-=this.table.columnManager.renderer.vDomPadLeft),e=e+"px",this.groupList.forEach(t=>{t.scrollHeader(e)}))}removeGroup(e){var t=e.level+"_"+e.key,i;this.groups[t]&&(delete this.groups[t],i=this.groupList.indexOf(e),i>-1&&this.groupList.splice(i,1))}checkBasicModeGroupHeaderWidth(){var e=this.table.rowManager.tableElement,t=!0;this.table.rowManager.getDisplayRows().forEach((i,s)=>{this.table.rowManager.styleRow(i,s),e.appendChild(i.getElement()),i.initialize(!0),i.type!=="group"&&(t=!1)}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}}b(st,"moduleName","groupRows");var Di={cellEdit:function(l){l.component.setValueProcessData(l.data.oldValue),l.component.cellRendered()},rowAdd:function(l){l.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowDelete:function(l){var e=this.table.rowManager.addRowActual(l.data.data,l.data.pos,l.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(l.component,e),this.table.rowManager.checkPlaceholder()},rowMove:function(l){var e=l.data.posFrom-l.data.posTo>0;this.table.rowManager.moveRowActual(l.component,this.table.rowManager.getRowFromPosition(l.data.posFrom),e),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},zi={cellEdit:function(l){l.component.setValueProcessData(l.data.newValue),l.component.cellRendered()},rowAdd:function(l){var e=this.table.rowManager.addRowActual(l.data.data,l.data.pos,l.data.index);this.table.options.groupBy&&this.table.modExists("groupRows")&&this.table.modules.groupRows.updateGroupRows(!0),this._rebindRow(l.component,e),this.table.rowManager.checkPlaceholder()},rowDelete:function(l){l.component.deleteActual(),this.table.rowManager.checkPlaceholder()},rowMove:function(l){this.table.rowManager.moveRowActual(l.component,this.table.rowManager.getRowFromPosition(l.data.posTo),l.data.after),this.table.rowManager.regenerateRowPositions(),this.table.rowManager.reRenderInPosition()}},Hi={undo:["ctrl + 90","meta + 90"],redo:["ctrl + 89","meta + 89"]},Fi={undo:function(l){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(l.preventDefault(),this.table.modules.history.undo()))},redo:function(l){var e=!1;this.table.options.history&&this.table.modExists("history")&&this.table.modExists("edit")&&(e=this.table.modules.edit.currentCell,e||(l.preventDefault(),this.table.modules.history.redo()))}},Pi={keybindings:{bindings:Hi,actions:Fi}};const I=class I extends w{constructor(e){super(e),this.history=[],this.index=-1,this.registerTableOption("history",!1)}initialize(){this.table.options.history&&(this.subscribe("cell-value-updated",this.cellUpdated.bind(this)),this.subscribe("cell-delete",this.clearComponentHistory.bind(this)),this.subscribe("row-delete",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clear.bind(this)),this.subscribe("row-added",this.rowAdded.bind(this)),this.subscribe("row-move",this.rowMoved.bind(this))),this.registerTableFunction("undo",this.undo.bind(this)),this.registerTableFunction("redo",this.redo.bind(this)),this.registerTableFunction("getHistoryUndoSize",this.getHistoryUndoSize.bind(this)),this.registerTableFunction("getHistoryRedoSize",this.getHistoryRedoSize.bind(this)),this.registerTableFunction("clearHistory",this.clear.bind(this))}rowMoved(e,t,i){this.action("rowMove",e,{posFrom:e.getPosition(),posTo:t.getPosition(),to:t,after:i})}rowAdded(e,t,i,s){this.action("rowAdd",e,{data:t,pos:i,index:s})}rowDeleted(e){var t,i;this.table.options.groupBy?(i=e.getComponent().getGroup()._getSelf().rows,t=i.indexOf(e),t&&(t=i[t-1])):(t=e.table.rowManager.getRowIndex(e),t&&(t=e.table.rowManager.rows[t-1])),this.action("rowDelete",e,{data:e.getData(),pos:!t,index:t})}cellUpdated(e){this.action("cellEdit",e,{oldValue:e.oldValue,newValue:e.value})}clear(){this.history=[],this.index=-1}action(e,t,i){this.history=this.history.slice(0,this.index+1),this.history.push({type:e,component:t,data:i}),this.index++}getHistoryUndoSize(){return this.index+1}getHistoryRedoSize(){return this.history.length-(this.index+1)}clearComponentHistory(e){var t=this.history.findIndex(function(i){return i.component===e});t>-1&&(this.history.splice(t,1),t<=this.index&&this.index--,this.clearComponentHistory(e))}undo(){if(this.index>-1){let e=this.history[this.index];return I.undoers[e.type].call(this,e),this.index--,this.dispatchExternal("historyUndo",e.type,e.component.getComponent(),e.data),!0}else return console.warn(this.options("history")?"History Undo Error - No more history to undo":"History module not enabled"),!1}redo(){if(this.history.length-1>this.index){this.index++;let e=this.history[this.index];return I.redoers[e.type].call(this,e),this.dispatchExternal("historyRedo",e.type,e.component.getComponent(),e.data),!0}else return console.warn(this.options("history")?"History Redo Error - No more history to redo":"History module not enabled"),!1}_rebindRow(e,t){this.history.forEach(function(i){if(i.component instanceof S)i.component===e&&(i.component=t);else if(i.component instanceof ne&&i.component.row===e){var s=i.component.column.getField();s&&(i.component=t.getCell(s))}})}};b(I,"moduleName","history"),b(I,"moduleExtensions",Pi),b(I,"undoers",Di),b(I,"redoers",zi);let Re=I;class nt extends w{constructor(e){super(e),this.fieldIndex=[],this.hasIndex=!1}initialize(){this.tableElementCheck()}tableElementCheck(){this.table.originalElement&&this.table.originalElement.tagName==="TABLE"&&(this.table.originalElement.childNodes.length?this.parseTable():console.warn("Unable to parse data from empty table tag, Tabulator should be initialized on a div tag unless importing data from a table element."))}parseTable(){var e=this.table.originalElement,t=this.table.options,i=e.getElementsByTagName("th"),s=e.getElementsByTagName("tbody")[0],n=[];this.hasIndex=!1,this.dispatchExternal("htmlImporting"),s=s?s.getElementsByTagName("tr"):[],this._extractOptions(e,t),i.length?this._extractHeaders(i,s):this._generateBlankHeaders(i,s);for(var r=0;r{r[d.toLowerCase()]=d});for(var o in s){var a=s[o],h;a&&typeof a=="object"&&a.name&&a.name.indexOf("tabulator-")===0&&(h=a.name.replace("tabulator-",""),typeof r[h]<"u"&&(t[r[h]]=this._attribValue(a.value)))}}_attribValue(e){return e==="true"?!0:e==="false"?!1:e}_findCol(e){var t=this.table.options.columns.find(i=>i.title===e);return t||!1}_extractHeaders(e,t){for(var i=0;i(console.error("Import Error:",r||"Unable to import data"),Promise.reject(r)))}lookupImporter(e){var t;return e||(e=this.table.options.importFormat),typeof e=="string"?t=ee.importers[e]:t=e,t||console.error("Import Error - Importer not found:",e),t}importFromFile(e,t,i){var s=this.lookupImporter(e);if(s)return this.pickFile(t,i).then(this.importData.bind(this,s)).then(this.structureData.bind(this)).then(this.setData.bind(this)).catch(n=>(this.dispatch("import-error",n),this.dispatchExternal("importError",n),console.error("Import Error:",n||"Unable to import file"),Promise.reject(n)))}pickFile(e,t){return new Promise((i,s)=>{var n=document.createElement("input");n.type="file",n.accept=e,n.addEventListener("change",r=>{var o=n.files[0],a=new FileReader;switch(this.dispatch("import-importing",n.files),this.dispatchExternal("importImporting",n.files),t||this.table.options.importReader){case"buffer":a.readAsArrayBuffer(o);break;case"binary":a.readAsBinaryString(o);break;case"url":a.readAsDataURL(o);break;case"text":default:a.readAsText(o)}a.onload=h=>{i(a.result)},a.onerror=h=>{console.warn("File Load Error - Unable to read file"),s()}}),this.dispatch("import-choose"),this.dispatchExternal("importChoose"),n.click()})}importData(e,t){var i=e.call(this.table,t);return i instanceof Promise?i:i?Promise.resolve(i):Promise.reject()}structureData(e){var t=[];return Array.isArray(e)&&e.length&&Array.isArray(e[0])?(this.table.options.autoColumns?t=this.structureArrayToObject(e):t=this.structureArrayToColumns(e),t):e}structureArrayToObject(e){var t=e.shift(),i=e.map(s=>{var n={};return t.forEach((r,o)=>{n[r]=s[o]}),n});return i}structureArrayToColumns(e){var t=[],i=this.table.getColumns();return i[0]&&e[0][0]&&i[0].getDefinition().title===e[0][0]&&e.shift(),e.forEach(s=>{var n={};s.forEach((r,o)=>{var a=i[o];a&&(n[a.getField()]=r)}),t.push(n)}),t}setData(e){return this.dispatch("import-imported",e),this.dispatchExternal("importImported",e),this.table.setData(e)}};b(ee,"moduleName","import"),b(ee,"importers",Vi);let xe=ee;class rt extends w{constructor(e){super(e),this.eventMap={rowClick:"row-click",rowDblClick:"row-dblclick",rowContext:"row-contextmenu",rowMouseEnter:"row-mouseenter",rowMouseLeave:"row-mouseleave",rowMouseOver:"row-mouseover",rowMouseOut:"row-mouseout",rowMouseMove:"row-mousemove",rowMouseDown:"row-mousedown",rowMouseUp:"row-mouseup",rowTap:"row",rowDblTap:"row",rowTapHold:"row",cellClick:"cell-click",cellDblClick:"cell-dblclick",cellContext:"cell-contextmenu",cellMouseEnter:"cell-mouseenter",cellMouseLeave:"cell-mouseleave",cellMouseOver:"cell-mouseover",cellMouseOut:"cell-mouseout",cellMouseMove:"cell-mousemove",cellMouseDown:"cell-mousedown",cellMouseUp:"cell-mouseup",cellTap:"cell",cellDblTap:"cell",cellTapHold:"cell",headerClick:"column-click",headerDblClick:"column-dblclick",headerContext:"column-contextmenu",headerMouseEnter:"column-mouseenter",headerMouseLeave:"column-mouseleave",headerMouseOver:"column-mouseover",headerMouseOut:"column-mouseout",headerMouseMove:"column-mousemove",headerMouseDown:"column-mousedown",headerMouseUp:"column-mouseup",headerTap:"column",headerDblTap:"column",headerTapHold:"column",groupClick:"group-click",groupDblClick:"group-dblclick",groupContext:"group-contextmenu",groupMouseEnter:"group-mouseenter",groupMouseLeave:"group-mouseleave",groupMouseOver:"group-mouseover",groupMouseOut:"group-mouseout",groupMouseMove:"group-mousemove",groupMouseDown:"group-mousedown",groupMouseUp:"group-mouseup",groupTap:"group",groupDblTap:"group",groupTapHold:"group"},this.subscribers={},this.touchSubscribers={},this.columnSubscribers={},this.touchWatchers={row:{tap:null,tapDbl:null,tapHold:null},cell:{tap:null,tapDbl:null,tapHold:null},column:{tap:null,tapDbl:null,tapHold:null},group:{tap:null,tapDbl:null,tapHold:null}},this.registerColumnOption("headerClick"),this.registerColumnOption("headerDblClick"),this.registerColumnOption("headerContext"),this.registerColumnOption("headerMouseEnter"),this.registerColumnOption("headerMouseLeave"),this.registerColumnOption("headerMouseOver"),this.registerColumnOption("headerMouseOut"),this.registerColumnOption("headerMouseMove"),this.registerColumnOption("headerMouseDown"),this.registerColumnOption("headerMouseUp"),this.registerColumnOption("headerTap"),this.registerColumnOption("headerDblTap"),this.registerColumnOption("headerTapHold"),this.registerColumnOption("cellClick"),this.registerColumnOption("cellDblClick"),this.registerColumnOption("cellContext"),this.registerColumnOption("cellMouseEnter"),this.registerColumnOption("cellMouseLeave"),this.registerColumnOption("cellMouseOver"),this.registerColumnOption("cellMouseOut"),this.registerColumnOption("cellMouseMove"),this.registerColumnOption("cellMouseDown"),this.registerColumnOption("cellMouseUp"),this.registerColumnOption("cellTap"),this.registerColumnOption("cellDblTap"),this.registerColumnOption("cellTapHold")}initialize(){this.initializeExternalEvents(),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("cell-dblclick",this.cellContentsSelectionFixer.bind(this)),this.subscribe("scroll-horizontal",this.clearTouchWatchers.bind(this)),this.subscribe("scroll-vertical",this.clearTouchWatchers.bind(this))}clearTouchWatchers(){var e=Object.values(this.touchWatchers);e.forEach(t=>{for(let i in t)t[i]=null})}cellContentsSelectionFixer(e,t){var i;if(!(this.table.modExists("edit")&&this.table.modules.edit.currentCell===t)){e.preventDefault();try{document.selection?(i=document.body.createTextRange(),i.moveToElementText(t.getElement()),i.select()):window.getSelection&&(i=document.createRange(),i.selectNode(t.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(i))}catch{}}}initializeExternalEvents(){for(let e in this.eventMap)this.subscriptionChangeExternal(e,this.subscriptionChanged.bind(this,e))}subscriptionChanged(e,t){t?this.subscribers[e]||(this.eventMap[e].includes("-")?(this.subscribers[e]=this.handle.bind(this,e),this.subscribe(this.eventMap[e],this.subscribers[e])):this.subscribeTouchEvents(e)):this.eventMap[e].includes("-")?this.subscribers[e]&&!this.columnSubscribers[e]&&!this.subscribedExternal(e)&&(this.unsubscribe(this.eventMap[e],this.subscribers[e]),delete this.subscribers[e]):this.unsubscribeTouchEvents(e)}subscribeTouchEvents(e){var t=this.eventMap[e];this.touchSubscribers[t+"-touchstart"]||(this.touchSubscribers[t+"-touchstart"]=this.handleTouch.bind(this,t,"start"),this.touchSubscribers[t+"-touchend"]=this.handleTouch.bind(this,t,"end"),this.subscribe(t+"-touchstart",this.touchSubscribers[t+"-touchstart"]),this.subscribe(t+"-touchend",this.touchSubscribers[t+"-touchend"])),this.subscribers[e]=!0}unsubscribeTouchEvents(e){var t=!0,i=this.eventMap[e];if(this.subscribers[e]&&!this.subscribedExternal(e)){delete this.subscribers[e];for(let s in this.eventMap)this.eventMap[s]===i&&this.subscribers[s]&&(t=!1);t&&(this.unsubscribe(i+"-touchstart",this.touchSubscribers[i+"-touchstart"]),this.unsubscribe(i+"-touchend",this.touchSubscribers[i+"-touchend"]),delete this.touchSubscribers[i+"-touchstart"],delete this.touchSubscribers[i+"-touchend"])}}initializeColumn(e){var t=e.definition;for(let i in this.eventMap)t[i]&&(this.subscriptionChanged(i,!0),this.columnSubscribers[i]||(this.columnSubscribers[i]=[]),this.columnSubscribers[i].push(e))}handle(e,t,i){this.dispatchEvent(e,t,i)}handleTouch(e,t,i,s){var n=this.touchWatchers[e];switch(e==="column"&&(e="header"),t){case"start":n.tap=!0,clearTimeout(n.tapHold),n.tapHold=setTimeout(()=>{clearTimeout(n.tapHold),n.tapHold=null,n.tap=null,clearTimeout(n.tapDbl),n.tapDbl=null,this.dispatchEvent(e+"TapHold",i,s)},1e3);break;case"end":n.tap&&(n.tap=null,this.dispatchEvent(e+"Tap",i,s)),n.tapDbl?(clearTimeout(n.tapDbl),n.tapDbl=null,this.dispatchEvent(e+"DblTap",i,s)):n.tapDbl=setTimeout(()=>{clearTimeout(n.tapDbl),n.tapDbl=null},300),clearTimeout(n.tapHold),n.tapHold=null;break}}dispatchEvent(e,t,i){var s=i.getComponent(),n;this.columnSubscribers[e]&&(i instanceof ne?n=i.column.definition[e]:i instanceof U&&(n=i.definition[e]),n&&n(t,s)),this.dispatchExternal(e,t,s)}}b(rt,"moduleName","interaction");var Ii={navPrev:"shift + 9",navNext:9,navUp:38,navDown:40,navLeft:37,navRight:39,scrollPageUp:33,scrollPageDown:34,scrollToStart:36,scrollToEnd:35},Ni={keyBlock:function(l){l.stopPropagation(),l.preventDefault()},scrollPageUp:function(l){var e=this.table.rowManager,t=e.scrollTop-e.element.clientHeight;l.preventDefault(),e.displayRowsCount&&(t>=0?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[0])),this.table.element.focus()},scrollPageDown:function(l){var e=this.table.rowManager,t=e.scrollTop+e.element.clientHeight,i=e.element.scrollHeight;l.preventDefault(),e.displayRowsCount&&(t<=i?e.element.scrollTop=t:e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1])),this.table.element.focus()},scrollToStart:function(l){var e=this.table.rowManager;l.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[0]),this.table.element.focus()},scrollToEnd:function(l){var e=this.table.rowManager;l.preventDefault(),e.displayRowsCount&&e.scrollToRow(e.getDisplayRows()[e.displayRowsCount-1]),this.table.element.focus()},navPrev:function(l){this.dispatch("keybinding-nav-prev",l)},navNext:function(l){this.dispatch("keybinding-nav-next",l)},navLeft:function(l){this.dispatch("keybinding-nav-left",l)},navRight:function(l){this.dispatch("keybinding-nav-right",l)},navUp:function(l){this.dispatch("keybinding-nav-up",l)},navDown:function(l){this.dispatch("keybinding-nav-down",l)}};const N=class N extends w{constructor(e){super(e),this.watchKeys=null,this.pressedKeys=null,this.keyupBinding=!1,this.keydownBinding=!1,this.registerTableOption("keybindings",{}),this.registerTableOption("tabEndNewRow",!1)}initialize(){var e=this.table.options.keybindings,t={};this.watchKeys={},this.pressedKeys=[],e!==!1&&(Object.assign(t,N.bindings),Object.assign(t,e),this.mapBindings(t),this.bindEvents()),this.subscribe("table-destroy",this.clearBindings.bind(this))}mapBindings(e){for(let t in e)N.actions[t]?e[t]&&(typeof e[t]!="object"&&(e[t]=[e[t]]),e[t].forEach(i=>{var s=Array.isArray(i)?i:[i];s.forEach(n=>{this.mapBinding(t,n)})})):console.warn("Key Binding Error - no such action:",t)}mapBinding(e,t){var i={action:N.actions[e],keys:[],ctrl:!1,shift:!1,meta:!1},s=t.toString().toLowerCase().split(" ").join("").split("+");s.forEach(n=>{switch(n){case"ctrl":i.ctrl=!0;break;case"shift":i.shift=!0;break;case"meta":i.meta=!0;break;default:n=isNaN(n)?n.toUpperCase().charCodeAt(0):parseInt(n),i.keys.push(n),this.watchKeys[n]||(this.watchKeys[n]=[]),this.watchKeys[n].push(i)}})}bindEvents(){var e=this;this.keyupBinding=function(t){var i=t.keyCode,s=e.watchKeys[i];s&&(e.pressedKeys.push(i),s.forEach(function(n){e.checkBinding(t,n)}))},this.keydownBinding=function(t){var i=t.keyCode,s=e.watchKeys[i];if(s){var n=e.pressedKeys.indexOf(i);n>-1&&e.pressedKeys.splice(n,1)}},this.table.element.addEventListener("keydown",this.keyupBinding),this.table.element.addEventListener("keyup",this.keydownBinding)}clearBindings(){this.keyupBinding&&this.table.element.removeEventListener("keydown",this.keyupBinding),this.keydownBinding&&this.table.element.removeEventListener("keyup",this.keydownBinding)}checkBinding(e,t){var i=!0;return e.ctrlKey==t.ctrl&&e.shiftKey==t.shift&&e.metaKey==t.meta?(t.keys.forEach(s=>{var n=this.pressedKeys.indexOf(s);n==-1&&(i=!1)}),i&&t.action.call(this,e),!0):!1}};b(N,"moduleName","keybindings"),b(N,"bindings",Ii),b(N,"actions",Ni);let Te=N;class ot extends w{constructor(e){super(e),this.menuContainer=null,this.nestedMenuBlock=!1,this.currentComponent=null,this.rootPopup=null,this.columnSubscribers={},this.registerTableOption("rowContextMenu",!1),this.registerTableOption("rowClickMenu",!1),this.registerTableOption("rowDblClickMenu",!1),this.registerTableOption("groupContextMenu",!1),this.registerTableOption("groupClickMenu",!1),this.registerTableOption("groupDblClickMenu",!1),this.registerColumnOption("headerContextMenu"),this.registerColumnOption("headerClickMenu"),this.registerColumnOption("headerDblClickMenu"),this.registerColumnOption("headerMenu"),this.registerColumnOption("headerMenuIcon"),this.registerColumnOption("contextMenu"),this.registerColumnOption("clickMenu"),this.registerColumnOption("dblClickMenu")}initialize(){this.deprecatedOptionsCheck(),this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeRowWatchers(){this.table.options.rowContextMenu&&(this.subscribe("row-contextmenu",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu)),this.table.on("rowTapHold",this.loadMenuEvent.bind(this,this.table.options.rowContextMenu))),this.table.options.rowClickMenu&&this.subscribe("row-click",this.loadMenuEvent.bind(this,this.table.options.rowClickMenu)),this.table.options.rowDblClickMenu&&this.subscribe("row-dblclick",this.loadMenuEvent.bind(this,this.table.options.rowDblClickMenu))}initializeGroupWatchers(){this.table.options.groupContextMenu&&(this.subscribe("group-contextmenu",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu)),this.table.on("groupTapHold",this.loadMenuEvent.bind(this,this.table.options.groupContextMenu))),this.table.options.groupClickMenu&&this.subscribe("group-click",this.loadMenuEvent.bind(this,this.table.options.groupClickMenu)),this.table.options.groupDblClickMenu&&this.subscribe("group-dblclick",this.loadMenuEvent.bind(this,this.table.options.groupDblClickMenu))}initializeColumn(e){var t=e.definition;t.headerContextMenu&&!this.columnSubscribers.headerContextMenu&&(this.columnSubscribers.headerContextMenu=this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextMenu),this.table.on("headerTapHold",this.loadMenuTableColumnEvent.bind(this,"headerContextMenu"))),t.headerClickMenu&&!this.columnSubscribers.headerClickMenu&&(this.columnSubscribers.headerClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerClickMenu"),this.subscribe("column-click",this.columnSubscribers.headerClickMenu)),t.headerDblClickMenu&&!this.columnSubscribers.headerDblClickMenu&&(this.columnSubscribers.headerDblClickMenu=this.loadMenuTableColumnEvent.bind(this,"headerDblClickMenu"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickMenu)),t.headerMenu&&this.initializeColumnHeaderMenu(e),t.contextMenu&&!this.columnSubscribers.contextMenu&&(this.columnSubscribers.contextMenu=this.loadMenuTableCellEvent.bind(this,"contextMenu"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextMenu),this.table.on("cellTapHold",this.loadMenuTableCellEvent.bind(this,"contextMenu"))),t.clickMenu&&!this.columnSubscribers.clickMenu&&(this.columnSubscribers.clickMenu=this.loadMenuTableCellEvent.bind(this,"clickMenu"),this.subscribe("cell-click",this.columnSubscribers.clickMenu)),t.dblClickMenu&&!this.columnSubscribers.dblClickMenu&&(this.columnSubscribers.dblClickMenu=this.loadMenuTableCellEvent.bind(this,"dblClickMenu"),this.subscribe("cell-dblclick",this.columnSubscribers.dblClickMenu))}initializeColumnHeaderMenu(e){var t=e.definition.headerMenuIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="⋮",i.addEventListener("click",s=>{s.stopPropagation(),s.preventDefault(),this.loadMenuEvent(e.definition.headerMenu,s,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadMenuTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadMenuEvent(i.column.definition[e],t,i)}loadMenuTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadMenuEvent(i.definition[e],t,i)}loadMenuEvent(e,t,i){i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent()):e,this.loadMenu(t,i,e)}loadMenu(e,t,i,s,n){var r=!(e instanceof MouseEvent),o=document.createElement("div"),a;if(o.classList.add("tabulator-menu"),r||e.preventDefault(),!(!i||!i.length)){if(s)a=n.child(o);else{if(this.nestedMenuBlock){if(this.rootPopup)return}else this.nestedMenuBlock=setTimeout(()=>{this.nestedMenuBlock=!1},100);this.rootPopup&&this.rootPopup.hide(),this.rootPopup=a=this.popup(o)}i.forEach(h=>{var d=document.createElement("div"),u=h.label,c=h.disabled;h.separator?d.classList.add("tabulator-menu-separator"):(d.classList.add("tabulator-menu-item"),typeof u=="function"&&(u=u.call(this.table,t.getComponent())),u instanceof Node?d.appendChild(u):d.innerHTML=u,typeof c=="function"&&(c=c.call(this.table,t.getComponent())),c?(d.classList.add("tabulator-menu-item-disabled"),d.addEventListener("click",f=>{f.stopPropagation()})):h.menu&&h.menu.length?d.addEventListener("click",f=>{f.stopPropagation(),this.loadMenu(f,t,h.menu,d,a)}):h.action&&d.addEventListener("click",f=>{h.action(f,t.getComponent())}),h.menu&&h.menu.length&&d.classList.add("tabulator-menu-item-submenu")),o.appendChild(d)}),o.addEventListener("click",h=>{this.rootPopup&&this.rootPopup.hide()}),a.show(s||e),a===this.rootPopup&&(this.rootPopup.hideOnBlur(()=>{this.rootPopup=null,this.currentComponent&&(this.dispatch("menu-closed",i,a),this.dispatchExternal("menuClosed",this.currentComponent.getComponent()),this.currentComponent=null)}),this.currentComponent=t,this.dispatch("menu-opened",i,a),this.dispatchExternal("menuOpened",t.getComponent()))}}}b(ot,"moduleName","menu");class at extends w{constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=250,this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.startX=0,this.autoScrollMargin=40,this.autoScrollStep=5,this.autoScrollTimeout=!1,this.touchMove=!1,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.registerTableOption("movableColumns",!1)}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-col"),e.classList.add("tabulator-col-placeholder"),e}initialize(){this.table.options.movableColumns&&(this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("alert-show",this.abortMove.bind(this)))}abortMove(){clearTimeout(this.checkTimeout)}initializeColumn(e){var t=this,i={},s;!e.modules.frozen&&!e.isGroup&&!e.isRowHeader&&(s=e.getElement(),i.mousemove=(function(n){e.parent===t.moving.parent&&((t.touchMove?n.touches[0].pageX:n.pageX)-x.elOffset(s).left+t.table.columnManager.contentsElement.scrollLeft>e.getWidth()/2?(t.toCol!==e||!t.toColAfter)&&(s.parentNode.insertBefore(t.placeholderElement,s.nextSibling),t.moveColumn(e,!0)):(t.toCol!==e||t.toColAfter)&&(s.parentNode.insertBefore(t.placeholderElement,s),t.moveColumn(e,!1)))}).bind(t),s.addEventListener("mousedown",function(n){t.touchMove=!1,n.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(n,e)},t.checkPeriod))}),s.addEventListener("mouseup",function(n){n.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),t.bindTouchEvents(e)),e.modules.moveColumn=i}bindTouchEvents(e){var t=e.getElement(),i=!1,s,n,r,o,a,h;t.addEventListener("touchstart",d=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,s=e.nextColumn(),r=s?s.getWidth()/2:0,n=e.prevColumn(),o=n?n.getWidth()/2:0,a=0,h=0,i=!1,this.startMove(d,e)},this.checkPeriod)},{passive:!0}),t.addEventListener("touchmove",d=>{var u,c;this.moving&&(this.moveHover(d),i||(i=d.touches[0].pageX),u=d.touches[0].pageX-i,u>0?s&&u-a>r&&(c=s,c!==e&&(i=d.touches[0].pageX,c.getElement().parentNode.insertBefore(this.placeholderElement,c.getElement().nextSibling),this.moveColumn(c,!0))):n&&-u-h>o&&(c=n,c!==e&&(i=d.touches[0].pageX,c.getElement().parentNode.insertBefore(this.placeholderElement,c.getElement()),this.moveColumn(c,!1))),c&&(s=c.nextColumn(),a=r,r=s?s.getWidth()/2:0,n=c.prevColumn(),h=o,o=n?n.getWidth()/2:0))},{passive:!0}),t.addEventListener("touchend",d=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&this.endMove(d)})}startMove(e,t){var i=t.getElement(),s=this.table.columnManager.getContentsElement(),n=this.table.columnManager.getHeadersElement();this.table.modules.selectRange&&this.table.modules.selectRange.columnSelection&&this.table.modules.selectRange.mousedown&&this.table.modules.selectRange.selecting==="column"||(this.moving=t,this.startX=(this.touchMove?e.touches[0].pageX:e.pageX)-x.elOffset(i).left,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),s.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.bottom=s.clientHeight-n.offsetHeight+"px",this.touchMove||(this._bindMouseMove(),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove)),this.moveHover(e),this.dispatch("column-moving",e,this.moving))}_bindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveColumn.mousemove)})}_unbindMouseMove(){this.table.columnManager.columnsByIndex.forEach(function(e){e.modules.moveColumn.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveColumn.mousemove)})}moveColumn(e,t){var i=this.moving.getCells();this.toCol=e,this.toColAfter=t,t?e.getCells().forEach(function(s,n){var r=s.getElement(!0);r.parentNode&&i[n]&&r.parentNode.insertBefore(i[n].getElement(),r.nextSibling)}):e.getCells().forEach(function(s,n){var r=s.getElement(!0);r.parentNode&&i[n]&&r.parentNode.insertBefore(i[n].getElement(),r)})}endMove(e){(e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toCol&&this.table.columnManager.moveColumnActual(this.moving,this.toCol,this.toColAfter),this.moving=!1,this.toCol=!1,this.toColAfter=!1,this.touchMove||(document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove)))}moveHover(e){var t=this.table.columnManager.getContentsElement(),i=t.scrollLeft,s=(this.touchMove?e.touches[0].pageX:e.pageX)-x.elOffset(t).left+i,n;this.hoverElement.style.left=s-this.startX+"px",s-i{n=Math.max(0,i-5),this.table.rowManager.getElement().scrollLeft=n,this.autoScrollTimeout=!1},1))),i+t.clientWidth-s{n=Math.min(t.clientWidth,i+5),this.table.rowManager.getElement().scrollLeft=n,this.autoScrollTimeout=!1},1)))}}b(at,"moduleName","moveColumn");var Wi={delete:function(l,e,t){l.delete()}},Gi={insert:function(l,e,t){return this.table.addRow(l.getData(),void 0,e),!0},add:function(l,e,t){return this.table.addRow(l.getData()),!0},update:function(l,e,t){return e?(e.update(l.getData()),!0):!1},replace:function(l,e,t){return e?(this.table.addRow(l.getData(),void 0,e),e.delete(),!0):!1}};const G=class G extends w{constructor(e){super(e),this.placeholderElement=this.createPlaceholderElement(),this.hoverElement=!1,this.checkTimeout=!1,this.checkPeriod=150,this.moving=!1,this.toRow=!1,this.toRowAfter=!1,this.hasHandle=!1,this.startY=0,this.startX=0,this.moveHover=this.moveHover.bind(this),this.endMove=this.endMove.bind(this),this.tableRowDropEvent=!1,this.touchMove=!1,this.connection=!1,this.connectionSelectorsTables=!1,this.connectionSelectorsElements=!1,this.connectionElements=[],this.connections=[],this.connectedTable=!1,this.connectedRow=!1,this.registerTableOption("movableRows",!1),this.registerTableOption("movableRowsConnectedTables",!1),this.registerTableOption("movableRowsConnectedElements",!1),this.registerTableOption("movableRowsSender",!1),this.registerTableOption("movableRowsReceiver","insert"),this.registerColumnOption("rowHandle")}createPlaceholderElement(){var e=document.createElement("div");return e.classList.add("tabulator-row"),e.classList.add("tabulator-row-placeholder"),e}initialize(){this.table.options.movableRows&&(this.connectionSelectorsTables=this.table.options.movableRowsConnectedTables,this.connectionSelectorsElements=this.table.options.movableRowsConnectedElements,this.connection=this.connectionSelectorsTables||this.connectionSelectorsElements,this.subscribe("cell-init",this.initializeCell.bind(this)),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)))}initializeGroupHeader(e){var t=this,i={};i.mouseup=(function(s){t.tableRowDrop(s,e)}).bind(t),i.mousemove=(function(s){var n;s.pageY-x.elOffset(e.element).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(n=e.getElement(),n.parentNode.insertBefore(t.placeholderElement,n.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(n=e.getElement(),n.previousSibling&&(n.parentNode.insertBefore(t.placeholderElement,n),t.moveRow(e,!1)))}).bind(t),e.modules.moveRow=i}initializeRow(e){var t=this,i={},s;i.mouseup=(function(n){t.tableRowDrop(n,e)}).bind(t),i.mousemove=(function(n){var r=e.getElement();n.pageY-x.elOffset(r).top+t.table.rowManager.element.scrollTop>e.getHeight()/2?(t.toRow!==e||!t.toRowAfter)&&(r.parentNode.insertBefore(t.placeholderElement,r.nextSibling),t.moveRow(e,!0)):(t.toRow!==e||t.toRowAfter)&&(r.parentNode.insertBefore(t.placeholderElement,r),t.moveRow(e,!1))}).bind(t),this.hasHandle||(s=e.getElement(),s.addEventListener("mousedown",function(n){n.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(n,e)},t.checkPeriod))}),s.addEventListener("mouseup",function(n){n.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e,e.getElement())),e.modules.moveRow=i}initializeColumn(e){e.definition.rowHandle&&this.table.options.movableRows!==!1&&(this.hasHandle=!0)}initializeCell(e){if(e.column.definition.rowHandle&&this.table.options.movableRows!==!1){var t=this,i=e.getElement(!0);i.addEventListener("mousedown",function(s){s.which===1&&(t.checkTimeout=setTimeout(function(){t.startMove(s,e.row)},t.checkPeriod))}),i.addEventListener("mouseup",function(s){s.which===1&&t.checkTimeout&&clearTimeout(t.checkTimeout)}),this.bindTouchEvents(e.row,i)}}bindTouchEvents(e,t){var i=!1,s,n,r,o,a,h;t.addEventListener("touchstart",d=>{this.checkTimeout=setTimeout(()=>{this.touchMove=!0,s=e.nextRow(),r=s?s.getHeight()/2:0,n=e.prevRow(),o=n?n.getHeight()/2:0,a=0,h=0,i=!1,this.startMove(d,e)},this.checkPeriod)},{passive:!0}),this.moving,this.toRow,this.toRowAfter,t.addEventListener("touchmove",d=>{var u,c;this.moving&&(d.preventDefault(),this.moveHover(d),i||(i=d.touches[0].pageY),u=d.touches[0].pageY-i,u>0?s&&u-a>r&&(c=s,c!==e&&(i=d.touches[0].pageY,c.getElement().parentNode.insertBefore(this.placeholderElement,c.getElement().nextSibling),this.moveRow(c,!0))):n&&-u-h>o&&(c=n,c!==e&&(i=d.touches[0].pageY,c.getElement().parentNode.insertBefore(this.placeholderElement,c.getElement()),this.moveRow(c,!1))),c&&(s=c.nextRow(),a=r,r=s?s.getHeight()/2:0,n=c.prevRow(),h=o,o=n?n.getHeight()/2:0))}),t.addEventListener("touchend",d=>{this.checkTimeout&&clearTimeout(this.checkTimeout),this.moving&&(this.endMove(d),this.touchMove=!1)})}_bindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().addEventListener("mousemove",e.modules.moveRow.mousemove)})}_unbindMouseMove(){this.table.rowManager.getDisplayRows().forEach(e=>{(e.type==="row"||e.type==="group")&&e.modules.moveRow&&e.modules.moveRow.mousemove&&e.getElement().removeEventListener("mousemove",e.modules.moveRow.mousemove)})}startMove(e,t){var i=t.getElement();this.setStartPosition(e,t),this.moving=t,this.table.element.classList.add("tabulator-block-select"),this.placeholderElement.style.width=t.getWidth()+"px",this.placeholderElement.style.height=t.getHeight()+"px",this.connection?(this.table.element.classList.add("tabulator-movingrow-sending"),this.connectToTables(t)):(i.parentNode.insertBefore(this.placeholderElement,i),i.parentNode.removeChild(i)),this.hoverElement=i.cloneNode(!0),this.hoverElement.classList.add("tabulator-moving"),this.connection?(document.body.appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this.hoverElement.style.width=this.table.element.clientWidth+"px",this.hoverElement.style.whiteSpace="nowrap",this.hoverElement.style.overflow="hidden",this.hoverElement.style.pointerEvents="none"):(this.table.rowManager.getTableElement().appendChild(this.hoverElement),this.hoverElement.style.left="0",this.hoverElement.style.top="0",this._bindMouseMove()),document.body.addEventListener("mousemove",this.moveHover),document.body.addEventListener("mouseup",this.endMove),this.dispatchExternal("rowMoving",t.getComponent()),this.moveHover(e)}setStartPosition(e,t){var i=this.touchMove?e.touches[0].pageX:e.pageX,s=this.touchMove?e.touches[0].pageY:e.pageY,n,r;n=t.getElement(),this.connection?(r=n.getBoundingClientRect(),this.startX=r.left-i+window.pageXOffset,this.startY=r.top-s+window.pageYOffset):this.startY=s-n.getBoundingClientRect().top}endMove(e){(!e||e.which===1||this.touchMove)&&(this._unbindMouseMove(),this.connection||(this.placeholderElement.parentNode.insertBefore(this.moving.getElement(),this.placeholderElement.nextSibling),this.placeholderElement.parentNode.removeChild(this.placeholderElement)),this.hoverElement.parentNode.removeChild(this.hoverElement),this.table.element.classList.remove("tabulator-block-select"),this.toRow?this.table.rowManager.moveRow(this.moving,this.toRow,this.toRowAfter):this.dispatchExternal("rowMoveCancelled",this.moving.getComponent()),this.moving=!1,this.toRow=!1,this.toRowAfter=!1,document.body.removeEventListener("mousemove",this.moveHover),document.body.removeEventListener("mouseup",this.endMove),this.connection&&(this.table.element.classList.remove("tabulator-movingrow-sending"),this.disconnectFromTables()))}moveRow(e,t){this.toRow=e,this.toRowAfter=t}moveHover(e){this.connection?this.moveHoverConnections.call(this,e):this.moveHoverTable.call(this,e)}moveHoverTable(e){var t=this.table.rowManager.getElement(),i=t.scrollTop,s=(this.touchMove?e.touches[0].pageY:e.pageY)-t.getBoundingClientRect().top+i;this.hoverElement.style.top=Math.min(s-this.startY,this.table.rowManager.element.scrollHeight-this.hoverElement.offsetHeight)+"px"}moveHoverConnections(e){this.hoverElement.style.left=this.startX+(this.touchMove?e.touches[0].pageX:e.pageX)+"px",this.hoverElement.style.top=this.startY+(this.touchMove?e.touches[0].pageY:e.pageY)+"px"}elementRowDrop(e,t,i){this.dispatchExternal("movableRowsElementDrop",e,t,i?i.getComponent():!1)}connectToTables(e){var t;this.connectionSelectorsTables&&(t=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStart",t),this.commsSend(this.connectionSelectorsTables,"moveRow","connect",{row:e})),this.connectionSelectorsElements&&(this.connectionElements=[],Array.isArray(this.connectionSelectorsElements)||(this.connectionSelectorsElements=[this.connectionSelectorsElements]),this.connectionSelectorsElements.forEach(i=>{typeof i=="string"?this.connectionElements=this.connectionElements.concat(Array.prototype.slice.call(document.querySelectorAll(i))):this.connectionElements.push(i)}),this.connectionElements.forEach(i=>{var s=n=>{this.elementRowDrop(n,i,this.moving)};i.addEventListener("mouseup",s),i.tabulatorElementDropEvent=s,i.classList.add("tabulator-movingrow-receiving")}))}disconnectFromTables(){var e;this.connectionSelectorsTables&&(e=this.commsConnections(this.connectionSelectorsTables),this.dispatchExternal("movableRowsSendingStop",e),this.commsSend(this.connectionSelectorsTables,"moveRow","disconnect")),this.connectionElements.forEach(t=>{t.classList.remove("tabulator-movingrow-receiving"),t.removeEventListener("mouseup",t.tabulatorElementDropEvent),delete t.tabulatorElementDropEvent})}connect(e,t){return this.connectedTable?(console.warn("Move Row Error - Table cannot accept connection, already connected to table:",this.connectedTable),!1):(this.connectedTable=e,this.connectedRow=t,this.table.element.classList.add("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(i=>{i.type==="row"&&i.modules.moveRow&&i.modules.moveRow.mouseup&&i.getElement().addEventListener("mouseup",i.modules.moveRow.mouseup)}),this.tableRowDropEvent=this.tableRowDrop.bind(this),this.table.element.addEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStart",t,e),!0)}disconnect(e){e===this.connectedTable?(this.connectedTable=!1,this.connectedRow=!1,this.table.element.classList.remove("tabulator-movingrow-receiving"),this.table.rowManager.getDisplayRows().forEach(t=>{t.type==="row"&&t.modules.moveRow&&t.modules.moveRow.mouseup&&t.getElement().removeEventListener("mouseup",t.modules.moveRow.mouseup)}),this.table.element.removeEventListener("mouseup",this.tableRowDropEvent),this.dispatchExternal("movableRowsReceivingStop",e)):console.warn("Move Row Error - trying to disconnect from non connected table")}dropComplete(e,t,i){var s=!1;if(i){switch(typeof this.table.options.movableRowsSender){case"string":s=G.senders[this.table.options.movableRowsSender];break;case"function":s=this.table.options.movableRowsSender;break}s?s.call(this,this.moving?this.moving.getComponent():void 0,t?t.getComponent():void 0,e):this.table.options.movableRowsSender&&console.warn("Mover Row Error - no matching sender found:",this.table.options.movableRowsSender),this.dispatchExternal("movableRowsSent",this.moving.getComponent(),t?t.getComponent():void 0,e)}else this.dispatchExternal("movableRowsSentFailed",this.moving.getComponent(),t?t.getComponent():void 0,e);this.endMove()}tableRowDrop(e,t){var i=!1,s=!1;switch(e.stopImmediatePropagation(),typeof this.table.options.movableRowsReceiver){case"string":i=G.receivers[this.table.options.movableRowsReceiver];break;case"function":i=this.table.options.movableRowsReceiver;break}i?s=i.call(this,this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):console.warn("Mover Row Error - no matching receiver found:",this.table.options.movableRowsReceiver),s?this.dispatchExternal("movableRowsReceived",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable):this.dispatchExternal("movableRowsReceivedFailed",this.connectedRow.getComponent(),t?t.getComponent():void 0,this.connectedTable),this.commsSend(this.connectedTable,"moveRow","dropcomplete",{row:t,success:s})}commsReceived(e,t,i){switch(t){case"connect":return this.connect(e,i.row);case"disconnect":return this.disconnect(e);case"dropcomplete":return this.dropComplete(e,i.row,i.success)}}};b(G,"moduleName","moveRow"),b(G,"senders",Wi),b(G,"receivers",Gi);let ke=G;var ji={};const Y=class Y extends w{constructor(e){super(e),this.allowedTypes=["","data","edit","clipboard"],this.enabled=!0,this.registerColumnOption("mutator"),this.registerColumnOption("mutatorParams"),this.registerColumnOption("mutatorData"),this.registerColumnOption("mutatorDataParams"),this.registerColumnOption("mutatorEdit"),this.registerColumnOption("mutatorEditParams"),this.registerColumnOption("mutatorClipboard"),this.registerColumnOption("mutatorClipboardParams"),this.registerColumnOption("mutateLink")}initialize(){this.subscribe("cell-value-changing",this.transformCell.bind(this)),this.subscribe("cell-value-changed",this.mutateLink.bind(this)),this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("row-data-init-before",this.rowDataChanged.bind(this)),this.subscribe("row-data-changing",this.rowDataChanged.bind(this))}rowDataChanged(e,t,i){return this.transformRow(t,"data",i)}initializeColumn(e){var t=!1,i={};this.allowedTypes.forEach(s=>{var n="mutator"+(s.charAt(0).toUpperCase()+s.slice(1)),r;e.definition[n]&&(r=this.lookupMutator(e.definition[n]),r&&(t=!0,i[n]={mutator:r,params:e.definition[n+"Params"]||{}}))}),t&&(e.modules.mutate=i)}lookupMutator(e){var t=!1;switch(typeof e){case"string":Y.mutators[e]?t=Y.mutators[e]:console.warn("Mutator Error - No such mutator found, ignoring: ",e);break;case"function":t=e;break}return t}transformRow(e,t,i){var s="mutator"+(t.charAt(0).toUpperCase()+t.slice(1)),n;return this.enabled&&this.table.columnManager.traverse(r=>{var o,a,h;r.modules.mutate&&(o=r.modules.mutate[s]||r.modules.mutate.mutator||!1,o&&(n=r.getFieldValue(typeof i<"u"?i:e),(t=="data"&&!i||typeof n<"u")&&(h=r.getComponent(),a=typeof o.params=="function"?o.params(n,e,t,h):o.params,r.setFieldValue(e,o.mutator(n,e,t,a,h)))))}),e}transformCell(e,t){if(e.column.modules.mutate){var i=e.column.modules.mutate.mutatorEdit||e.column.modules.mutate.mutator||!1,s={};if(i)return s=Object.assign(s,e.row.getData()),e.column.setFieldValue(s,t),i.mutator(t,s,"edit",i.params,e.getComponent())}return t}mutateLink(e){var t=e.column.definition.mutateLink;t&&(Array.isArray(t)||(t=[t]),t.forEach(i=>{var s=e.row.getCell(i);s&&s.setValue(s.getValue(),!0,!0)}))}enable(){this.enabled=!0}disable(){this.enabled=!1}};b(Y,"moduleName","mutator"),b(Y,"mutators",ji);let Me=Y;function Ui(l,e,t,i,s){var n=document.createElement("span"),r=document.createElement("span"),o=document.createElement("span"),a=document.createElement("span"),h=document.createElement("span"),d=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",u=>{r.innerHTML=u}),this.table.modules.localize.langBind("pagination|counter|of",u=>{a.innerHTML=u}),this.table.modules.localize.langBind("pagination|counter|rows",u=>{d.innerHTML=u}),i?(o.innerHTML=" "+e+"-"+Math.min(e+l-1,i)+" ",h.innerHTML=" "+i+" ",n.appendChild(r),n.appendChild(o),n.appendChild(a),n.appendChild(h),n.appendChild(d)):(o.innerHTML=" 0 ",n.appendChild(r),n.appendChild(o),n.appendChild(d)),n}function Xi(l,e,t,i,s){var n=document.createElement("span"),r=document.createElement("span"),o=document.createElement("span"),a=document.createElement("span"),h=document.createElement("span"),d=document.createElement("span");return this.table.modules.localize.langBind("pagination|counter|showing",u=>{r.innerHTML=u}),o.innerHTML=" "+t+" ",this.table.modules.localize.langBind("pagination|counter|of",u=>{a.innerHTML=u}),h.innerHTML=" "+s+" ",this.table.modules.localize.langBind("pagination|counter|pages",u=>{d.innerHTML=u}),n.appendChild(r),n.appendChild(o),n.appendChild(a),n.appendChild(h),n.appendChild(d),n}var Ji={rows:Ui,pages:Xi};const te=class te extends w{constructor(e){super(e),this.mode="local",this.progressiveLoad=!1,this.element=null,this.pageCounterElement=null,this.pageCounter=null,this.size=0,this.page=1,this.count=5,this.max=1,this.remoteRowCountEstimate=null,this.initialLoad=!0,this.dataChanging=!1,this.pageSizes=[],this.registerTableOption("pagination",!1),this.registerTableOption("paginationMode","local"),this.registerTableOption("paginationSize",!1),this.registerTableOption("paginationInitialPage",1),this.registerTableOption("paginationCounter",!1),this.registerTableOption("paginationCounterElement",!1),this.registerTableOption("paginationButtonCount",5),this.registerTableOption("paginationSizeSelector",!1),this.registerTableOption("paginationElement",!1),this.registerTableOption("paginationAddRow","page"),this.registerTableOption("progressiveLoad",!1),this.registerTableOption("progressiveLoadDelay",0),this.registerTableOption("progressiveLoadScrollMargin",0),this.registerTableFunction("setMaxPage",this.setMaxPage.bind(this)),this.registerTableFunction("setPage",this.setPage.bind(this)),this.registerTableFunction("setPageToRow",this.userSetPageToRow.bind(this)),this.registerTableFunction("setPageSize",this.userSetPageSize.bind(this)),this.registerTableFunction("getPageSize",this.getPageSize.bind(this)),this.registerTableFunction("previousPage",this.previousPage.bind(this)),this.registerTableFunction("nextPage",this.nextPage.bind(this)),this.registerTableFunction("getPage",this.getPage.bind(this)),this.registerTableFunction("getPageMax",this.getPageMax.bind(this)),this.registerComponentFunction("row","pageTo",this.setPageToRow.bind(this))}initialize(){this.table.options.pagination?(this.subscribe("row-deleted",this.rowsUpdated.bind(this)),this.subscribe("row-added",this.rowsUpdated.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("footer-redraw",this.footerRedraw.bind(this)),this.table.options.paginationAddRow=="page"&&this.subscribe("row-adding-position",this.rowAddingPosition.bind(this)),this.table.options.paginationMode==="remote"&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this))),this.table.options.progressiveLoad&&console.error("Progressive Load Error - Pagination and progressive load cannot be used at the same time"),this.registerDisplayHandler(this.restOnRenderBefore.bind(this),40),this.registerDisplayHandler(this.getRows.bind(this),50),this.createElements(),this.initializePageCounter(),this.initializePaginator()):this.table.options.progressiveLoad&&(this.subscribe("data-params",this.remotePageParams.bind(this)),this.subscribe("data-loaded",this._parseRemoteData.bind(this)),this.subscribe("table-built",this.calculatePageSizes.bind(this)),this.subscribe("data-processed",this.initialLoadComplete.bind(this)),this.initializeProgressive(this.table.options.progressiveLoad),this.table.options.progressiveLoad==="scroll"&&this.subscribe("scroll-vertical",this.scrollVertical.bind(this)))}rowAddingPosition(e,t){var i=this.table.rowManager,s=i.getDisplayRows(),n;return t?s.length?n=s[0]:i.activeRows.length&&(n=i.activeRows[i.activeRows.length-1],t=!1):s.length&&(n=s[s.length-1],t=!(s.length{}))}restOnRenderBefore(e,t){return t||this.mode==="local"&&this.reset(),e}rowsUpdated(){this.refreshData(!0,"all")}createElements(){var e;this.element=document.createElement("span"),this.element.classList.add("tabulator-paginator"),this.pagesElement=document.createElement("span"),this.pagesElement.classList.add("tabulator-pages"),e=document.createElement("button"),e.classList.add("tabulator-page"),e.setAttribute("type","button"),e.setAttribute("role","button"),e.setAttribute("aria-label",""),e.setAttribute("title",""),this.firstBut=e.cloneNode(!0),this.firstBut.setAttribute("data-page","first"),this.prevBut=e.cloneNode(!0),this.prevBut.setAttribute("data-page","prev"),this.nextBut=e.cloneNode(!0),this.nextBut.setAttribute("data-page","next"),this.lastBut=e.cloneNode(!0),this.lastBut.setAttribute("data-page","last"),this.table.options.paginationSizeSelector&&(this.pageSizeSelect=document.createElement("select"),this.pageSizeSelect.classList.add("tabulator-page-size"))}generatePageSizeSelectList(){var e=[];if(this.pageSizeSelect){if(Array.isArray(this.table.options.paginationSizeSelector))e=this.table.options.paginationSizeSelector,this.pageSizes=e,this.pageSizes.indexOf(this.size)==-1&&e.unshift(this.size);else if(this.pageSizes.indexOf(this.size)==-1){e=[];for(let t=1;t<5;t++)e.push(this.size*t);this.pageSizes=e}else e=this.pageSizes;for(;this.pageSizeSelect.firstChild;)this.pageSizeSelect.removeChild(this.pageSizeSelect.firstChild);e.forEach(t=>{var i=document.createElement("option");i.value=t,t===!0?this.langBind("pagination|all",function(s){i.innerHTML=s}):i.innerHTML=t,this.pageSizeSelect.appendChild(i)}),this.pageSizeSelect.value=this.size}}initializePageCounter(){var e=this.table.options.paginationCounter,t=null;e&&(typeof e=="function"?t=e:t=te.pageCounters[e],t?(this.pageCounter=t,this.pageCounterElement=document.createElement("span"),this.pageCounterElement.classList.add("tabulator-page-counter")):console.warn("Pagination Error - No such page counter found: ",e))}initializePaginator(e){var t,i;e||(this.langBind("pagination|first",s=>{this.firstBut.innerHTML=s}),this.langBind("pagination|first_title",s=>{this.firstBut.setAttribute("aria-label",s),this.firstBut.setAttribute("title",s)}),this.langBind("pagination|prev",s=>{this.prevBut.innerHTML=s}),this.langBind("pagination|prev_title",s=>{this.prevBut.setAttribute("aria-label",s),this.prevBut.setAttribute("title",s)}),this.langBind("pagination|next",s=>{this.nextBut.innerHTML=s}),this.langBind("pagination|next_title",s=>{this.nextBut.setAttribute("aria-label",s),this.nextBut.setAttribute("title",s)}),this.langBind("pagination|last",s=>{this.lastBut.innerHTML=s}),this.langBind("pagination|last_title",s=>{this.lastBut.setAttribute("aria-label",s),this.lastBut.setAttribute("title",s)}),this.firstBut.addEventListener("click",()=>{this.setPage(1)}),this.prevBut.addEventListener("click",()=>{this.previousPage()}),this.nextBut.addEventListener("click",()=>{this.nextPage()}),this.lastBut.addEventListener("click",()=>{this.setPage(this.max)}),this.table.options.paginationElement&&(this.element=this.table.options.paginationElement),this.pageSizeSelect&&(t=document.createElement("label"),this.langBind("pagination|page_size",s=>{this.pageSizeSelect.setAttribute("aria-label",s),this.pageSizeSelect.setAttribute("title",s),t.innerHTML=s}),this.element.appendChild(t),this.element.appendChild(this.pageSizeSelect),this.pageSizeSelect.addEventListener("change",s=>{this.setPageSize(this.pageSizeSelect.value=="true"?!0:this.pageSizeSelect.value),this.setPage(1)})),this.element.appendChild(this.firstBut),this.element.appendChild(this.prevBut),this.element.appendChild(this.pagesElement),this.element.appendChild(this.nextBut),this.element.appendChild(this.lastBut),this.table.options.paginationElement||(this.table.options.paginationCounter&&(this.table.options.paginationCounterElement?this.table.options.paginationCounterElement instanceof HTMLElement?this.table.options.paginationCounterElement.appendChild(this.pageCounterElement):typeof this.table.options.paginationCounterElement=="string"&&(i=document.querySelector(this.table.options.paginationCounterElement),i?i.appendChild(this.pageCounterElement):console.warn("Pagination Error - Unable to find element matching paginationCounterElement selector:",this.table.options.paginationCounterElement)):this.footerAppend(this.pageCounterElement)),this.footerAppend(this.element)),this.page=this.table.options.paginationInitialPage,this.count=this.table.options.paginationButtonCount),this.mode=this.table.options.paginationMode}initializeProgressive(e){this.initializePaginator(!0),this.mode="progressive_"+e,this.progressiveLoad=!0}trackChanges(){this.dispatch("page-changed")}setMaxRows(e){e?this.max=this.size===!0?1:Math.ceil(e/this.size):this.max=1,this.page>this.max&&(this.page=this.max)}reset(e){this.initialLoad||(this.mode=="local"||e)&&(this.page=1,this.trackChanges())}setMaxPage(e){e=parseInt(e),this.max=e||1,this.page>this.max&&(this.page=this.max,this.trigger())}setPage(e){switch(e){case"first":return this.setPage(1);case"prev":return this.previousPage();case"next":return this.nextPage();case"last":return this.setPage(this.max)}return e=parseInt(e),e>0&&e<=this.max||this.mode!=="local"?(this.page=e,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Requested page is out of range of 1 - "+this.max+":",e),Promise.reject())}setPageToRow(e){var t=this.displayRows(-1),i=t.indexOf(e);if(i>-1){var s=this.size===!0?1:Math.ceil((i+1)/this.size);return this.setPage(s)}else return console.warn("Pagination Error - Requested row is not visible"),Promise.reject()}setPageSize(e){e!==!0&&(e=parseInt(e)),e>0&&(this.size=e,this.dispatchExternal("pageSizeChanged",e)),this.pageSizeSelect&&this.generatePageSizeSelectList(),this.trackChanges()}_setPageCounter(e,t,i){var s;if(this.pageCounter)switch(this.mode==="remote"&&(t=this.size,i=(this.page-1)*this.size+1,e=this.remoteRowCountEstimate),s=this.pageCounter.call(this,t,i,this.page,e,this.max),typeof s){case"object":if(s instanceof Node){for(;this.pageCounterElement.firstChild;)this.pageCounterElement.removeChild(this.pageCounterElement.firstChild);this.pageCounterElement.appendChild(s)}else this.pageCounterElement.innerHTML="",s!=null&&console.warn("Page Counter Error - Page Counter has returned a type of object, the only valid page counter object return is an instance of Node, the page counter returned:",s);break;case"undefined":this.pageCounterElement.innerHTML="";break;default:this.pageCounterElement.innerHTML=s}}_setPageButtons(){let e=Math.floor((this.count-1)/2),t=Math.ceil((this.count-1)/2),i=this.max-this.page+e+10&&n<=this.max&&this.pagesElement.appendChild(this._generatePageButton(n));this.footerRedraw()}_generatePageButton(e){var t=document.createElement("button");return t.classList.add("tabulator-page"),e==this.page&&t.classList.add("active"),t.setAttribute("type","button"),t.setAttribute("role","button"),this.langBind("pagination|page_title",i=>{t.setAttribute("aria-label",i+" "+e),t.setAttribute("title",i+" "+e)}),t.setAttribute("data-page",e),t.textContent=e,t.addEventListener("click",i=>{this.setPage(e)}),t}previousPage(){return this.page>1?(this.page--,this.trackChanges(),this.trigger()):(console.warn("Pagination Error - Previous page would be less than page 1:",0),Promise.reject())}nextPage(){return this.pagea.type==="row");if(this.mode=="local"){i=[],this.setMaxRows(e.length),this.size===!0?(s=0,n=e.length):(s=this.size*(this.page-1),n=s+parseInt(this.size)),this._setPageButtons();for(let a=s;a{this.dataChanging=!1});case"progressive_load":case"progressive_scroll":return this.reloadData(null,!0);default:return console.warn("Pagination Error - no such pagination mode:",this.mode),Promise.reject()}}_parseRemoteData(e){var t;if(typeof e.last_page>"u"&&console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").last_page||"last_page")+"' property"),e.data)if(this.max=parseInt(e.last_page)||1,this.remoteRowCountEstimate=typeof e.last_row<"u"?e.last_row:e.last_page*this.size-(this.page==e.last_page?this.size-e.data.length:0),this.progressiveLoad){switch(this.mode){case"progressive_load":this.page==1?this.table.rowManager.setData(e.data,!1,this.page==1):this.table.rowManager.addRows(e.data),this.page{this.nextPage()},this.table.options.progressiveLoadDelay);break;case"progressive_scroll":e=this.page===1?e.data:this.table.rowManager.getData().concat(e.data),this.table.rowManager.setData(e,this.page!==1,this.page==1),t=this.table.options.progressiveLoadScrollMargin||this.table.rowManager.element.clientHeight*2,this.table.rowManager.element.scrollHeight<=this.table.rowManager.element.clientHeight+t&&this.page{this.nextPage()});break}return!1}else this.dispatchExternal("pageLoaded",this.getPage());else console.warn("Remote Pagination Error - Server response missing '"+(this.options("dataReceiveParams").data||"data")+"' property");return e.data}footerRedraw(){var e=this.table.footerManager.containerElement;Math.ceil(e.clientWidth)-e.scrollWidth<0?this.pagesElement.style.display="none":(this.pagesElement.style.display="",Math.ceil(e.clientWidth)-e.scrollWidth<0&&(this.pagesElement.style.display="none"))}};b(te,"moduleName","page"),b(te,"pageCounters",Ji);let Le=te;var Ki={local:function(l,e){var t=localStorage.getItem(l+"-"+e);return t?JSON.parse(t):!1},cookie:function(l,e){var t=document.cookie,i=l+"-"+e,s=t.indexOf(i+"="),n,r;return s>-1&&(t=t.slice(s),n=t.indexOf(";"),n>-1&&(t=t.slice(0,n)),r=t.replace(i+"=","")),r?JSON.parse(r):!1}},qi={local:function(l,e,t){localStorage.setItem(l+"-"+e,JSON.stringify(t))},cookie:function(l,e,t){var i=new Date;i.setDate(i.getDate()+1e4),document.cookie=l+"-"+e+"="+JSON.stringify(t)+"; expires="+i.toUTCString()}};const D=class D extends w{constructor(e){super(e),this.mode="",this.id="",this.defWatcherBlock=!1,this.config={},this.readFunc=!1,this.writeFunc=!1,this.registerTableOption("persistence",!1),this.registerTableOption("persistenceID",""),this.registerTableOption("persistenceMode",!0),this.registerTableOption("persistenceReaderFunc",!1),this.registerTableOption("persistenceWriterFunc",!1)}localStorageTest(){var e="_tabulator_test";try{return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch{return!1}}initialize(){if(this.table.options.persistence){var e=this.table.options.persistenceMode,t=this.table.options.persistenceID,i;this.mode=e!==!0?e:this.localStorageTest()?"local":"cookie",this.table.options.persistenceReaderFunc?typeof this.table.options.persistenceReaderFunc=="function"?this.readFunc=this.table.options.persistenceReaderFunc:D.readers[this.table.options.persistenceReaderFunc]?this.readFunc=D.readers[this.table.options.persistenceReaderFunc]:console.warn("Persistence Read Error - invalid reader set",this.table.options.persistenceReaderFunc):D.readers[this.mode]?this.readFunc=D.readers[this.mode]:console.warn("Persistence Read Error - invalid reader set",this.mode),this.table.options.persistenceWriterFunc?typeof this.table.options.persistenceWriterFunc=="function"?this.writeFunc=this.table.options.persistenceWriterFunc:D.writers[this.table.options.persistenceWriterFunc]?this.writeFunc=D.writers[this.table.options.persistenceWriterFunc]:console.warn("Persistence Write Error - invalid reader set",this.table.options.persistenceWriterFunc):D.writers[this.mode]?this.writeFunc=D.writers[this.mode]:console.warn("Persistence Write Error - invalid writer set",this.mode),this.id="tabulator-"+(t||this.table.element.getAttribute("id")||""),this.config={sort:this.table.options.persistence===!0||this.table.options.persistence.sort,filter:this.table.options.persistence===!0||this.table.options.persistence.filter,headerFilter:this.table.options.persistence===!0||this.table.options.persistence.headerFilter,group:this.table.options.persistence===!0||this.table.options.persistence.group,page:this.table.options.persistence===!0||this.table.options.persistence.page,columns:this.table.options.persistence===!0?["title","width","visible"]:this.table.options.persistence.columns},this.config.page&&(i=this.retrieveData("page"),i&&(typeof i.paginationSize<"u"&&(this.config.page===!0||this.config.page.size)&&(this.table.options.paginationSize=i.paginationSize),typeof i.paginationInitialPage<"u"&&(this.config.page===!0||this.config.page.page)&&(this.table.options.paginationInitialPage=i.paginationInitialPage))),this.config.group&&(i=this.retrieveData("group"),i&&(typeof i.groupBy<"u"&&(this.config.group===!0||this.config.group.groupBy)&&(this.table.options.groupBy=i.groupBy),typeof i.groupStartOpen<"u"&&(this.config.group===!0||this.config.group.groupStartOpen)&&(this.table.options.groupStartOpen=i.groupStartOpen),typeof i.groupHeader<"u"&&(this.config.group===!0||this.config.group.groupHeader)&&(this.table.options.groupHeader=i.groupHeader))),this.config.columns&&(this.table.options.columns=this.load("columns",this.table.options.columns),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-show",this.save.bind(this,"columns")),this.subscribe("column-hide",this.save.bind(this,"columns")),this.subscribe("column-moved",this.save.bind(this,"columns"))),this.subscribe("table-built",this.tableBuilt.bind(this),0),this.subscribe("table-redraw",this.tableRedraw.bind(this)),this.subscribe("filter-changed",this.eventSave.bind(this,"filter")),this.subscribe("filter-changed",this.eventSave.bind(this,"headerFilter")),this.subscribe("sort-changed",this.eventSave.bind(this,"sort")),this.subscribe("group-changed",this.eventSave.bind(this,"group")),this.subscribe("page-changed",this.eventSave.bind(this,"page")),this.subscribe("column-resized",this.eventSave.bind(this,"columns")),this.subscribe("column-width",this.eventSave.bind(this,"columns")),this.subscribe("layout-refreshed",this.eventSave.bind(this,"columns"))}this.registerTableFunction("getColumnLayout",this.getColumnLayout.bind(this)),this.registerTableFunction("setColumnLayout",this.setColumnLayout.bind(this))}eventSave(e){this.config[e]&&this.save(e)}tableBuilt(){var e,t,i;this.config.sort&&(e=this.load("sort"),e&&(this.table.options.initialSort=e)),this.config.filter&&(t=this.load("filter"),t&&(this.table.options.initialFilter=t)),this.config.headerFilter&&(i=this.load("headerFilter"),i&&(this.table.options.initialHeaderFilter=i))}tableRedraw(e){e&&this.config.columns&&this.save("columns")}getColumnLayout(){return this.parseColumns(this.table.columnManager.getColumns())}setColumnLayout(e){return this.table.columnManager.setColumns(this.mergeDefinition(this.table.options.columns,e,!0)),!0}initializeColumn(e){var t,i;this.config.columns&&(this.defWatcherBlock=!0,t=e.getDefinition(),i=this.config.columns===!0?Object.keys(t):this.config.columns,i.forEach(s=>{var n=Object.getOwnPropertyDescriptor(t,s),r=t[s];n&&Object.defineProperty(t,s,{set:o=>{r=o,this.defWatcherBlock||this.save("columns"),n.set&&n.set(o)},get:()=>(n.get&&n.get(),r)})}),this.defWatcherBlock=!1)}load(e,t){var i=this.retrieveData(e);return t&&(i=i?this.mergeDefinition(t,i):t),i}retrieveData(e){return this.readFunc?this.readFunc(this.id,e):!1}mergeDefinition(e,t,i){var s=[];return t=t||[],t.forEach((n,r)=>{var o=this._findColumn(e,n),a;o&&(i?a=Object.keys(n):this.config.columns===!0||this.config.columns==null?(a=Object.keys(o),a.push("width")):a=this.config.columns,a.forEach(h=>{h!=="columns"&&typeof n[h]<"u"&&(o[h]=n[h])}),o.columns&&(o.columns=this.mergeDefinition(o.columns,n.columns)),s.push(o))}),e.forEach((n,r)=>{var o=this._findColumn(t,n);o||(s.length>r?s.splice(r,0,n):s.push(n))}),s}_findColumn(e,t){var i=t.columns?"group":t.field?"field":"object";return e.find(function(s){switch(i){case"group":return s.title===t.title&&s.columns.length===t.columns.length;case"field":return s.field===t.field;case"object":return s===t}})}save(e){var t={};switch(e){case"columns":t=this.parseColumns(this.table.columnManager.getColumns());break;case"filter":t=this.table.modules.filter.getFilters();break;case"headerFilter":t=this.table.modules.filter.getHeaderFilters();break;case"sort":t=this.validateSorters(this.table.modules.sort.getSort());break;case"group":t=this.getGroupConfig();break;case"page":t=this.getPageConfig();break}this.writeFunc&&this.writeFunc(this.id,e,t)}validateSorters(e){return e.forEach(function(t){t.column=t.field,delete t.field}),e}getGroupConfig(){var e={};return this.config.group&&((this.config.group===!0||this.config.group.groupBy)&&(e.groupBy=this.table.options.groupBy),(this.config.group===!0||this.config.group.groupStartOpen)&&(e.groupStartOpen=this.table.options.groupStartOpen),(this.config.group===!0||this.config.group.groupHeader)&&(e.groupHeader=this.table.options.groupHeader)),e}getPageConfig(){var e={};return this.config.page&&((this.config.page===!0||this.config.page.size)&&(e.paginationSize=this.table.modules.page.getPageSize()),(this.config.page===!0||this.config.page.page)&&(e.paginationInitialPage=this.table.modules.page.getPage())),e}parseColumns(e){var t=[],i=["headerContextMenu","headerMenu","contextMenu","clickMenu"];return e.forEach(s=>{var n={},r=s.getDefinition(),o;s.isGroup?(n.title=r.title,n.columns=this.parseColumns(s.getColumns())):(n.field=s.getField(),this.config.columns===!0||this.config.columns==null?(o=Object.keys(r),o.push("width"),o.push("visible")):o=this.config.columns,o.forEach(a=>{switch(a){case"width":n.width=s.getWidth();break;case"visible":n.visible=s.visible;break;default:typeof r[a]!="function"&&i.indexOf(a)===-1&&(n[a]=r[a])}})),t.push(n)}),t}};b(D,"moduleName","persistence"),b(D,"moduleInitOrder",-10),b(D,"readers",Ki),b(D,"writers",qi);let Se=D;class lt extends w{constructor(e){super(e),this.columnSubscribers={},this.registerTableOption("rowContextPopup",!1),this.registerTableOption("rowClickPopup",!1),this.registerTableOption("rowDblClickPopup",!1),this.registerTableOption("groupContextPopup",!1),this.registerTableOption("groupClickPopup",!1),this.registerTableOption("groupDblClickPopup",!1),this.registerColumnOption("headerContextPopup"),this.registerColumnOption("headerClickPopup"),this.registerColumnOption("headerDblClickPopup"),this.registerColumnOption("headerPopup"),this.registerColumnOption("headerPopupIcon"),this.registerColumnOption("contextPopup"),this.registerColumnOption("clickPopup"),this.registerColumnOption("dblClickPopup"),this.registerComponentFunction("cell","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("column","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("row","popup",this._componentPopupCall.bind(this)),this.registerComponentFunction("group","popup",this._componentPopupCall.bind(this))}initialize(){this.initializeRowWatchers(),this.initializeGroupWatchers(),this.subscribe("column-init",this.initializeColumn.bind(this))}_componentPopupCall(e,t,i){this.loadPopupEvent(t,null,e,i)}initializeRowWatchers(){this.table.options.rowContextPopup&&(this.subscribe("row-contextmenu",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup)),this.table.on("rowTapHold",this.loadPopupEvent.bind(this,this.table.options.rowContextPopup))),this.table.options.rowClickPopup&&this.subscribe("row-click",this.loadPopupEvent.bind(this,this.table.options.rowClickPopup)),this.table.options.rowDblClickPopup&&this.subscribe("row-dblclick",this.loadPopupEvent.bind(this,this.table.options.rowDblClickPopup))}initializeGroupWatchers(){this.table.options.groupContextPopup&&(this.subscribe("group-contextmenu",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup)),this.table.on("groupTapHold",this.loadPopupEvent.bind(this,this.table.options.groupContextPopup))),this.table.options.groupClickPopup&&this.subscribe("group-click",this.loadPopupEvent.bind(this,this.table.options.groupClickPopup)),this.table.options.groupDblClickPopup&&this.subscribe("group-dblclick",this.loadPopupEvent.bind(this,this.table.options.groupDblClickPopup))}initializeColumn(e){var t=e.definition;t.headerContextPopup&&!this.columnSubscribers.headerContextPopup&&(this.columnSubscribers.headerContextPopup=this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"),this.subscribe("column-contextmenu",this.columnSubscribers.headerContextPopup),this.table.on("headerTapHold",this.loadPopupTableColumnEvent.bind(this,"headerContextPopup"))),t.headerClickPopup&&!this.columnSubscribers.headerClickPopup&&(this.columnSubscribers.headerClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerClickPopup"),this.subscribe("column-click",this.columnSubscribers.headerClickPopup)),t.headerDblClickPopup&&!this.columnSubscribers.headerDblClickPopup&&(this.columnSubscribers.headerDblClickPopup=this.loadPopupTableColumnEvent.bind(this,"headerDblClickPopup"),this.subscribe("column-dblclick",this.columnSubscribers.headerDblClickPopup)),t.headerPopup&&this.initializeColumnHeaderPopup(e),t.contextPopup&&!this.columnSubscribers.contextPopup&&(this.columnSubscribers.contextPopup=this.loadPopupTableCellEvent.bind(this,"contextPopup"),this.subscribe("cell-contextmenu",this.columnSubscribers.contextPopup),this.table.on("cellTapHold",this.loadPopupTableCellEvent.bind(this,"contextPopup"))),t.clickPopup&&!this.columnSubscribers.clickPopup&&(this.columnSubscribers.clickPopup=this.loadPopupTableCellEvent.bind(this,"clickPopup"),this.subscribe("cell-click",this.columnSubscribers.clickPopup)),t.dblClickPopup&&!this.columnSubscribers.dblClickPopup&&(this.columnSubscribers.dblClickPopup=this.loadPopupTableCellEvent.bind(this,"dblClickPopup"),this.subscribe("cell-click",this.columnSubscribers.dblClickPopup))}initializeColumnHeaderPopup(e){var t=e.definition.headerPopupIcon,i;i=document.createElement("span"),i.classList.add("tabulator-header-popup-button"),t?(typeof t=="function"&&(t=t(e.getComponent())),t instanceof HTMLElement?i.appendChild(t):i.innerHTML=t):i.innerHTML="⋮",i.addEventListener("click",s=>{s.stopPropagation(),s.preventDefault(),this.loadPopupEvent(e.definition.headerPopup,s,e)}),e.titleElement.insertBefore(i,e.titleElement.firstChild)}loadPopupTableCellEvent(e,t,i){i._cell&&(i=i._cell),i.column.definition[e]&&this.loadPopupEvent(i.column.definition[e],t,i)}loadPopupTableColumnEvent(e,t,i){i._column&&(i=i._column),i.definition[e]&&this.loadPopupEvent(i.definition[e],t,i)}loadPopupEvent(e,t,i,s){var n;function r(o){n=o}i._group?i=i._group:i._row&&(i=i._row),e=typeof e=="function"?e.call(this.table,t,i.getComponent(),r):e,this.loadPopup(t,i,e,n,s)}loadPopup(e,t,i,s,n){var r=!(e instanceof MouseEvent),o,a;i instanceof HTMLElement?o=i:(o=document.createElement("div"),o.innerHTML=i),o.classList.add("tabulator-popup"),o.addEventListener("click",h=>{h.stopPropagation()}),r||e.preventDefault(),a=this.popup(o),typeof s=="function"&&a.renderCallback(s),e?a.show(e):a.show(t.getElement(),n||"center"),a.hideOnBlur(()=>{this.dispatchExternal("popupClosed",t.getComponent())}),this.dispatchExternal("popupOpened",t.getComponent())}}b(lt,"moduleName","popup");class ht extends w{constructor(e){super(e),this.element=!1,this.manualBlock=!1,this.beforeprintEventHandler=null,this.afterprintEventHandler=null,this.registerTableOption("printAsHtml",!1),this.registerTableOption("printFormatter",!1),this.registerTableOption("printHeader",!1),this.registerTableOption("printFooter",!1),this.registerTableOption("printStyled",!0),this.registerTableOption("printRowRange","visible"),this.registerTableOption("printConfig",{}),this.registerColumnOption("print"),this.registerColumnOption("titlePrint")}initialize(){this.table.options.printAsHtml&&(this.beforeprintEventHandler=this.replaceTable.bind(this),this.afterprintEventHandler=this.cleanup.bind(this),window.addEventListener("beforeprint",this.beforeprintEventHandler),window.addEventListener("afterprint",this.afterprintEventHandler),this.subscribe("table-destroy",this.destroy.bind(this))),this.registerTableFunction("print",this.printFullscreen.bind(this))}destroy(){this.table.options.printAsHtml&&(window.removeEventListener("beforeprint",this.beforeprintEventHandler),window.removeEventListener("afterprint",this.afterprintEventHandler))}replaceTable(){this.manualBlock||(this.element=document.createElement("div"),this.element.classList.add("tabulator-print-table"),this.element.appendChild(this.table.modules.export.generateTable(this.table.options.printConfig,this.table.options.printStyled,this.table.options.printRowRange,"print")),this.table.element.style.display="none",this.table.element.parentNode.insertBefore(this.element,this.table.element))}cleanup(){document.body.classList.remove("tabulator-print-fullscreen-hide"),this.element&&this.element.parentNode&&(this.element.parentNode.removeChild(this.element),this.table.element.style.display="")}printFullscreen(e,t,i){var s=window.scrollX,n=window.scrollY,r=document.createElement("div"),o=document.createElement("div"),a=this.table.modules.export.generateTable(typeof i<"u"?i:this.table.options.printConfig,typeof t<"u"?t:this.table.options.printStyled,e||this.table.options.printRowRange,"print"),h,d;this.manualBlock=!0,this.element=document.createElement("div"),this.element.classList.add("tabulator-print-fullscreen"),this.table.options.printHeader&&(r.classList.add("tabulator-print-header"),h=typeof this.table.options.printHeader=="function"?this.table.options.printHeader.call(this.table):this.table.options.printHeader,typeof h=="string"?r.innerHTML=h:r.appendChild(h),this.element.appendChild(r)),this.element.appendChild(a),this.table.options.printFooter&&(o.classList.add("tabulator-print-footer"),d=typeof this.table.options.printFooter=="function"?this.table.options.printFooter.call(this.table):this.table.options.printFooter,typeof d=="string"?o.innerHTML=d:o.appendChild(d),this.element.appendChild(o)),document.body.classList.add("tabulator-print-fullscreen-hide"),document.body.appendChild(this.element),this.table.options.printFormatter&&this.table.options.printFormatter(this.element,a),window.print(),this.cleanup(),window.scrollTo(s,n),this.manualBlock=!1}}b(ht,"moduleName","print");class dt extends w{constructor(e){super(e),this.data=!1,this.blocked=!1,this.origFuncs={},this.currentVersion=0,this.registerTableOption("reactiveData",!1)}initialize(){this.table.options.reactiveData&&(this.subscribe("cell-value-save-before",this.block.bind(this,"cellsave")),this.subscribe("cell-value-save-after",this.unblock.bind(this,"cellsave")),this.subscribe("row-data-save-before",this.block.bind(this,"rowsave")),this.subscribe("row-data-save-after",this.unblock.bind(this,"rowsave")),this.subscribe("row-data-init-after",this.watchRow.bind(this)),this.subscribe("data-processing",this.watchData.bind(this)),this.subscribe("table-destroy",this.unwatchData.bind(this)))}watchData(e){var t=this,i;this.currentVersion++,i=this.currentVersion,this.unwatchData(),this.data=e,this.origFuncs.push=e.push,Object.defineProperty(this.data,"push",{enumerable:!1,configurable:!0,value:function(){var s=Array.from(arguments),n;return!t.blocked&&i===t.currentVersion&&(t.block("data-push"),s.forEach(r=>{t.table.rowManager.addRowActual(r,!1)}),n=t.origFuncs.push.apply(e,arguments),t.unblock("data-push")),n}}),this.origFuncs.unshift=e.unshift,Object.defineProperty(this.data,"unshift",{enumerable:!1,configurable:!0,value:function(){var s=Array.from(arguments),n;return!t.blocked&&i===t.currentVersion&&(t.block("data-unshift"),s.forEach(r=>{t.table.rowManager.addRowActual(r,!0)}),n=t.origFuncs.unshift.apply(e,arguments),t.unblock("data-unshift")),n}}),this.origFuncs.shift=e.shift,Object.defineProperty(this.data,"shift",{enumerable:!1,configurable:!0,value:function(){var s,n;return!t.blocked&&i===t.currentVersion&&(t.block("data-shift"),t.data.length&&(s=t.table.rowManager.getRowFromDataObject(t.data[0]),s&&s.deleteActual()),n=t.origFuncs.shift.call(e),t.unblock("data-shift")),n}}),this.origFuncs.pop=e.pop,Object.defineProperty(this.data,"pop",{enumerable:!1,configurable:!0,value:function(){var s,n;return!t.blocked&&i===t.currentVersion&&(t.block("data-pop"),t.data.length&&(s=t.table.rowManager.getRowFromDataObject(t.data[t.data.length-1]),s&&s.deleteActual()),n=t.origFuncs.pop.call(e),t.unblock("data-pop")),n}}),this.origFuncs.splice=e.splice,Object.defineProperty(this.data,"splice",{enumerable:!1,configurable:!0,value:function(){var s=Array.from(arguments),n=s[0]<0?e.length+s[0]:s[0],r=s[1],o=s[2]?s.slice(2):!1,a,h;if(!t.blocked&&i===t.currentVersion){if(t.block("data-splice"),o&&(a=e[n]?t.table.rowManager.getRowFromDataObject(e[n]):!1,a?o.forEach(u=>{t.table.rowManager.addRowActual(u,!0,a,!0)}):(o=o.slice().reverse(),o.forEach(u=>{t.table.rowManager.addRowActual(u,!0,!1,!0)}))),r!==0){var d=e.slice(n,typeof s[1]>"u"?s[1]:n+r);d.forEach((u,c)=>{var f=t.table.rowManager.getRowFromDataObject(u);f&&f.deleteActual(c!==d.length-1)})}(o||r!==0)&&t.table.rowManager.reRenderInPosition(),h=t.origFuncs.splice.apply(e,arguments),t.unblock("data-splice")}return h}})}unwatchData(){if(this.data!==!1)for(var e in this.origFuncs)Object.defineProperty(this.data,e,{enumerable:!0,configurable:!0,writable:!0,value:this.origFuncs.key})}watchRow(e){var t=e.getData();for(var i in t)this.watchKey(e,t,i);this.table.options.dataTree&&this.watchTreeChildren(e)}watchTreeChildren(e){var t=this,i=e.getData()[this.table.options.dataTreeChildField],s={};i&&(s.push=i.push,Object.defineProperty(i,"push",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-push");var n=s.push.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-push")}return n}}),s.unshift=i.unshift,Object.defineProperty(i,"unshift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-unshift");var n=s.unshift.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-unshift")}return n}}),s.shift=i.shift,Object.defineProperty(i,"shift",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-shift");var n=s.shift.call(i);this.rebuildTree(e),t.unblock("tree-shift")}return n}}),s.pop=i.pop,Object.defineProperty(i,"pop",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-pop");var n=s.pop.call(i);this.rebuildTree(e),t.unblock("tree-pop")}return n}}),s.splice=i.splice,Object.defineProperty(i,"splice",{enumerable:!1,configurable:!0,value:()=>{if(!t.blocked){t.block("tree-splice");var n=s.splice.apply(i,arguments);this.rebuildTree(e),t.unblock("tree-splice")}return n}}))}rebuildTree(e){this.table.modules.dataTree.initializeRow(e),this.table.modules.dataTree.layoutRow(e),this.table.rowManager.refreshActiveData("tree",!1,!0)}watchKey(e,t,i){var s=this,n=Object.getOwnPropertyDescriptor(t,i),r=t[i],o=this.currentVersion;Object.defineProperty(t,i,{set:a=>{if(r=a,!s.blocked&&o===s.currentVersion){s.block("key");var h={};h[i]=a,e.updateData(h),s.unblock("key")}n.set&&n.set(a)},get:()=>(n.get&&n.get(),r)})}unwatchRow(e){var t=e.getData();for(var i in t)Object.defineProperty(t,i,{value:t[i]})}block(e){this.blocked||(this.blocked=e)}unblock(e){this.blocked===e&&(this.blocked=!1)}}b(dt,"moduleName","reactiveData");class ut extends w{constructor(e){super(e),this.startColumn=!1,this.startX=!1,this.startWidth=!1,this.latestX=!1,this.handle=null,this.initialNextColumn=null,this.nextColumn=null,this.initialized=!1,this.registerColumnOption("resizable",!0),this.registerTableOption("resizableColumnFit",!1),this.registerTableOption("resizableColumnGuide",!1)}initialize(){this.subscribe("column-rendered",this.layoutColumnHeader.bind(this))}initializeEventWatchers(){this.initialized||(this.subscribe("cell-rendered",this.layoutCellHandles.bind(this)),this.subscribe("cell-delete",this.deInitializeComponent.bind(this)),this.subscribe("cell-height",this.resizeHandle.bind(this)),this.subscribe("column-moved",this.columnLayoutUpdated.bind(this)),this.subscribe("column-hide",this.deInitializeColumn.bind(this)),this.subscribe("column-show",this.columnLayoutUpdated.bind(this)),this.subscribe("column-width",this.columnWidthUpdated.bind(this)),this.subscribe("column-delete",this.deInitializeComponent.bind(this)),this.subscribe("column-height",this.resizeHandle.bind(this)),this.initialized=!0)}layoutCellHandles(e){e.row.type==="row"&&(this.deInitializeComponent(e),this.initializeColumn("cell",e,e.column,e.element))}layoutColumnHeader(e){e.definition.resizable&&(this.initializeEventWatchers(),this.deInitializeComponent(e),this.initializeColumn("header",e,e,e.element))}columnLayoutUpdated(e){var t=e.prevColumn();this.reinitializeColumn(e),t&&this.reinitializeColumn(t)}columnWidthUpdated(e){e.modules.frozen&&(this.table.modules.frozenColumns.leftColumns.includes(e)?this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.reinitializeColumn(t)}):this.table.modules.frozenColumns.rightColumns.includes(e)&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.reinitializeColumn(t)}))}frozenColumnOffset(e){var t=!1;return e.modules.frozen&&(t=e.modules.frozen.marginValue,e.modules.frozen.position==="left"?t+=e.getWidth()-3:t&&(t-=3)),t!==!1?t+"px":!1}reinitializeColumn(e){var t=this.frozenColumnOffset(e);e.cells.forEach(i=>{i.modules.resize&&i.modules.resize.handleEl&&(t&&(i.modules.resize.handleEl.style[e.modules.frozen.position]=t,i.modules.resize.handleEl.style["z-index"]=11),i.element.after(i.modules.resize.handleEl))}),e.modules.resize&&e.modules.resize.handleEl&&(t&&(e.modules.resize.handleEl.style[e.modules.frozen.position]=t),e.element.after(e.modules.resize.handleEl))}initializeColumn(e,t,i,s){var n=this,r=!1,o=i.definition.resizable,a={},h=i.getLastColumn();if(e==="header"&&(r=i.definition.formatter=="textarea"||i.definition.variableHeight,a={variableHeight:r}),(o===!0||o==e)&&this._checkResizability(h)){var d=document.createElement("span");d.className="tabulator-col-resize-handle",d.addEventListener("click",function(c){c.stopPropagation()});var u=function(c){n.startColumn=i,n.initialNextColumn=n.nextColumn=h.nextColumn(),n._mouseDown(c,h,d)};d.addEventListener("mousedown",u),d.addEventListener("touchstart",u,{passive:!0}),d.addEventListener("dblclick",c=>{var f=h.getWidth();c.stopPropagation(),h.reinitializeWidth(!0),f!==h.getWidth()&&(n.dispatch("column-resized",h),n.dispatchExternal("columnResized",h.getComponent()))}),i.modules.frozen&&(d.style.position="sticky",d.style[i.modules.frozen.position]=this.frozenColumnOffset(i)),a.handleEl=d,s.parentNode&&i.visible&&s.after(d)}t.modules.resize=a}deInitializeColumn(e){this.deInitializeComponent(e),e.cells.forEach(t=>{this.deInitializeComponent(t)})}deInitializeComponent(e){var t;e.modules.resize&&(t=e.modules.resize.handleEl,t&&t.parentElement&&t.parentElement.removeChild(t))}resizeHandle(e,t){e.modules.resize&&e.modules.resize.handleEl&&(e.modules.resize.handleEl.style.height=t)}resize(e,t){var i=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,s=i-this.startX,n=i-this.latestX,r,o;if(this.latestX=i,this.table.rtl&&(s=-s,n=-n),r=t.width==t.minWidth||t.width==t.maxWidth,t.setWidth(this.startWidth+s),o=t.width==t.minWidth||t.width==t.maxWidth,n<0&&(this.nextColumn=this.initialNextColumn),this.table.options.resizableColumnFit&&this.nextColumn&&!(r&&o)){let a=this.nextColumn.getWidth();n>0&&a<=this.nextColumn.minWidth&&(this.nextColumn=this.nextColumn.nextColumn()),this.nextColumn&&this.nextColumn.setWidth(this.nextColumn.getWidth()-n)}this.table.columnManager.rerenderColumns(!0),!this.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights()}calcGuidePosition(e,t,i){var s=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,n=i.getBoundingClientRect().x-this.table.element.getBoundingClientRect().x,r=this.table.element.getBoundingClientRect().x,o=t.element.getBoundingClientRect().left-r,a=s-this.startX,h=Math.max(n+a,o+t.minWidth);return t.maxWidth&&(h=Math.min(h,o+t.maxWidth)),h}_checkResizability(e){return e.definition.resizable}_mouseDown(e,t,i){var s=this,n;this.dispatchExternal("columnResizing",t.getComponent()),s.table.options.resizableColumnGuide&&(n=document.createElement("span"),n.classList.add("tabulator-col-resize-guide"),s.table.element.appendChild(n),setTimeout(()=>{n.style.left=s.calcGuidePosition(e,t,i)+"px"})),s.table.element.classList.add("tabulator-block-select");function r(a){s.table.options.resizableColumnGuide?n.style.left=s.calcGuidePosition(a,t,i)+"px":s.resize(a,t)}function o(a){s.table.options.resizableColumnGuide&&(s.resize(a,t),n.remove()),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!1),s.table.browserSlow&&t.modules.resize&&t.modules.resize.variableHeight&&t.checkCellHeights(),document.body.removeEventListener("mouseup",o),document.body.removeEventListener("mousemove",r),i.removeEventListener("touchmove",r),i.removeEventListener("touchend",o),s.table.element.classList.remove("tabulator-block-select"),s.startWidth!==t.getWidth()&&(s.table.columnManager.verticalAlignHeaders(),s.dispatch("column-resized",t),s.dispatchExternal("columnResized",t.getComponent()))}e.stopPropagation(),s.startColumn.modules.edit&&(s.startColumn.modules.edit.blocked=!0),s.startX=typeof e.clientX>"u"?e.touches[0].clientX:e.clientX,s.latestX=s.startX,s.startWidth=t.getWidth(),document.body.addEventListener("mousemove",r),document.body.addEventListener("mouseup",o),i.addEventListener("touchmove",r,{passive:!0}),i.addEventListener("touchend",o)}}b(ut,"moduleName","resizeColumns");class ct extends w{constructor(e){super(e),this.startColumn=!1,this.startY=!1,this.startHeight=!1,this.handle=null,this.prevHandle=null,this.registerTableOption("resizableRows",!1),this.registerTableOption("resizableRowGuide",!1)}initialize(){this.table.options.resizableRows&&this.subscribe("row-layout-after",this.initializeRow.bind(this))}initializeRow(e){var t=this,i=e.getElement(),s=document.createElement("div");s.className="tabulator-row-resize-handle";var n=document.createElement("div");n.className="tabulator-row-resize-handle prev",s.addEventListener("click",function(a){a.stopPropagation()});var r=function(a){t.startRow=e,t._mouseDown(a,e,s)};s.addEventListener("mousedown",r),s.addEventListener("touchstart",r,{passive:!0}),n.addEventListener("click",function(a){a.stopPropagation()});var o=function(a){var h=t.table.rowManager.prevDisplayRow(e);h&&(t.startRow=h,t._mouseDown(a,h,n))};n.addEventListener("mousedown",o),n.addEventListener("touchstart",o,{passive:!0}),i.appendChild(s),i.appendChild(n)}resize(e,t){t.setHeight(this.startHeight+((typeof e.screenY>"u"?e.touches[0].screenY:e.screenY)-this.startY))}calcGuidePosition(e,t,i){var s=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,n=i.getBoundingClientRect().y-this.table.element.getBoundingClientRect().y,r=this.table.element.getBoundingClientRect().y,o=t.element.getBoundingClientRect().top-r,a=s-this.startY;return Math.max(n+a,o)}_mouseDown(e,t,i){var s=this,n;s.dispatchExternal("rowResizing",t.getComponent()),s.table.options.resizableRowGuide&&(n=document.createElement("span"),n.classList.add("tabulator-row-resize-guide"),s.table.element.appendChild(n),setTimeout(()=>{n.style.top=s.calcGuidePosition(e,t,i)+"px"})),s.table.element.classList.add("tabulator-block-select");function r(a){s.table.options.resizableRowGuide?n.style.top=s.calcGuidePosition(a,t,i)+"px":s.resize(a,t)}function o(a){s.table.options.resizableRowGuide&&(s.resize(a,t),n.remove()),document.body.removeEventListener("mouseup",r),document.body.removeEventListener("mousemove",r),i.removeEventListener("touchmove",r),i.removeEventListener("touchend",o),s.table.element.classList.remove("tabulator-block-select"),s.dispatchExternal("rowResized",t.getComponent())}e.stopPropagation(),s.startY=typeof e.screenY>"u"?e.touches[0].screenY:e.screenY,s.startHeight=t.getHeight(),document.body.addEventListener("mousemove",r),document.body.addEventListener("mouseup",o),i.addEventListener("touchmove",r,{passive:!0}),i.addEventListener("touchend",o)}}b(ct,"moduleName","resizeRows");class ft extends w{constructor(e){super(e),this.binding=!1,this.visibilityObserver=!1,this.resizeObserver=!1,this.containerObserver=!1,this.tableHeight=0,this.tableWidth=0,this.containerHeight=0,this.containerWidth=0,this.autoResize=!1,this.visible=!1,this.initialized=!1,this.initialRedraw=!1,this.registerTableOption("autoResize",!0)}initialize(){if(this.table.options.autoResize){var e=this.table,t;this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),typeof IntersectionObserver<"u"&&typeof ResizeObserver<"u"&&e.rowManager.getRenderMode()==="virtual"?(this.initializeVisibilityObserver(),this.autoResize=!0,this.resizeObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell)){var s=Math.floor(i[0].contentRect.height),n=Math.floor(i[0].contentRect.width);(this.tableHeight!=s||this.tableWidth!=n)&&(this.tableHeight=s,this.tableWidth=n,e.element.parentNode&&(this.containerHeight=e.element.parentNode.clientHeight,this.containerWidth=e.element.parentNode.clientWidth),this.redrawTable())}}),this.resizeObserver.observe(e.element),t=window.getComputedStyle(e.element),this.table.element.parentNode&&!this.table.rowManager.fixedHeight&&(t.getPropertyValue("max-height")||t.getPropertyValue("min-height"))&&(this.containerObserver=new ResizeObserver(i=>{if(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell)){var s=Math.floor(i[0].contentRect.height),n=Math.floor(i[0].contentRect.width);(this.containerHeight!=s||this.containerWidth!=n)&&(this.containerHeight=s,this.containerWidth=n,this.tableHeight=e.element.clientHeight,this.tableWidth=e.element.clientWidth),this.redrawTable()}}),this.containerObserver.observe(this.table.element.parentNode)),this.subscribe("table-resize",this.tableResized.bind(this))):(this.binding=function(){(!e.browserMobile||e.browserMobile&&(!e.modules.edit||e.modules.edit&&!e.modules.edit.currentCell))&&(e.columnManager.rerenderColumns(!0),e.redraw())},window.addEventListener("resize",this.binding)),this.subscribe("table-destroy",this.clearBindings.bind(this))}}initializeVisibilityObserver(){this.visibilityObserver=new IntersectionObserver(e=>{this.visible=e[0].isIntersecting,this.initialized?this.visible&&(this.redrawTable(this.initialRedraw),this.initialRedraw=!1):(this.initialized=!0,this.initialRedraw=!this.visible)}),this.visibilityObserver.observe(this.table.element)}redrawTable(e){this.initialized&&this.visible&&(this.table.columnManager.rerenderColumns(!0),this.table.redraw(e))}tableResized(){this.table.rowManager.redraw()}clearBindings(){this.binding&&window.removeEventListener("resize",this.binding),this.resizeObserver&&this.resizeObserver.unobserve(this.table.element),this.visibilityObserver&&this.visibilityObserver.unobserve(this.table.element),this.containerObserver&&this.containerObserver.unobserve(this.table.element.parentNode)}}b(ft,"moduleName","resizeTable");function Yi(l,e,t){var i=document.createElement("div"),s=l.getRow()._row.modules.responsiveLayout;i.classList.add("tabulator-responsive-collapse-toggle"),i.innerHTML=` + + + + + + +`,l.getElement().classList.add("tabulator-row-handle");function n(r){var o=s.element;s.open=r,o&&(s.open?(i.classList.add("open"),o.style.display=""):(i.classList.remove("open"),o.style.display="none"))}return i.addEventListener("click",function(r){r.stopImmediatePropagation(),n(!s.open),l.getTable().rowManager.adjustTableSize()}),n(s.open),i}var $i={format:{formatters:{responsiveCollapse:Yi}}};class De extends w{constructor(e){super(e),this.columns=[],this.hiddenColumns=[],this.mode="",this.index=0,this.collapseFormatter=[],this.collapseStartOpen=!0,this.collapseHandleColumn=!1,this.registerTableOption("responsiveLayout",!1),this.registerTableOption("responsiveLayoutCollapseStartOpen",!0),this.registerTableOption("responsiveLayoutCollapseUseFormatters",!0),this.registerTableOption("responsiveLayoutCollapseFormatter",!1),this.registerColumnOption("responsive")}initialize(){this.table.options.responsiveLayout&&(this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("column-show",this.updateColumnVisibility.bind(this)),this.subscribe("column-hide",this.updateColumnVisibility.bind(this)),this.subscribe("columns-loaded",this.initializeResponsivity.bind(this)),this.subscribe("column-moved",this.initializeResponsivity.bind(this)),this.subscribe("column-add",this.initializeResponsivity.bind(this)),this.subscribe("column-delete",this.initializeResponsivity.bind(this)),this.subscribe("table-redrawing",this.tableRedraw.bind(this)),this.table.options.responsiveLayout==="collapse"&&(this.subscribe("row-data-changed",this.generateCollapsedRowContent.bind(this)),this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-layout",this.layoutRow.bind(this))))}tableRedraw(e){["fitColumns","fitDataStretch"].indexOf(this.layoutMode())===-1&&(e||this.update())}initializeResponsivity(){var e=[];this.mode=this.table.options.responsiveLayout,this.collapseFormatter=this.table.options.responsiveLayoutCollapseFormatter||this.formatCollapsedData,this.collapseStartOpen=this.table.options.responsiveLayoutCollapseStartOpen,this.hiddenColumns=[],this.collapseFormatter&&(this.collapseFormatter=this.collapseFormatter.bind(this.table)),this.table.columnManager.columnsByIndex.forEach((t,i)=>{t.modules.responsive&&t.modules.responsive.order&&t.modules.responsive.visible&&(t.modules.responsive.index=i,e.push(t),!t.visible&&this.mode==="collapse"&&this.hiddenColumns.push(t))}),e=e.reverse(),e=e.sort((t,i)=>{var s=i.modules.responsive.order-t.modules.responsive.order;return s||i.modules.responsive.index-t.modules.responsive.index}),this.columns=e,this.mode==="collapse"&&this.generateCollapsedContent();for(let t of this.table.columnManager.columnsByIndex)if(t.definition.formatter=="responsiveCollapse"){this.collapseHandleColumn=t;break}this.collapseHandleColumn&&(this.hiddenColumns.length?this.collapseHandleColumn.show():this.collapseHandleColumn.hide())}initializeColumn(e){var t=e.getDefinition();e.modules.responsive={order:typeof t.responsive>"u"?1:t.responsive,visible:t.visible!==!1}}initializeRow(e){var t;e.type!=="calc"&&(t=document.createElement("div"),t.classList.add("tabulator-responsive-collapse"),e.modules.responsiveLayout={element:t,open:this.collapseStartOpen},this.collapseStartOpen||(t.style.display="none"))}layoutRow(e){var t=e.getElement();e.modules.responsiveLayout&&(t.appendChild(e.modules.responsiveLayout.element),this.generateCollapsedRowContent(e))}updateColumnVisibility(e,t){!t&&e.modules.responsive&&(e.modules.responsive.visible=e.visible,this.initializeResponsivity())}hideColumn(e){var t=this.hiddenColumns.length;e.hide(!1,!0),this.mode==="collapse"&&(this.hiddenColumns.unshift(e),this.generateCollapsedContent(),this.collapseHandleColumn&&!t&&this.collapseHandleColumn.show())}showColumn(e){var t;e.show(!1,!0),e.setWidth(e.getWidth()),this.mode==="collapse"&&(t=this.hiddenColumns.indexOf(e),t>-1&&this.hiddenColumns.splice(t,1),this.generateCollapsedContent(),this.collapseHandleColumn&&!this.hiddenColumns.length&&this.collapseHandleColumn.hide())}update(){for(var e=!0;e;){let t=this.table.modules.layout.getMode()=="fitColumns"?this.table.columnManager.getFlexBaseWidth():this.table.columnManager.getWidth(),i=(this.table.options.headerVisible?this.table.columnManager.element.clientWidth:this.table.element.clientWidth)-t;if(i<0){let s=this.columns[this.index];s?(this.hideColumn(s),this.index++):e=!1}else{let s=this.columns[this.index-1];s&&i>0&&i>=s.getWidth()?(this.showColumn(s),this.index--):e=!1}this.table.rowManager.activeRowsCount||this.table.rowManager.renderEmptyScroll()}}generateCollapsedContent(){var e=this.table.rowManager.getDisplayRows();e.forEach(t=>{this.generateCollapsedRowContent(t)})}generateCollapsedRowContent(e){var t,i;if(e.modules.responsiveLayout){for(t=e.modules.responsiveLayout.element;t.firstChild;)t.removeChild(t.firstChild);i=this.collapseFormatter(this.generateCollapsedRowData(e)),i&&t.appendChild(i),e.calcHeight(!0)}}generateCollapsedRowData(e){var t=e.getData(),i=[],s;return this.hiddenColumns.forEach(n=>{var r=n.getFieldValue(t);if(n.definition.title&&n.field)if(n.modules.format&&this.table.options.responsiveLayoutCollapseUseFormatters){let o=function(a){a()};s={value:!1,data:{},getValue:function(){return r},getData:function(){return t},getType:function(){return"cell"},getElement:function(){return document.createElement("div")},getRow:function(){return e.getComponent()},getColumn:function(){return n.getComponent()},getTable:()=>this.table},i.push({field:n.field,title:n.definition.title,value:n.modules.format.formatter.call(this.table.modules.format,s,n.modules.format.params,o)})}else i.push({field:n.field,title:n.definition.title,value:r})}),i}formatCollapsedData(e){var t=document.createElement("table");return e.forEach(i=>{var s=document.createElement("tr"),n=document.createElement("td"),r=document.createElement("td"),o,a=document.createElement("strong");n.appendChild(a),this.modules.localize.bind("columns|"+i.field,function(h){a.innerHTML=h||i.title}),i.value instanceof Node?(o=document.createElement("div"),o.appendChild(i.value),r.appendChild(o)):r.innerHTML=i.value,s.appendChild(n),s.appendChild(r),t.appendChild(s)}),Object.keys(e).length?t:""}}b(De,"moduleName","responsiveLayout"),b(De,"moduleExtensions",$i);function Qi(l,e,t){var i=document.createElement("input"),s=!1;if(i.type="checkbox",i.setAttribute("aria-label","Select Row"),this.table.modExists("selectRow",!0))if(i.addEventListener("click",r=>{r.stopPropagation()}),typeof l.getRow=="function"){var n=l.getRow();n instanceof oe?(i.addEventListener("change",r=>{this.table.options.selectableRowsRangeMode==="click"&&s?s=!1:n.toggleSelect()}),this.table.options.selectableRowsRangeMode==="click"&&i.addEventListener("click",r=>{s=!0,this.table.modules.selectRow.handleComplexRowClick(n._row,r)}),i.checked=n.isSelected&&n.isSelected(),this.table.modules.selectRow.registerRowSelectCheckbox(n,i)):i=""}else i.addEventListener("change",r=>{this.table.modules.selectRow.selectedRows.length?this.table.deselectRow():this.table.selectRow(e.rowRange)}),this.table.modules.selectRow.registerHeaderSelectCheckbox(i);return i}var Zi={format:{formatters:{rowSelection:Qi}}};class ze extends w{constructor(e){super(e),this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],this.headerCheckboxElement=null,this.registerTableOption("selectableRows","highlight"),this.registerTableOption("selectableRowsRangeMode","drag"),this.registerTableOption("selectableRowsRollingSelection",!0),this.registerTableOption("selectableRowsPersistence",!0),this.registerTableOption("selectableRowsCheck",function(t,i){return!0}),this.registerTableFunction("selectRow",this.selectRows.bind(this)),this.registerTableFunction("deselectRow",this.deselectRows.bind(this)),this.registerTableFunction("toggleSelectRow",this.toggleRow.bind(this)),this.registerTableFunction("getSelectedRows",this.getSelectedRows.bind(this)),this.registerTableFunction("getSelectedData",this.getSelectedData.bind(this)),this.registerComponentFunction("row","select",this.selectRows.bind(this)),this.registerComponentFunction("row","deselect",this.deselectRows.bind(this)),this.registerComponentFunction("row","toggleSelect",this.toggleRow.bind(this)),this.registerComponentFunction("row","isSelected",this.isRowSelected.bind(this))}initialize(){this.deprecatedOptionsCheck(),this.table.options.selectableRows==="highlight"&&this.table.options.selectableRange&&(this.table.options.selectableRows=!1),this.table.options.selectableRows!==!1&&(this.subscribe("row-init",this.initializeRow.bind(this)),this.subscribe("row-deleting",this.rowDeleted.bind(this)),this.subscribe("rows-wipe",this.clearSelectionData.bind(this)),this.subscribe("rows-retrieve",this.rowRetrieve.bind(this)),this.table.options.selectableRows&&!this.table.options.selectableRowsPersistence&&this.subscribe("data-refreshing",this.deselectRows.bind(this)))}deprecatedOptionsCheck(){}rowRetrieve(e,t){return e==="selected"?this.selectedRows:t}rowDeleted(e){this._deselectRow(e,!0)}clearSelectionData(e){var t=this.selectedRows.length;this.selecting=!1,this.lastClickedRow=!1,this.selectPrev=[],this.selectedRows=[],t&&e!==!0&&this._rowSelectionChanged()}initializeRow(e){var t=this,i=t.checkRowSelectability(e),s=e.getElement(),n=function(){setTimeout(function(){t.selecting=!1},50),document.body.removeEventListener("mouseup",n)};e.modules.select={selected:!1},s.classList.toggle("tabulator-selectable",i),s.classList.toggle("tabulator-unselectable",!i),t.checkRowSelectability(e)&&t.table.options.selectableRows&&t.table.options.selectableRows!="highlight"&&(t.table.options.selectableRowsRangeMode==="click"?s.addEventListener("click",this.handleComplexRowClick.bind(this,e)):(s.addEventListener("click",function(r){(!t.table.modExists("edit")||!t.table.modules.edit.getCurrentCell())&&t.table._clearSelection(),t.selecting||t.toggleRow(e)}),s.addEventListener("mousedown",function(r){if(r.shiftKey)return t.table._clearSelection(),t.selecting=!0,t.selectPrev=[],document.body.addEventListener("mouseup",n),document.body.addEventListener("keyup",n),t.toggleRow(e),!1}),s.addEventListener("mouseenter",function(r){t.selecting&&(t.table._clearSelection(),t.toggleRow(e),t.selectPrev[1]==e&&t.toggleRow(t.selectPrev[0]))}),s.addEventListener("mouseout",function(r){t.selecting&&(t.table._clearSelection(),t.selectPrev.unshift(e))})))}handleComplexRowClick(e,t){if(t.shiftKey){this.table._clearSelection(),this.lastClickedRow=this.lastClickedRow||e;var i=this.table.rowManager.getDisplayRowIndex(this.lastClickedRow),s=this.table.rowManager.getDisplayRowIndex(e),n=i<=s?i:s,r=i>=s?i:s,o=this.table.rowManager.getDisplayRows().slice(0),a=o.splice(n,r-n+1);t.ctrlKey||t.metaKey?(a.forEach(h=>{h!==this.lastClickedRow&&(this.table.options.selectableRows!==!0&&!this.isRowSelected(e)?this.selectedRows.lengththis.table.options.selectableRows&&(a=a.slice(0,this.table.options.selectableRows)),this.selectRows(a)),this.table._clearSelection()}else t.ctrlKey||t.metaKey?(this.toggleRow(e),this.lastClickedRow=e):(this.deselectRows(void 0,!0),this.selectRows(e),this.lastClickedRow=e)}checkRowSelectability(e){return e&&e.type==="row"?this.table.options.selectableRowsCheck.call(this.table,e.getComponent()):!1}toggleRow(e){this.checkRowSelectability(e)&&(e.modules.select&&e.modules.select.selected?this._deselectRow(e):this._selectRow(e))}selectRows(e){var t=[],i,s;switch(typeof e){case"undefined":i=this.table.rowManager.rows;break;case"number":i=this.table.rowManager.findRow(e);break;case"string":i=this.table.rowManager.findRow(e),i||(i=this.table.rowManager.getRows(e));break;default:i=e;break}Array.isArray(i)?i.length&&(i.forEach(n=>{s=this._selectRow(n,!0,!0),s&&t.push(s)}),this._rowSelectionChanged(!1,t)):i&&this._selectRow(i,!1,!0)}_selectRow(e,t,i){if(!isNaN(this.table.options.selectableRows)&&this.table.options.selectableRows!==!0&&!i&&this.selectedRows.length>=this.table.options.selectableRows)if(this.table.options.selectableRowsRollingSelection)this._deselectRow(this.selectedRows[0]);else return!1;var s=this.table.rowManager.findRow(e);if(s){if(this.selectedRows.indexOf(s)==-1)return s.getElement().classList.add("tabulator-selected"),s.modules.select||(s.modules.select={}),s.modules.select.selected=!0,s.modules.select.checkboxEl&&(s.modules.select.checkboxEl.checked=!0),this.selectedRows.push(s),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(s,!0),this.dispatchExternal("rowSelected",s.getComponent()),this._rowSelectionChanged(t,s),s}else t||console.warn("Selection Error - No such row found, ignoring selection:"+e)}isRowSelected(e){return this.selectedRows.indexOf(e)!==-1}deselectRows(e,t){var i=[],s,n;switch(typeof e){case"undefined":s=Object.assign([],this.selectedRows);break;case"number":s=this.table.rowManager.findRow(e);break;case"string":s=this.table.rowManager.findRow(e),s||(s=this.table.rowManager.getRows(e));break;default:s=e;break}Array.isArray(s)?s.length&&(s.forEach(r=>{n=this._deselectRow(r,!0,!0),n&&i.push(n)}),this._rowSelectionChanged(t,[],i)):s&&this._deselectRow(s,t,!0)}_deselectRow(e,t){var i=this,s=i.table.rowManager.findRow(e),n,r;if(s){if(n=i.selectedRows.findIndex(function(o){return o==s}),n>-1)return r=s.getElement(),r&&r.classList.remove("tabulator-selected"),s.modules.select||(s.modules.select={}),s.modules.select.selected=!1,s.modules.select.checkboxEl&&(s.modules.select.checkboxEl.checked=!1),i.selectedRows.splice(n,1),this.table.options.dataTreeSelectPropagate&&this.childRowSelection(s,!1),this.dispatchExternal("rowDeselected",s.getComponent()),i._rowSelectionChanged(t,void 0,s),s}else t||console.warn("Deselection Error - No such row found, ignoring selection:"+e)}getSelectedData(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getData())}),e}getSelectedRows(){var e=[];return this.selectedRows.forEach(function(t){e.push(t.getComponent())}),e}_rowSelectionChanged(e,t=[],i=[]){this.headerCheckboxElement&&(this.selectedRows.length===0?(this.headerCheckboxElement.checked=!1,this.headerCheckboxElement.indeterminate=!1):this.table.rowManager.rows.length===this.selectedRows.length?(this.headerCheckboxElement.checked=!0,this.headerCheckboxElement.indeterminate=!1):(this.headerCheckboxElement.indeterminate=!0,this.headerCheckboxElement.checked=!1)),e||(Array.isArray(t)||(t=[t]),t=t.map(s=>s.getComponent()),Array.isArray(i)||(i=[i]),i=i.map(s=>s.getComponent()),this.dispatchExternal("rowSelectionChanged",this.getSelectedData(),this.getSelectedRows(),t,i))}registerRowSelectCheckbox(e,t){e._row.modules.select||(e._row.modules.select={}),e._row.modules.select.checkboxEl=t}registerHeaderSelectCheckbox(e){this.headerCheckboxElement=e}childRowSelection(e,t){var i=this.table.modules.dataTree.getChildren(e,!0,!0);if(t)for(let s of i)this._selectRow(s,!0);else for(let s of i)this._deselectRow(s,!0)}}b(ze,"moduleName","selectRow"),b(ze,"moduleExtensions",Zi);class es{constructor(e){return this._range=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._range.table.componentFunctionBinder.handle("range",t._range,i)}})}getElement(){return this._range.element}getData(){return this._range.getData()}getCells(){return this._range.getCells(!0,!0)}getStructuredCells(){return this._range.getStructuredCells()}getRows(){return this._range.getRows().map(e=>e.getComponent())}getColumns(){return this._range.getColumns().map(e=>e.getComponent())}getBounds(){return this._range.getBounds()}getTopEdge(){return this._range.top}getBottomEdge(){return this._range.bottom}getLeftEdge(){return this._range.left}getRightEdge(){return this._range.right}setBounds(e,t){this._range.destroyedGuard("setBounds")&&this._range.setBounds(e&&e._cell,t&&t._cell)}setStartBound(e){this._range.destroyedGuard("setStartBound")&&(this._range.setEndBound(e&&e._cell),this._range.rangeManager.layoutElement())}setEndBound(e){this._range.destroyedGuard("setEndBound")&&(this._range.setEndBound(e&&e._cell),this._range.rangeManager.layoutElement())}clearValues(){this._range.destroyedGuard("clearValues")&&this._range.clearValues()}remove(){this._range.destroyedGuard("remove")&&this._range.destroy(!0)}}class ts extends M{constructor(e,t,i,s){super(e),this.rangeManager=t,this.element=null,this.initialized=!1,this.initializing={start:!1,end:!1},this.destroyed=!1,this.top=0,this.bottom=0,this.left=0,this.right=0,this.table=e,this.start={row:0,col:0},this.end={row:0,col:0},this.rangeManager.rowHeader&&(this.left=1,this.right=1,this.start.col=1,this.end.col=1),this.initElement(),setTimeout(()=>{this.initBounds(i,s)})}initElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-range")}initBounds(e,t){this._updateMinMax(),e&&this.setBounds(e,t||e)}setStart(e,t){(this.start.row!==e||this.start.col!==t)&&(this.start.row=e,this.start.col=t,this.initializing.start=!0,this._updateMinMax())}setEnd(e,t){(this.end.row!==e||this.end.col!==t)&&(this.end.row=e,this.end.col=t,this.initializing.end=!0,this._updateMinMax())}setBounds(e,t,i){e&&this.setStartBound(e),this.setEndBound(t||e),this.rangeManager.layoutElement(i)}setStartBound(e){var t,i;e.type==="column"?this.rangeManager.columnSelection&&this.setStart(0,e.getPosition()-1):(t=e.row.position-1,i=e.column.getPosition()-1,e.column===this.rangeManager.rowHeader?this.setStart(t,1):this.setStart(t,i))}setEndBound(e){var t=this._getTableRows().length,i,s,n;e.type==="column"?this.rangeManager.columnSelection&&(this.rangeManager.selecting==="column"?this.setEnd(t-1,e.getPosition()-1):this.rangeManager.selecting==="cell"&&this.setEnd(0,e.getPosition()-1)):(i=e.row.position-1,s=e.column.getPosition()-1,n=e.column===this.rangeManager.rowHeader,this.rangeManager.selecting==="row"?this.setEnd(i,this._getTableColumns().length-1):this.rangeManager.selecting!=="row"&&n?this.setEnd(i,0):this.rangeManager.selecting==="column"?this.setEnd(t-1,s):this.setEnd(i,s))}_updateMinMax(){this.top=Math.min(this.start.row,this.end.row),this.bottom=Math.max(this.start.row,this.end.row),this.left=Math.min(this.start.col,this.end.col),this.right=Math.max(this.start.col,this.end.col),this.initialized?this.dispatchExternal("rangeChanged",this.getComponent()):this.initializing.start&&this.initializing.end&&(this.initialized=!0,this.dispatchExternal("rangeAdded",this.getComponent()))}_getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}_getTableRows(){return this.table.rowManager.getDisplayRows().filter(e=>e.type==="row")}layout(){var e=this.table.rowManager.renderer.vDomTop,t=this.table.rowManager.renderer.vDomBottom,i=this.table.columnManager.renderer.leftCol,s=this.table.columnManager.renderer.rightCol,n,r,o,a,h,d,u,c,f,g;this.table.options.renderHorizontal==="virtual"&&this.rangeManager.rowHeader&&(s+=1),e==null&&(e=0),t==null&&(t=1/0),i==null&&(i=0),s==null&&(s=1/0),this.overlaps(i,e,s,t)&&(n=Math.max(this.top,e),r=Math.min(this.bottom,t),o=Math.max(this.left,i),a=Math.min(this.right,s),h=this.rangeManager.getCell(n,o),d=this.rangeManager.getCell(r,a),u=h.getElement(),c=d.getElement(),f=h.row.getElement(),g=d.row.getElement(),this.element.classList.add("tabulator-range-active"),this.table.rtl?(this.element.style.right=f.offsetWidth-u.offsetLeft-u.offsetWidth+"px",this.element.style.width=u.offsetLeft+u.offsetWidth-c.offsetLeft+"px"):(this.element.style.left=f.offsetLeft+u.offsetLeft+"px",this.element.style.width=c.offsetLeft+c.offsetWidth-u.offsetLeft+"px"),this.element.style.top=f.offsetTop+"px",this.element.style.height=g.offsetTop+g.offsetHeight-f.offsetTop+"px")}atTopLeft(e){return e.row.position-1===this.top&&e.column.getPosition()-1===this.left}atBottomRight(e){return e.row.position-1===this.bottom&&e.column.getPosition()-1===this.right}occupies(e){return this.occupiesRow(e.row)&&this.occupiesColumn(e.column)}occupiesRow(e){return this.top<=e.position-1&&e.position-1<=this.bottom}occupiesColumn(e){return this.left<=e.getPosition()-1&&e.getPosition()-1<=this.right}overlaps(e,t,i,s){return!(this.left>i||e>this.right||this.top>s||t>this.bottom)}getData(){var e=[],t=this.getRows(),i=this.getColumns();return t.forEach(s=>{var n=s.getData(),r={};i.forEach(o=>{r[o.field]=n[o.field]}),e.push(r)}),e}getCells(e,t){var i=[],s=this.getRows(),n=this.getColumns();return e?i=s.map(r=>{var o=[];return r.getCells().forEach(a=>{n.includes(a.column)&&o.push(t?a.getComponent():a)}),o}):s.forEach(r=>{r.getCells().forEach(o=>{n.includes(o.column)&&i.push(t?o.getComponent():o)})}),i}getStructuredCells(){return this.getCells(!0,!0)}getRows(){return this._getTableRows().slice(this.top,this.bottom+1)}getColumns(){return this._getTableColumns().slice(this.left,this.right+1)}clearValues(){var e=this.getCells(),t=this.table.options.selectableRangeClearCellsValue;this.table.blockRedraw(),e.forEach(i=>{i.setValue(t)}),this.table.restoreRedraw()}getBounds(e){var t=this.getCells(!1,e),i={start:null,end:null};return t.length?(i.start=t[0],i.end=t[t.length-1]):console.warn("No bounds defined on range"),i}getComponent(){return this.component||(this.component=new es(this)),this.component}destroy(e){this.destroyed=!0,this.element.remove(),e&&this.rangeManager.rangeRemoved(this),this.initialized&&this.dispatchExternal("rangeRemoved",this.getComponent())}destroyedGuard(e){return this.destroyed&&console.warn("You cannot call the "+e+" function on a destroyed range"),!this.destroyed}}var is={rangeJumpUp:["ctrl + 38","meta + 38"],rangeJumpDown:["ctrl + 40","meta + 40"],rangeJumpLeft:["ctrl + 37","meta + 37"],rangeJumpRight:["ctrl + 39","meta + 39"],rangeExpandUp:"shift + 38",rangeExpandDown:"shift + 40",rangeExpandLeft:"shift + 37",rangeExpandRight:"shift + 39",rangeExpandJumpUp:["ctrl + shift + 38","meta + shift + 38"],rangeExpandJumpDown:["ctrl + shift + 40","meta + shift + 40"],rangeExpandJumpLeft:["ctrl + shift + 37","meta + shift + 37"],rangeExpandJumpRight:["ctrl + shift + 39","meta + shift + 39"]},ss={rangeJumpLeft:function(l){this.dispatch("keybinding-nav-range",l,"left",!0,!1)},rangeJumpRight:function(l){this.dispatch("keybinding-nav-range",l,"right",!0,!1)},rangeJumpUp:function(l){this.dispatch("keybinding-nav-range",l,"up",!0,!1)},rangeJumpDown:function(l){this.dispatch("keybinding-nav-range",l,"down",!0,!1)},rangeExpandLeft:function(l){this.dispatch("keybinding-nav-range",l,"left",!1,!0)},rangeExpandRight:function(l){this.dispatch("keybinding-nav-range",l,"right",!1,!0)},rangeExpandUp:function(l){this.dispatch("keybinding-nav-range",l,"up",!1,!0)},rangeExpandDown:function(l){this.dispatch("keybinding-nav-range",l,"down",!1,!0)},rangeExpandJumpLeft:function(l){this.dispatch("keybinding-nav-range",l,"left",!0,!0)},rangeExpandJumpRight:function(l){this.dispatch("keybinding-nav-range",l,"right",!0,!0)},rangeExpandJumpUp:function(l){this.dispatch("keybinding-nav-range",l,"up",!0,!0)},rangeExpandJumpDown:function(l){this.dispatch("keybinding-nav-range",l,"down",!0,!0)}},ns={range:function(l){var e=[],t=this.table.modules.selectRange.activeRange,i=!1,s,n,r,o,a;return a=l.length,t&&(s=t.getBounds(),n=s.start,s.start===s.end&&(i=!0),n&&(e=this.table.rowManager.activeRows.slice(),r=e.indexOf(n.row),i?o=l.length:o=e.indexOf(s.end.row)-r+1,r>-1&&(this.table.blockRedraw(),e=e.slice(r,r+o),e.forEach((h,d)=>{h.updateData(l[d%a])}),this.table.restoreRedraw()))),e}},rs={range:function(l){var e=[],t=[],i=this.table.modules.selectRange.activeRange,s=!1,n,r,o,a,h;return i&&(n=i.getBounds(),r=n.start,n.start===n.end&&(s=!0),r&&(l=l.split(` +`),l.forEach(function(d){e.push(d.split(" "))}),e.length&&(a=this.table.columnManager.getVisibleColumnsByIndex(),h=a.indexOf(r.column),h>-1)))?(s?o=e[0].length:o=a.indexOf(n.end.column)-h+1,a=a.slice(h,h+o),e.forEach(d=>{var u={},c=d.length;a.forEach(function(f,g){u[f.field]=d[g%c]}),t.push(u)}),t):!1}},os={range:function(){var l=this.modules.selectRange.selectedColumns();return this.columnManager.rowHeader&&l.unshift(this.columnManager.rowHeader),l}},as={range:function(){return this.modules.selectRange.selectedRows()}},ls={keybindings:{bindings:is,actions:ss},clipboard:{pasteActions:ns,pasteParsers:rs},export:{columnLookups:os,rowLookups:as}};class re extends w{constructor(e){super(e),this.selecting="cell",this.mousedown=!1,this.ranges=[],this.overlay=null,this.rowHeader=null,this.layoutChangeTimeout=null,this.columnSelection=!1,this.rowSelection=!1,this.maxRanges=0,this.activeRange=!1,this.blockKeydown=!1,this.keyDownEvent=this._handleKeyDown.bind(this),this.mouseUpEvent=this._handleMouseUp.bind(this),this.registerTableOption("selectableRange",!1),this.registerTableOption("selectableRangeColumns",!1),this.registerTableOption("selectableRangeRows",!1),this.registerTableOption("selectableRangeClearCells",!1),this.registerTableOption("selectableRangeClearCellsValue",void 0),this.registerTableFunction("getRangesData",this.getRangesData.bind(this)),this.registerTableFunction("getRanges",this.getRanges.bind(this)),this.registerTableFunction("addRange",this.addRangeFromComponent.bind(this)),this.registerComponentFunction("cell","getRanges",this.cellGetRanges.bind(this)),this.registerComponentFunction("row","getRanges",this.rowGetRanges.bind(this)),this.registerComponentFunction("column","getRanges",this.colGetRanges.bind(this))}initialize(){this.options("selectableRange")&&(this.options("selectableRows")?console.warn("SelectRange functionality cannot be used in conjunction with row selection"):(this.maxRanges=this.options("selectableRange"),this.initializeTable(),this.initializeWatchers()),this.options("columns").findIndex(e=>e.frozen)>0&&console.warn("Having frozen column in arbitrary position with selectRange option may result in unpredictable behavior."),this.options("columns").filter(e=>e.frozen)>1&&console.warn("Having multiple frozen columns with selectRange option may result in unpredictable behavior."))}initializeTable(){this.overlay=document.createElement("div"),this.overlay.classList.add("tabulator-range-overlay"),this.rangeContainer=document.createElement("div"),this.rangeContainer.classList.add("tabulator-range-container"),this.activeRangeCellElement=document.createElement("div"),this.activeRangeCellElement.classList.add("tabulator-range-cell-active"),this.overlay.appendChild(this.rangeContainer),this.overlay.appendChild(this.activeRangeCellElement),this.table.rowManager.element.addEventListener("keydown",this.keyDownEvent),this.resetRanges(),this.table.rowManager.element.appendChild(this.overlay),this.table.columnManager.element.setAttribute("tabindex",0),this.table.element.classList.add("tabulator-ranges")}initializeWatchers(){this.columnSelection=this.options("selectableRangeColumns"),this.rowSelection=this.options("selectableRangeRows"),this.subscribe("column-init",this.initializeColumn.bind(this)),this.subscribe("column-mousedown",this.handleColumnMouseDown.bind(this)),this.subscribe("column-mousemove",this.handleColumnMouseMove.bind(this)),this.subscribe("column-resized",this.handleColumnResized.bind(this)),this.subscribe("column-moving",this.handleColumnMoving.bind(this)),this.subscribe("column-moved",this.handleColumnMoved.bind(this)),this.subscribe("column-width",this.layoutChange.bind(this)),this.subscribe("column-height",this.layoutChange.bind(this)),this.subscribe("column-resized",this.layoutChange.bind(this)),this.subscribe("columns-loaded",this.updateHeaderColumn.bind(this)),this.subscribe("cell-height",this.layoutChange.bind(this)),this.subscribe("cell-rendered",this.renderCell.bind(this)),this.subscribe("cell-mousedown",this.handleCellMouseDown.bind(this)),this.subscribe("cell-mousemove",this.handleCellMouseMove.bind(this)),this.subscribe("cell-click",this.handleCellClick.bind(this)),this.subscribe("cell-editing",this.handleEditingCell.bind(this)),this.subscribe("page-changed",this.redraw.bind(this)),this.subscribe("scroll-vertical",this.layoutChange.bind(this)),this.subscribe("scroll-horizontal",this.layoutChange.bind(this)),this.subscribe("data-destroy",this.tableDestroyed.bind(this)),this.subscribe("data-processed",this.resetRanges.bind(this)),this.subscribe("table-layout",this.layoutElement.bind(this)),this.subscribe("table-redraw",this.redraw.bind(this)),this.subscribe("table-destroy",this.tableDestroyed.bind(this)),this.subscribe("edit-editor-clear",this.finishEditingCell.bind(this)),this.subscribe("edit-blur",this.restoreFocus.bind(this)),this.subscribe("keybinding-nav-prev",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-next",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-left",this.keyNavigate.bind(this,"left")),this.subscribe("keybinding-nav-right",this.keyNavigate.bind(this,"right")),this.subscribe("keybinding-nav-up",this.keyNavigate.bind(this,"up")),this.subscribe("keybinding-nav-down",this.keyNavigate.bind(this,"down")),this.subscribe("keybinding-nav-range",this.keyNavigateRange.bind(this))}initializeColumn(e){this.columnSelection&&e.definition.headerSort&&this.options("headerSortClickElement")!=="icon"&&console.warn("Using column headerSort with selectableRangeColumns option may result in unpredictable behavior. Consider using headerSortClickElement: 'icon'."),e.modules.edit}updateHeaderColumn(){var e;this.rowSelection&&(this.rowHeader=this.table.columnManager.getVisibleColumnsByIndex()[0],this.rowHeader&&(this.rowHeader.definition.cssClass=this.rowHeader.definition.cssClass+" tabulator-range-row-header",this.rowHeader.definition.headerSort&&console.warn("Using column headerSort with selectableRangeRows option may result in unpredictable behavior"),this.rowHeader.definition.editor&&console.warn("Using column editor with selectableRangeRows option may result in unpredictable behavior"))),this.table.modules.frozenColumns&&this.table.modules.frozenColumns.active&&(e=this.table.modules.frozenColumns.getFrozenColumns(),(e.length>1||e.length===1&&e[0]!==this.rowHeader)&&console.warn("Using frozen columns that are not the range header in combination with the selectRange option may result in unpredictable behavior"))}getRanges(){return this.ranges.map(e=>e.getComponent())}getRangesData(){return this.ranges.map(e=>e.getData())}addRangeFromComponent(e,t){return e=e?e._cell:null,t=t?t._cell:null,this.addRange(e,t)}cellGetRanges(e){var t=[];return e.column===this.rowHeader?t=this.ranges.filter(i=>i.occupiesRow(e.row)):t=this.ranges.filter(i=>i.occupies(e)),t.map(i=>i.getComponent())}rowGetRanges(e){var t=this.ranges.filter(i=>i.occupiesRow(e));return t.map(i=>i.getComponent())}colGetRanges(e){var t=this.ranges.filter(i=>i.occupiesColumn(e));return t.map(i=>i.getComponent())}_handleMouseUp(e){this.mousedown=!1,document.removeEventListener("mouseup",this.mouseUpEvent)}_handleKeyDown(e){if(!this.blockKeydown&&(!this.table.modules.edit||this.table.modules.edit&&!this.table.modules.edit.currentCell)){if(e.key==="Enter"){if(this.table.modules.edit&&this.table.modules.edit.currentCell)return;this.table.modules.edit.editCell(this.getActiveCell()),e.preventDefault()}(e.key==="Backspace"||e.key==="Delete")&&this.options("selectableRangeClearCells")&&this.activeRange&&this.activeRange.clearValues()}}initializeFocus(e){var t;this.restoreFocus();try{document.selection?(t=document.body.createTextRange(),t.moveToElementText(e.getElement()),t.select()):window.getSelection&&(t=document.createRange(),t.selectNode(e.getElement()),window.getSelection().removeAllRanges(),window.getSelection().addRange(t))}catch{}}restoreFocus(e){return this.table.rowManager.element.focus(),!0}handleColumnResized(e){var t;this.selecting!=="column"&&this.selecting!=="all"||(t=this.ranges.some(i=>i.occupiesColumn(e)),t&&this.ranges.forEach(i=>{var s=i.getColumns(!0);s.forEach(n=>{n!==e&&n.setWidth(e.width)})}))}handleColumnMoving(e,t){this.resetRanges().setBounds(t),this.overlay.style.visibility="hidden"}handleColumnMoved(e,t,i){this.activeRange.setBounds(e),this.layoutElement()}handleColumnMouseDown(e,t){e.button===2&&(this.selecting==="column"||this.selecting==="all")&&this.activeRange.occupiesColumn(t)||this.table.options.movableColumns&&this.selecting==="column"&&this.activeRange.occupiesColumn(t)||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleColumnMouseMove(e,t){t===this.rowHeader||!this.mousedown||this.selecting==="all"||this.activeRange.setBounds(!1,t,!0)}renderCell(e){var t=e.getElement(),i=this.ranges.findIndex(s=>s.occupies(e));t.classList.toggle("tabulator-range-selected",i!==-1),t.classList.toggle("tabulator-range-only-cell-selected",this.ranges.length===1&&this.ranges[0].atTopLeft(e)&&this.ranges[0].atBottomRight(e)),t.dataset.range=i}handleCellMouseDown(e,t){e.button===2&&(this.activeRange.occupies(t)||(this.selecting==="row"||this.selecting==="all")&&this.activeRange.occupiesRow(t.row))||(this.mousedown=!0,document.addEventListener("mouseup",this.mouseUpEvent),this.newSelection(e,t))}handleCellMouseMove(e,t){!this.mousedown||this.selecting==="all"||this.activeRange.setBounds(!1,t,!0)}handleCellClick(e,t){this.initializeFocus(t)}handleEditingCell(e){this.activeRange&&this.activeRange.setBounds(e)}finishEditingCell(){this.blockKeydown=!0,this.table.rowManager.element.focus(),setTimeout(()=>{this.blockKeydown=!1},10)}keyNavigate(e,t){this.navigate(!1,!1,e),t.preventDefault()}keyNavigateRange(e,t,i,s){this.navigate(i,s,t),e.preventDefault()}navigate(e,t,i){var s=!1,n,r,o,a,h,d;if(this.table.modules.edit&&this.table.modules.edit.currentCell)return!1;if(this.ranges.length>1&&(this.ranges=this.ranges.filter(u=>u===this.activeRange?(u.setEnd(u.start.row,u.start.col),!0):(u.destroy(),!1))),n=this.activeRange,r=t?n.end:n.start,o=r.row,a=r.col,e)switch(i){case"left":a=this.findJumpCellLeft(n.start.row,r.col);break;case"right":a=this.findJumpCellRight(n.start.row,r.col);break;case"up":o=this.findJumpCellUp(r.row,n.start.col);break;case"down":o=this.findJumpCellDown(r.row,n.start.col);break}else{if(t&&(this.selecting==="row"&&(i==="left"||i==="right")||this.selecting==="column"&&(i==="up"||i==="down")))return;switch(i){case"left":a=Math.max(a-1,0);break;case"right":a=Math.min(a+1,this.getTableColumns().length-1);break;case"up":o=Math.max(o-1,0);break;case"down":o=Math.min(o+1,this.getTableRows().length-1);break}}if(this.rowHeader&&a===0&&(a=1),s=a!==r.col||o!==r.row,t||n.setStart(o,a),n.setEnd(o,a),t||(this.selecting="cell"),s)return h=this.getRowByRangePos(n.end.row),d=this.getColumnByRangePos(n.end.col),(i==="left"||i==="right")&&d.getElement().parentNode===null?d.getComponent().scrollTo(void 0,!1):(i==="up"||i==="down")&&h.getElement().parentNode===null?h.getComponent().scrollTo(void 0,!1):this.autoScroll(n,h.getElement(),d.getElement()),this.layoutElement(),!0}rangeRemoved(e){this.ranges=this.ranges.filter(t=>t!==e),this.activeRange===e&&(this.ranges.length?this.activeRange=this.ranges[this.ranges.length-1]:this.addRange()),this.layoutElement()}findJumpRow(e,t,i,s,n){return i&&(t=t.reverse()),this.findJumpItem(s,n,t,function(r){return r.getData()[e.getField()]})}findJumpCol(e,t,i,s,n){return i&&(t=t.reverse()),this.findJumpItem(s,n,t,function(r){return e.getData()[r.getField()]})}findJumpItem(e,t,i,s){var n;for(let r of i){let o=s(r);if(e){if(n=r,o)break}else if(t){if(n=r,o)break}else if(o)n=r;else break}return n}findJumpCellLeft(e,t){var i=this.getRowByRangePos(e),s=this.getTableColumns(),n=this.isEmpty(i.getData()[s[t].getField()]),r=s[t-1]?this.isEmpty(i.getData()[s[t-1].getField()]):!1,o=this.rowHeader?s.slice(1,t):s.slice(0,t),a=this.findJumpCol(i,o,!0,n,r);return a?a.getPosition()-1:t}findJumpCellRight(e,t){var i=this.getRowByRangePos(e),s=this.getTableColumns(),n=this.isEmpty(i.getData()[s[t].getField()]),r=s[t+1]?this.isEmpty(i.getData()[s[t+1].getField()]):!1,o=this.findJumpCol(i,s.slice(t+1,s.length),!1,n,r);return o?o.getPosition()-1:t}findJumpCellUp(e,t){var i=this.getColumnByRangePos(t),s=this.getTableRows(),n=this.isEmpty(s[e].getData()[i.getField()]),r=s[e-1]?this.isEmpty(s[e-1].getData()[i.getField()]):!1,o=this.findJumpRow(i,s.slice(0,e),!0,n,r);return o?o.position-1:e}findJumpCellDown(e,t){var i=this.getColumnByRangePos(t),s=this.getTableRows(),n=this.isEmpty(s[e].getData()[i.getField()]),r=s[e+1]?this.isEmpty(s[e+1].getData()[i.getField()]):!1,o=this.findJumpRow(i,s.slice(e+1,s.length),!1,n,r);return o?o.position-1:e}newSelection(e,t){var i;if(t.type==="column"){if(!this.columnSelection)return;if(t===this.rowHeader){i=this.resetRanges(),this.selecting="all";var s,n=this.getCell(-1,-1);this.rowHeader?s=this.getCell(0,1):s=this.getCell(0,0),i.setBounds(s,n);return}else this.selecting="column"}else t.column===this.rowHeader?this.selecting="row":this.selecting="cell";e.shiftKey?this.activeRange.setBounds(!1,t):e.ctrlKey?this.addRange().setBounds(t):this.resetRanges().setBounds(t)}autoScroll(e,t,i){var s=this.table.rowManager.element,n,r,o,a,h;typeof t>"u"&&(t=this.getRowByRangePos(e.end.row).getElement()),typeof i>"u"&&(i=this.getColumnByRangePos(e.end.col).getElement()),this.rowHeader&&(n=this.rowHeader.getElement()),r={left:i.offsetLeft,right:i.offsetLeft+i.offsetWidth,top:t.offsetTop,bottom:t.offsetTop+t.offsetHeight},o={left:s.scrollLeft,right:Math.ceil(s.scrollLeft+s.clientWidth),top:s.scrollTop,bottom:s.scrollTop+s.offsetHeight-this.table.rowManager.scrollbarWidth},n&&(o.left+=n.offsetWidth),a=o.lefto.right&&(s.scrollLeft=r.right-s.clientWidth)),h||(r.topo.bottom&&(s.scrollTop=r.bottom-s.clientHeight))}layoutChange(){this.overlay.style.visibility="hidden",clearTimeout(this.layoutChangeTimeout),this.layoutChangeTimeout=setTimeout(this.layoutRanges.bind(this),200)}redraw(e){e&&(this.selecting="cell",this.resetRanges(),this.layoutElement())}layoutElement(e){var t;e?t=this.table.rowManager.getVisibleRows(!0):t=this.table.rowManager.getRows(),t.forEach(i=>{i.type==="row"&&(this.layoutRow(i),i.cells.forEach(s=>this.renderCell(s)))}),this.getTableColumns().forEach(i=>{this.layoutColumn(i)}),this.layoutRanges()}layoutRow(e){var t=e.getElement(),i=!1,s=this.ranges.some(n=>n.occupiesRow(e));this.selecting==="row"?i=s:this.selecting==="all"&&(i=!0),t.classList.toggle("tabulator-range-selected",i),t.classList.toggle("tabulator-range-highlight",s)}layoutColumn(e){var t=e.getElement(),i=!1,s=this.ranges.some(n=>n.occupiesColumn(e));this.selecting==="column"?i=s:this.selecting==="all"&&(i=!0),t.classList.toggle("tabulator-range-selected",i),t.classList.toggle("tabulator-range-highlight",s)}layoutRanges(){var e,t,i;this.table.initialized&&(e=this.getActiveCell(),e&&(t=e.getElement(),i=e.row.getElement(),this.table.rtl?this.activeRangeCellElement.style.right=i.offsetWidth-t.offsetLeft-t.offsetWidth+"px":this.activeRangeCellElement.style.left=i.offsetLeft+t.offsetLeft+"px",this.activeRangeCellElement.style.top=i.offsetTop+"px",this.activeRangeCellElement.style.width=t.offsetWidth+"px",this.activeRangeCellElement.style.height=i.offsetHeight+"px",this.ranges.forEach(s=>s.layout()),this.overlay.style.visibility="visible"))}getCell(e,t){var i;return t<0&&(t=this.getTableColumns().length+t,t<0)?null:(e<0&&(e=this.getTableRows().length+e),i=this.table.rowManager.getRowFromPosition(e+1),i?i.getCells(!1,!0).filter(s=>s.column.visible)[t]:null)}getActiveCell(){return this.getCell(this.activeRange.start.row,this.activeRange.start.col)}getRowByRangePos(e){return this.getTableRows()[e]}getColumnByRangePos(e){return this.getTableColumns()[e]}getTableRows(){return this.table.rowManager.getDisplayRows().filter(e=>e.type==="row")}getTableColumns(){return this.table.columnManager.getVisibleColumnsByIndex()}addRange(e,t){var i;return this.maxRanges!==!0&&this.ranges.length>=this.maxRanges&&this.ranges.shift().destroy(),i=new ts(this.table,this,e,t),this.activeRange=i,this.ranges.push(i),this.rangeContainer.appendChild(i.element),i}resetRanges(){var e,t,i;return this.ranges.forEach(s=>s.destroy()),this.ranges=[],e=this.addRange(),this.table.rowManager.activeRows.length&&(i=this.table.rowManager.activeRows[0].cells.filter(s=>s.column.visible),t=i[this.rowHeader?1:0],t&&(e.setBounds(t),this.initializeFocus(t))),e}tableDestroyed(){document.removeEventListener("mouseup",this.mouseUpEvent),this.table.rowManager.element.removeEventListener("keydown",this.keyDownEvent)}selectedRows(e){return e?this.activeRange.getRows().map(t=>t.getComponent()):this.activeRange.getRows()}selectedColumns(e){return e?this.activeRange.getColumns().map(t=>t.getComponent()):this.activeRange.getColumns()}isEmpty(e){return e==null||e===""}}b(re,"moduleName","selectRange"),b(re,"moduleInitOrder",1),b(re,"moduleExtensions",ls);function hs(l,e,t,i,s,n,r){var o=r.alignEmptyValues,a=r.decimalSeparator,h=r.thousandSeparator,d=0;if(l=String(l),e=String(e),h&&(l=l.split(h).join(""),e=e.split(h).join("")),a&&(l=l.split(a).join("."),e=e.split(a).join(".")),l=parseFloat(l),e=parseFloat(e),isNaN(l))d=isNaN(e)?0:-1;else if(isNaN(e))d=1;else return l-e;return(o==="top"&&n==="desc"||o==="bottom"&&n==="asc")&&(d*=-1),d}function ds(l,e,t,i,s,n,r){var o=r.alignEmptyValues,a=0,h;if(!l)a=e?-1:0;else if(!e)a=1;else{switch(typeof r.locale){case"boolean":r.locale&&(h=this.langLocale());break;case"string":h=r.locale;break}return String(l).toLowerCase().localeCompare(String(e).toLowerCase(),h)}return(o==="top"&&n==="desc"||o==="bottom"&&n==="asc")&&(a*=-1),a}function Ve(l,e,t,i,s,n,r){var o=window.DateTime||luxon.DateTime,a=r.format||"dd/MM/yyyy HH:mm:ss",h=r.alignEmptyValues,d=0;if(typeof o<"u"){if(o.isDateTime(l)||(a==="iso"?l=o.fromISO(String(l)):l=o.fromFormat(String(l),a)),o.isDateTime(e)||(a==="iso"?e=o.fromISO(String(e)):e=o.fromFormat(String(e),a)),!l.isValid)d=e.isValid?-1:0;else if(!e.isValid)d=1;else return l-e;return(h==="top"&&n==="desc"||h==="bottom"&&n==="asc")&&(d*=-1),d}else console.error("Sort Error - 'datetime' sorter is dependant on luxon.js")}function us(l,e,t,i,s,n,r){return r.format||(r.format="dd/MM/yyyy"),Ve.call(this,l,e,t,i,s,n,r)}function cs(l,e,t,i,s,n,r){return r.format||(r.format="HH:mm"),Ve.call(this,l,e,t,i,s,n,r)}function fs(l,e,t,i,s,n,r){var o=l===!0||l==="true"||l==="True"||l===1?1:0,a=e===!0||e==="true"||e==="True"||e===1?1:0;return o-a}function ps(l,e,t,i,s,n,r){var o=r.type||"length",a=r.alignEmptyValues,h=0;function d(u){var c;switch(o){case"length":c=u.length;break;case"sum":c=u.reduce(function(f,g){return f+g});break;case"max":c=Math.max.apply(null,u);break;case"min":c=Math.min.apply(null,u);break;case"avg":c=u.reduce(function(f,g){return f+g})/u.length;break}return c}if(!Array.isArray(l))h=Array.isArray(e)?-1:0;else if(!Array.isArray(e))h=1;else return d(e)-d(l);return(a==="top"&&n==="desc"||a==="bottom"&&n==="asc")&&(h*=-1),h}function ms(l,e,t,i,s,n,r){var o=typeof l>"u"?0:1,a=typeof e>"u"?0:1;return o-a}function gs(l,e,t,i,s,n,r){var o,a,h,d,u=0,c,f=/(\d+)|(\D+)/g,g=/\d/,p=r.alignEmptyValues,v=0;if(!l&&l!==0)v=!e&&e!==0?0:-1;else if(!e&&e!==0)v=1;else{if(isFinite(l)&&isFinite(e))return l-e;if(o=String(l).toLowerCase(),a=String(e).toLowerCase(),o===a)return 0;if(!(g.test(o)&&g.test(a)))return o>a?1:-1;for(o=o.match(f),a=a.match(f),c=o.length>a.length?a.length:o.length;ud?1:-1;return o.length>a.length}return(p==="top"&&n==="desc"||p==="bottom"&&n==="asc")&&(v*=-1),v}var bs={number:hs,string:ds,date:us,time:cs,datetime:Ve,boolean:fs,array:ps,exists:ms,alphanum:gs};const j=class j extends w{constructor(e){super(e),this.sortList=[],this.changed=!1,this.registerTableOption("sortMode","local"),this.registerTableOption("initialSort",!1),this.registerTableOption("columnHeaderSortMulti",!0),this.registerTableOption("sortOrderReverse",!1),this.registerTableOption("headerSortElement","
"),this.registerTableOption("headerSortClickElement","header"),this.registerColumnOption("sorter"),this.registerColumnOption("sorterParams"),this.registerColumnOption("headerSort",!0),this.registerColumnOption("headerSortStartingDir"),this.registerColumnOption("headerSortTristate")}initialize(){this.subscribe("column-layout",this.initializeColumn.bind(this)),this.subscribe("table-built",this.tableBuilt.bind(this)),this.registerDataHandler(this.sort.bind(this),20),this.registerTableFunction("setSort",this.userSetSort.bind(this)),this.registerTableFunction("getSorters",this.getSort.bind(this)),this.registerTableFunction("clearSort",this.clearSort.bind(this)),this.table.options.sortMode==="remote"&&this.subscribe("data-params",this.remoteSortParams.bind(this))}tableBuilt(){this.table.options.initialSort&&this.setSort(this.table.options.initialSort)}remoteSortParams(e,t,i,s){var n=this.getSort();return n.forEach(r=>{delete r.column}),s.sort=n,s}userSetSort(e,t){this.setSort(e,t),this.refreshSort()}clearSort(){this.clear(),this.refreshSort()}initializeColumn(e){var t=!1,i,s;switch(typeof e.definition.sorter){case"string":j.sorters[e.definition.sorter]?t=j.sorters[e.definition.sorter]:console.warn("Sort Error - No such sorter found: ",e.definition.sorter);break;case"function":t=e.definition.sorter;break}if(e.modules.sort={sorter:t,dir:"none",params:e.definition.sorterParams||{},startingDir:e.definition.headerSortStartingDir||"asc",tristate:e.definition.headerSortTristate},e.definition.headerSort!==!1){switch(i=e.getElement(),i.classList.add("tabulator-sortable"),s=document.createElement("div"),s.classList.add("tabulator-col-sorter"),this.table.options.headerSortClickElement){case"icon":s.classList.add("tabulator-col-sorter-element");break;case"header":i.classList.add("tabulator-col-sorter-element");break;default:i.classList.add("tabulator-col-sorter-element");break}switch(this.table.options.headerSortElement){case"function":break;case"object":s.appendChild(this.table.options.headerSortElement);break;default:s.innerHTML=this.table.options.headerSortElement}e.titleHolderElement.appendChild(s),e.modules.sort.element=s,this.setColumnHeaderSortIcon(e,"none"),this.table.options.headerSortClickElement==="icon"&&s.addEventListener("mousedown",n=>{n.stopPropagation()}),(this.table.options.headerSortClickElement==="icon"?s:i).addEventListener("click",n=>{var r="",o=[],a=!1;if(e.modules.sort){if(e.modules.sort.tristate)e.modules.sort.dir=="none"?r=e.modules.sort.startingDir:e.modules.sort.dir==e.modules.sort.startingDir?r=e.modules.sort.dir=="asc"?"desc":"asc":r="none";else switch(e.modules.sort.dir){case"asc":r="desc";break;case"desc":r="asc";break;default:r=e.modules.sort.startingDir}this.table.options.columnHeaderSortMulti&&(n.shiftKey||n.ctrlKey)?(o=this.getSort(),a=o.findIndex(h=>h.field===e.getField()),a>-1?(o[a].dir=r,a=o.splice(a,1)[0],r!="none"&&o.push(a)):r!="none"&&o.push({column:e,dir:r}),this.setSort(o)):r=="none"?this.clear():this.setSort(e,r),this.refreshSort()}})}}refreshSort(){this.table.options.sortMode==="remote"?this.reloadData(null,!1,!1):this.refreshData(!0)}hasChanged(){var e=this.changed;return this.changed=!1,e}getSort(){var e=this,t=[];return e.sortList.forEach(function(i){i.column&&t.push({column:i.column.getComponent(),field:i.column.getField(),dir:i.dir})}),t}setSort(e,t){var i=this,s=[];Array.isArray(e)||(e=[{column:e,dir:t}]),e.forEach(function(n){var r;r=i.table.columnManager.findColumn(n.column),r?(n.column=r,s.push(n),i.changed=!0):console.warn("Sort Warning - Sort field does not exist and is being ignored: ",n.column)}),i.sortList=s,this.dispatch("sort-changed")}clear(){this.setSort([])}findSorter(e){var t=this.table.rowManager.activeRows[0],i="string",s,n;if(t&&(t=t.getData(),s=e.getField(),s))switch(n=e.getFieldValue(t),typeof n){case"undefined":i="string";break;case"boolean":i="boolean";break;default:!isNaN(n)&&n!==""?i="number":n.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)&&(i="alphanum");break}return j.sorters[i]}sort(e,t){var i=this,s=this.table.options.sortOrderReverse?i.sortList.slice().reverse():i.sortList,n=[],r=[];return this.subscribedExternal("dataSorting")&&this.dispatchExternal("dataSorting",i.getSort()),t||i.clearColumnHeaders(),this.table.options.sortMode!=="remote"?(s.forEach(function(o,a){var h;o.column&&(h=o.column.modules.sort,h&&(h.sorter||(h.sorter=i.findSorter(o.column)),o.params=typeof h.params=="function"?h.params(o.column.getComponent(),o.dir):h.params,n.push(o)),t||i.setColumnHeader(o.column,o.dir))}),n.length&&i._sortItems(e,n)):t||s.forEach(function(o,a){i.setColumnHeader(o.column,o.dir)}),this.subscribedExternal("dataSorted")&&(e.forEach(o=>{r.push(o.getComponent())}),this.dispatchExternal("dataSorted",i.getSort(),r)),e}clearColumnHeaders(){this.table.columnManager.getRealColumns().forEach(e=>{e.modules.sort&&(e.modules.sort.dir="none",e.getElement().setAttribute("aria-sort","none"),this.setColumnHeaderSortIcon(e,"none"))})}setColumnHeader(e,t){e.modules.sort.dir=t,e.getElement().setAttribute("aria-sort",t==="asc"?"ascending":"descending"),this.setColumnHeaderSortIcon(e,t)}setColumnHeaderSortIcon(e,t){var i=e.modules.sort.element,s;if(e.definition.headerSort&&typeof this.table.options.headerSortElement=="function"){for(;i.firstChild;)i.removeChild(i.firstChild);s=this.table.options.headerSortElement.call(this.table,e.getComponent(),t),typeof s=="object"?i.appendChild(s):i.innerHTML=s}}_sortItems(e,t){var i=t.length-1;e.sort((s,n)=>{for(var r,o=i;o>=0;o--){let a=t[o];if(r=this._sortRow(s,n,a.column,a.dir,a.params),r!==0)break}return r})}_sortRow(e,t,i,s,n){var r,o,a=s=="asc"?e:t,h=s=="asc"?t:e;return e=i.getFieldValue(a.getData()),t=i.getFieldValue(h.getData()),e=typeof e<"u"?e:"",t=typeof t<"u"?t:"",r=a.getComponent(),o=h.getComponent(),i.modules.sort.sorter.call(this,e,t,r,o,i.getComponent(),s,n)}};b(j,"moduleName","sort"),b(j,"sorters",bs);let He=j;class vs{constructor(e,t){this.columnCount=e,this.rowCount=t,this.columnString=[],this.columns=[],this.rows=[]}genColumns(e){var t=Math.max(this.columnCount,Math.max(...e.map(i=>i.length)));this.columnString=[],this.columns=[];for(let i=1;i<=t;i++)this.incrementChar(this.columnString.length-1),this.columns.push(this.columnString.join(""));return this.columns}genRows(e){var t=Math.max(this.rowCount,e.length);this.rows=[];for(let i=1;i<=t;i++)this.rows.push(i);return this.rows}incrementChar(e){let t=this.columnString[e];t?t!=="Z"?this.columnString[e]=String.fromCharCode(this.columnString[e].charCodeAt(0)+1):(this.columnString[e]="A",e?this.incrementChar(e-1):this.columnString.push("A")):this.columnString.push("A")}setRowCount(e){this.rowCount=e}setColumnCount(e){this.columnCount=e}}class pt{constructor(e){return this._sheet=e,new Proxy(this,{get:function(t,i,s){return typeof t[i]<"u"?t[i]:t._sheet.table.componentFunctionBinder.handle("sheet",t._sheet,i)}})}getTitle(){return this._sheet.title}getKey(){return this._sheet.key}getDefinition(){return this._sheet.getDefinition()}getData(){return this._sheet.getData()}setData(e){return this._sheet.setData(e)}clear(){return this._sheet.clear()}remove(){return this._sheet.remove()}active(){return this._sheet.active()}setTitle(e){return this._sheet.setTitle(e)}setRows(e){return this._sheet.setRows(e)}setColumns(e){return this._sheet.setColumns(e)}}class Xe extends M{constructor(e,t){super(e.table),this.spreadsheetManager=e,this.definition=t,this.title=this.definition.title||"",this.key=this.definition.key||this.definition.title,this.rowCount=this.definition.rows,this.columnCount=this.definition.columns,this.data=this.definition.data||[],this.element=null,this.isActive=!1,this.grid=new vs(this.columnCount,this.rowCount),this.defaultColumnDefinition={width:100,headerHozAlign:"center",headerSort:!1},this.columnDefinition=Object.assign(this.defaultColumnDefinition,this.options("spreadsheetColumnDefinition")),this.columnDefs=[],this.rowDefs=[],this.columnFields=[],this.columns=[],this.rows=[],this.scrollTop=null,this.scrollLeft=null,this.initialize(),this.dispatchExternal("sheetAdded",this.getComponent())}initialize(){this.initializeElement(),this.initializeColumns(),this.initializeRows()}reinitialize(){this.initializeColumns(),this.initializeRows()}initializeElement(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tab"),this.element.innerText=this.title,this.element.addEventListener("click",()=>{this.spreadsheetManager.loadSheet(this)})}initializeColumns(){this.grid.setColumnCount(this.columnCount),this.columnFields=this.grid.genColumns(this.data),this.columnDefs=[],this.columnFields.forEach(e=>{var t=Object.assign({},this.columnDefinition);t.field=e,t.title=e,this.columnDefs.push(t)})}initializeRows(){var e;this.grid.setRowCount(this.rowCount),e=this.grid.genRows(this.data),this.rowDefs=[],e.forEach((t,i)=>{var s={_id:t},n=this.data[i];n&&n.forEach((r,o)=>{var a=this.columnFields[o];a&&(s[a]=r)}),this.rowDefs.push(s)})}unload(){this.isActive=!1,this.scrollTop=this.table.rowManager.scrollTop,this.scrollLeft=this.table.rowManager.scrollLeft,this.data=this.getData(!0),this.element.classList.remove("tabulator-spreadsheet-tab-active")}load(){var e=!this.isActive;this.isActive=!0,this.table.blockRedraw(),this.table.setData([]),this.table.setColumns(this.columnDefs),this.table.setData(this.rowDefs),this.table.restoreRedraw(),e&&this.scrollTop!==null&&(this.table.rowManager.element.scrollLeft=this.scrollLeft,this.table.rowManager.element.scrollTop=this.scrollTop),this.element.classList.add("tabulator-spreadsheet-tab-active"),this.dispatchExternal("sheetLoaded",this.getComponent())}getComponent(){return new pt(this)}getDefinition(){return{title:this.title,key:this.key,rows:this.rowCount,columns:this.columnCount,data:this.getData()}}getData(e){var t=[],i,s,n;return this.rowDefs.forEach(r=>{var o=[];this.columnFields.forEach(a=>{o.push(r[a])}),t.push(o)}),!e&&!this.options("spreadsheetOutputFull")&&(i=t.map(r=>r.findLastIndex(o=>typeof o<"u")+1),s=Math.max(...i),n=i.findLastIndex(r=>r>0)+1,t=t.slice(0,n),t=t.map(r=>r.slice(0,s))),t}setData(e){this.data=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}clear(){this.setData([])}setTitle(e){this.title=e,this.element.innerText=e,this.dispatchExternal("sheetUpdated",this.getComponent())}setRows(e){this.rowCount=e,this.initializeRows(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}setColumns(e){this.columnCount=e,this.reinitialize(),this.dispatchExternal("sheetUpdated",this.getComponent()),this.isActive&&this.load()}remove(){this.spreadsheetManager.removeSheet(this)}destroy(){this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.dispatchExternal("sheetRemoved",this.getComponent())}active(){this.spreadsheetManager.loadSheet(this)}}class mt extends w{constructor(e){super(e),this.sheets=[],this.element=null,this.registerTableOption("spreadsheet",!1),this.registerTableOption("spreadsheetRows",50),this.registerTableOption("spreadsheetColumns",50),this.registerTableOption("spreadsheetColumnDefinition",{}),this.registerTableOption("spreadsheetOutputFull",!1),this.registerTableOption("spreadsheetData",!1),this.registerTableOption("spreadsheetSheets",!1),this.registerTableOption("spreadsheetSheetTabs",!1),this.registerTableOption("spreadsheetSheetTabsElement",!1),this.registerTableFunction("setSheets",this.setSheets.bind(this)),this.registerTableFunction("addSheet",this.addSheet.bind(this)),this.registerTableFunction("getSheets",this.getSheets.bind(this)),this.registerTableFunction("getSheetDefinitions",this.getSheetDefinitions.bind(this)),this.registerTableFunction("setSheetData",this.setSheetData.bind(this)),this.registerTableFunction("getSheet",this.getSheet.bind(this)),this.registerTableFunction("getSheetData",this.getSheetData.bind(this)),this.registerTableFunction("clearSheet",this.clearSheet.bind(this)),this.registerTableFunction("removeSheet",this.removeSheetFunc.bind(this)),this.registerTableFunction("activeSheet",this.activeSheetFunc.bind(this))}initialize(){this.options("spreadsheet")&&(this.subscribe("table-initialized",this.tableInitialized.bind(this)),this.subscribe("data-loaded",this.loadRemoteData.bind(this)),this.table.options.index="_id",this.options("spreadsheetData")&&this.options("spreadsheetSheets")&&(console.warn("You cannot use spreadsheetData and spreadsheetSheets at the same time, ignoring spreadsheetData"),this.table.options.spreadsheetData=!1),this.compatibilityCheck(),this.options("spreadsheetSheetTabs")&&this.initializeTabset())}compatibilityCheck(){this.options("data")&&console.warn("Do not use the data option when working with spreadsheets, use either spreadsheetData or spreadsheetSheets to pass data into the table"),this.options("pagination")&&console.warn("The spreadsheet module is not compatible with the pagination module"),this.options("groupBy")&&console.warn("The spreadsheet module is not compatible with the row grouping module"),this.options("responsiveCollapse")&&console.warn("The spreadsheet module is not compatible with the responsive collapse module")}initializeTabset(){this.element=document.createElement("div"),this.element.classList.add("tabulator-spreadsheet-tabs");var e=this.options("spreadsheetSheetTabsElement");e&&!(e instanceof HTMLElement)&&(e=document.querySelector(e),e||console.warn("Unable to find element matching spreadsheetSheetTabsElement selector:",this.options("spreadsheetSheetTabsElement"))),e?e.appendChild(this.element):this.footerAppend(this.element)}tableInitialized(){this.sheets.length?this.loadSheet(this.sheets[0]):this.options("spreadsheetSheets")?this.loadSheets(this.options("spreadsheetSheets")):this.options("spreadsheetData")&&this.loadData(this.options("spreadsheetData"))}loadRemoteData(e,t,i){return console.log("data",e,t,i),Array.isArray(e)?(this.table.dataLoader.clearAlert(),this.dispatchExternal("dataLoaded",e),!e.length||Array.isArray(e[0])?this.loadData(e):this.loadSheets(e)):console.error(`Spreadsheet Loading Error - Unable to process remote data due to invalid data type +Expecting: array +Received: `,typeof e,` +Data: `,e),!1}loadData(e){var t={data:e};this.loadSheet(this.newSheet(t))}destroySheets(){this.sheets.forEach(e=>{e.destroy()}),this.sheets=[],this.activeSheet=null}loadSheets(e){Array.isArray(e)||(e=[]),this.destroySheets(),e.forEach(t=>{this.newSheet(t)}),this.loadSheet(this.sheets[0])}loadSheet(e){this.activeSheet!==e&&(this.activeSheet&&this.activeSheet.unload(),this.activeSheet=e,e.load())}newSheet(e={}){var t;return e.rows||(e.rows=this.options("spreadsheetRows")),e.columns||(e.columns=this.options("spreadsheetColumns")),t=new Xe(this,e),this.sheets.push(t),this.element&&this.element.appendChild(t.element),t}removeSheet(e){var t=this.sheets.indexOf(e),i;this.sheets.length>1?t>-1&&(this.sheets.splice(t,1),e.destroy(),this.activeSheet===e&&(i=this.sheets[t-1]||this.sheets[0],i?this.loadSheet(i):this.activeSheet=null)):console.warn("Unable to remove sheet, at least one sheet must be active")}lookupSheet(e){return e?e instanceof Xe?e:e instanceof pt?e._sheet:this.sheets.find(t=>t.key===e)||!1:this.activeSheet}setSheets(e){return this.loadSheets(e),this.getSheets()}addSheet(e){return this.newSheet(e).getComponent()}getSheetDefinitions(){return this.sheets.map(e=>e.getDefinition())}getSheets(){return this.sheets.map(e=>e.getComponent())}getSheet(e){var t=this.lookupSheet(e);return t?t.getComponent():!1}setSheetData(e,t){e&&!t&&(t=e,e=!1);var i=this.lookupSheet(e);return i?i.setData(t):!1}getSheetData(e){var t=this.lookupSheet(e);return t?t.getData():!1}clearSheet(e){var t=this.lookupSheet(e);return t?t.clear():!1}removeSheetFunc(e){var t=this.lookupSheet(e);t&&this.removeSheet(t)}activeSheetFunc(e){var t=this.lookupSheet(e);return t?this.loadSheet(t):!1}}b(mt,"moduleName","spreadsheet");class gt extends w{constructor(e){super(e),this.tooltipSubscriber=null,this.headerSubscriber=null,this.timeout=null,this.popupInstance=null,this.registerTableOption("tooltipDelay",300),this.registerColumnOption("tooltip"),this.registerColumnOption("headerTooltip")}initialize(){this.deprecatedOptionsCheck(),this.subscribe("column-init",this.initializeColumn.bind(this))}deprecatedOptionsCheck(){}initializeColumn(e){e.definition.headerTooltip&&!this.headerSubscriber&&(this.headerSubscriber=!0,this.subscribe("column-mousemove",this.mousemoveCheck.bind(this,"headerTooltip")),this.subscribe("column-mouseout",this.mouseoutCheck.bind(this,"headerTooltip"))),e.definition.tooltip&&!this.tooltipSubscriber&&(this.tooltipSubscriber=!0,this.subscribe("cell-mousemove",this.mousemoveCheck.bind(this,"tooltip")),this.subscribe("cell-mouseout",this.mouseoutCheck.bind(this,"tooltip")))}mousemoveCheck(e,t,i){var s=e==="tooltip"?i.column.definition.tooltip:i.definition.headerTooltip;s&&(this.clearPopup(),this.timeout=setTimeout(this.loadTooltip.bind(this,t,i,s),this.table.options.tooltipDelay))}mouseoutCheck(e,t,i){this.popupInstance||this.clearPopup()}clearPopup(e,t,i){clearTimeout(this.timeout),this.timeout=null,this.popupInstance&&this.popupInstance.hide()}loadTooltip(e,t,i){var s,n,r;function o(a){n=a}typeof i=="function"&&(i=i(e,t.getComponent(),o)),i instanceof HTMLElement?s=i:(s=document.createElement("div"),i===!0&&(t instanceof ne?i=t.value:t.definition.field?this.langBind("columns|"+t.definition.field,a=>{s.innerHTML=i=a||t.definition.title}):i=t.definition.title),s.innerHTML=i),(i||i===0||i===!1)&&(s.classList.add("tabulator-tooltip"),s.addEventListener("mousemove",a=>a.preventDefault()),this.popupInstance=this.popup(s),typeof n=="function"&&this.popupInstance.renderCallback(n),r=this.popupInstance.containerEventCoords(e),this.popupInstance.show(r.x+15,r.y+15).hideOnBlur(()=>{this.dispatchExternal("TooltipClosed",t.getComponent()),this.popupInstance=null}),this.dispatchExternal("TooltipOpened",t.getComponent()))}}b(gt,"moduleName","tooltip");var ws={integer:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&Math.floor(e)===e)},float:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:(e=Number(e),!isNaN(e)&&isFinite(e)&&e%1!==0)},numeric:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:!isNaN(e)},string:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:isNaN(e)},alphanumeric:function(l,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(/^[a-z0-9]+$/i);return i.test(e)},max:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)<=t},min:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:parseFloat(e)>=t},starts:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().startsWith(String(t).toLowerCase())},ends:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).toLowerCase().endsWith(String(t).toLowerCase())},minLength:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length>=t},maxLength:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:String(e).length<=t},in:function(l,e,t){return e===""||e===null||typeof e>"u"?!0:(typeof t=="string"&&(t=t.split("|")),t.indexOf(e)>-1)},regex:function(l,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=new RegExp(t);return i.test(e)},unique:function(l,e,t){if(e===""||e===null||typeof e>"u")return!0;var i=!0,s=l.getData(),n=l.getColumn()._getSelf();return this.table.rowManager.rows.forEach(function(r){var o=r.getData();o!==s&&e==n.getFieldValue(o)&&(i=!1)}),i},required:function(l,e,t){return e!==""&&e!==null&&typeof e<"u"}};const ie=class ie extends w{constructor(e){super(e),this.invalidCells=[],this.registerTableOption("validationMode","blocking"),this.registerColumnOption("validator"),this.registerTableFunction("getInvalidCells",this.getInvalidCells.bind(this)),this.registerTableFunction("clearCellValidation",this.userClearCellValidation.bind(this)),this.registerTableFunction("validate",this.userValidate.bind(this)),this.registerComponentFunction("cell","isValid",this.cellIsValid.bind(this)),this.registerComponentFunction("cell","clearValidation",this.clearValidation.bind(this)),this.registerComponentFunction("cell","validate",this.cellValidate.bind(this)),this.registerComponentFunction("column","validate",this.columnValidate.bind(this)),this.registerComponentFunction("row","validate",this.rowValidate.bind(this))}initialize(){this.subscribe("cell-delete",this.clearValidation.bind(this)),this.subscribe("column-layout",this.initializeColumnCheck.bind(this)),this.subscribe("edit-success",this.editValidate.bind(this)),this.subscribe("edit-editor-clear",this.editorClear.bind(this)),this.subscribe("edit-edited-clear",this.editedClear.bind(this))}editValidate(e,t,i){var s=this.table.options.validationMode!=="manual"?this.validate(e.column.modules.validate,e,t):!0;return s!==!0&&setTimeout(()=>{e.getElement().classList.add("tabulator-validation-fail"),this.dispatchExternal("validationFailed",e.getComponent(),t,s)}),s}editorClear(e,t){t&&e.column.modules.validate&&this.cellValidate(e),e.getElement().classList.remove("tabulator-validation-fail")}editedClear(e){e.modules.validate&&(e.modules.validate.invalid=!1)}cellIsValid(e){return e.modules.validate&&e.modules.validate.invalid||!0}cellValidate(e){return this.validate(e.column.modules.validate,e,e.getValue())}columnValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}rowValidate(e){var t=[];return e.cells.forEach(i=>{this.cellValidate(i)!==!0&&t.push(i.getComponent())}),t.length?t:!0}userClearCellValidation(e){e||(e=this.getInvalidCells()),Array.isArray(e)||(e=[e]),e.forEach(t=>{this.clearValidation(t._getSelf())})}userValidate(e){var t=[];return this.table.rowManager.rows.forEach(i=>{i=i.getComponent();var s=i.validate();s!==!0&&(t=t.concat(s))}),t.length?t:!0}initializeColumnCheck(e){typeof e.definition.validator<"u"&&this.initializeColumn(e)}initializeColumn(e){var t=this,i=[],s;e.definition.validator&&(Array.isArray(e.definition.validator)?e.definition.validator.forEach(n=>{s=t._extractValidator(n),s&&i.push(s)}):(s=this._extractValidator(e.definition.validator),s&&i.push(s)),e.modules.validate=i.length?i:!1)}_extractValidator(e){var t,i,s;switch(typeof e){case"string":return s=e.indexOf(":"),s>-1?(t=e.substring(0,s),i=e.substring(s+1)):t=e,this._buildValidator(t,i);case"function":return this._buildValidator(e);case"object":return this._buildValidator(e.type,e.parameters)}}_buildValidator(e,t){var i=typeof e=="function"?e:ie.validators[e];return i?{type:typeof e=="function"?"function":e,func:i,params:t}:(console.warn("Validator Setup Error - No matching validator found:",e),!1)}validate(e,t,i){var s=this,n=[],r=this.invalidCells.indexOf(t);return e&&e.forEach(o=>{o.func.call(s,t.getComponent(),i,o.params)||n.push({type:o.type,parameters:o.params})}),t.modules.validate||(t.modules.validate={}),n.length?(t.modules.validate.invalid=n,this.table.options.validationMode!=="manual"&&t.getElement().classList.add("tabulator-validation-fail"),r==-1&&this.invalidCells.push(t)):(t.modules.validate.invalid=!1,t.getElement().classList.remove("tabulator-validation-fail"),r>-1&&this.invalidCells.splice(r,1)),n.length?n:!0}getInvalidCells(){var e=[];return this.invalidCells.forEach(t=>{e.push(t.getComponent())}),e}clearValidation(e){var t;e.modules.validate&&e.modules.validate.invalid&&(e.getElement().classList.remove("tabulator-validation-fail"),e.modules.validate.invalid=!1,t=this.invalidCells.indexOf(e),t>-1&&this.invalidCells.splice(t,1))}};b(ie,"moduleName","validate"),b(ie,"validators",ws);let Fe=ie;var ue=Object.freeze({__proto__:null,AccessorModule:ce,AjaxModule:me,ClipboardModule:ge,ColumnCalcsModule:be,DataTreeModule:et,DownloadModule:ve,EditModule:we,ExportModule:Ce,FilterModule:Ee,FormatModule:ye,FrozenColumnsModule:tt,FrozenRowsModule:it,GroupRowsModule:st,HistoryModule:Re,HtmlTableImportModule:nt,ImportModule:xe,InteractionModule:rt,KeybindingsModule:Te,MenuModule:ot,MoveColumnsModule:at,MoveRowsModule:ke,MutatorModule:Me,PageModule:Le,PersistenceModule:Se,PopupModule:lt,PrintModule:ht,ReactiveDataModule:dt,ResizeColumnsModule:ut,ResizeRowsModule:ct,ResizeTableModule:ft,ResponsiveLayoutModule:De,SelectRangeModule:re,SelectRowModule:ze,SortModule:He,SpreadsheetModule:mt,TooltipModule:gt,ValidateModule:Fe}),Cs={debugEventsExternal:!1,debugEventsInternal:!1,debugInvalidOptions:!0,debugInvalidComponentFuncs:!0,debugInitialization:!0,debugDeprecation:!0,height:!1,minHeight:!1,maxHeight:!1,columnHeaderVertAlign:"top",popupContainer:!1,columns:[],columnDefaults:{},rowHeader:!1,data:!1,autoColumns:!1,autoColumnsDefinitions:!1,nestedFieldSeparator:".",footerElement:!1,index:"id",textDirection:"auto",addRowPos:"bottom",headerVisible:!0,renderVertical:"virtual",renderHorizontal:"basic",renderVerticalBuffer:0,scrollToRowPosition:"top",scrollToRowIfVisible:!0,scrollToColumnPosition:"left",scrollToColumnIfVisible:!0,rowFormatter:!1,rowFormatterPrint:null,rowFormatterClipboard:null,rowFormatterHtmlOutput:null,rowHeight:null,placeholder:!1,dataLoader:!0,dataLoaderLoading:!1,dataLoaderError:!1,dataLoaderErrorTimeout:3e3,dataSendParams:{},dataReceiveParams:{}};class bt{constructor(e,t,i={}){this.table=e,this.msgType=t,this.registeredDefaults=Object.assign({},i)}register(e,t){this.registeredDefaults[e]=t}generate(e,t={}){var i=Object.assign({},this.registeredDefaults),s=this.table.options.debugInvalidOptions||t.debugInvalidOptions===!0;Object.assign(i,e);for(let n in t)i.hasOwnProperty(n)||(s&&console.warn("Invalid "+this.msgType+" option:",n),i[n]=t.key);for(let n in i)n in t?i[n]=t[n]:Array.isArray(i[n])?i[n]=Object.assign([],i[n]):typeof i[n]=="object"&&i[n]!==null?i[n]=Object.assign({},i[n]):typeof i[n]>"u"&&delete i[n];return i}}class le extends M{constructor(e){super(e),this.elementVertical=e.rowManager.element,this.elementHorizontal=e.columnManager.element,this.tableElement=e.rowManager.tableElement,this.verticalFillMode="fit"}initialize(){}clearRows(){}clearColumns(){}reinitializeColumnWidths(e){}renderRows(){}renderColumns(){}rerenderRows(e){e&&e()}rerenderColumns(e,t){}renderRowCells(e){}rerenderRowCells(e,t){}scrollColumns(e,t){}scrollRows(e,t){}resize(){}scrollToRow(e){}scrollToRowNearestTop(e){}visibleRows(e){return[]}rows(){return this.table.rowManager.getDisplayRows()}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}clear(){this.clearRows(),this.clearColumns()}render(){this.renderRows(),this.renderColumns()}rerender(e){this.rerenderRows(),this.rerenderColumns()}scrollToRowPosition(e,t,i){var s=this.rows().indexOf(e),n=e.getElement(),r=0;return new Promise((o,a)=>{if(s>-1){if(typeof i>"u"&&(i=this.table.options.scrollToRowIfVisible),!i&&x.elVisible(n)&&(r=x.elOffset(n).top-x.elOffset(this.elementVertical).top,r>0&&r"u"&&(t=this.table.options.scrollToRowPosition),t==="nearest"&&(t=this.scrollToRowNearestTop(e)?"top":"bottom"),this.scrollToRow(e),t){case"middle":case"center":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop+(n.offsetTop-this.elementVertical.scrollTop)-(this.elementVertical.scrollHeight-n.offsetTop)/2:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight/2;break;case"bottom":this.elementVertical.scrollHeight-this.elementVertical.scrollTop==this.elementVertical.clientHeight?this.elementVertical.scrollTop=this.elementVertical.scrollTop-(this.elementVertical.scrollHeight-n.offsetTop)+n.offsetHeight:this.elementVertical.scrollTop=this.elementVertical.scrollTop-this.elementVertical.clientHeight+n.offsetHeight;break;case"top":this.elementVertical.scrollTop=n.offsetTop;break}o()}else console.warn("Scroll Error - Row not visible"),a("Scroll Error - Row not visible")})}}class Es extends le{constructor(e){super(e)}renderRowCells(e,t){const i=document.createDocumentFragment();e.cells.forEach(s=>{i.appendChild(s.getElement())}),e.element.appendChild(i),t||e.cells.forEach(s=>{s.cellRendered()})}reinitializeColumnWidths(e){e.forEach(function(t){t.reinitializeWidth()})}}class ys extends le{constructor(e){super(e),this.leftCol=0,this.rightCol=0,this.scrollLeft=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0,this.fitDataColAvg=0,this.windowBuffer=200,this.visibleRows=null,this.initialized=!1,this.isFitData=!1,this.columns=[]}initialize(){this.compatibilityCheck(),this.layoutCheck(),this.vertScrollListen()}compatibilityCheck(){this.options("layout")=="fitDataTable"&&console.warn("Horizontal Virtual DOM is not compatible with fitDataTable layout mode"),this.options("responsiveLayout")&&console.warn("Horizontal Virtual DOM is not compatible with responsive columns"),this.options("rtl")&&console.warn("Horizontal Virtual DOM is not currently compatible with RTL text direction")}layoutCheck(){this.isFitData=this.options("layout").startsWith("fitData")}vertScrollListen(){this.subscribe("scroll-vertical",this.clearVisRowCache.bind(this)),this.subscribe("data-refreshed",this.clearVisRowCache.bind(this))}clearVisRowCache(){this.visibleRows=null}renderColumns(e,t){this.dataChange()}scrollColumns(e,t){this.scrollLeft!=e&&(this.scrollLeft=e,this.scroll(e-(this.vDomScrollPosLeft+this.windowBuffer)))}calcWindowBuffer(){var e=this.elementVertical.clientWidth;this.table.columnManager.columnsByIndex.forEach(t=>{if(t.visible){var i=t.getWidth();i>e&&(e=i)}}),this.windowBuffer=e*2}rerenderColumns(e,t){var i={cols:this.columns,leftCol:this.leftCol,rightCol:this.rightCol},s=0;e&&!this.initialized||(this.clear(),this.calcWindowBuffer(),this.scrollLeft=this.elementVertical.scrollLeft,this.vDomScrollPosLeft=this.scrollLeft-this.windowBuffer,this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,this.table.columnManager.columnsByIndex.forEach(n=>{var r={},o;n.visible&&(n.modules.frozen||(o=n.getWidth(),r.leftPos=s,r.rightPos=s+o,r.width=o,this.isFitData&&(r.fitDataCheck=n.modules.vdomHoz?n.modules.vdomHoz.fitDataCheck:!0),s+o>this.vDomScrollPosLeft&&s{t.appendChild(i.getElement())}),e.element.appendChild(t),e.cells.forEach(i=>{i.cellRendered()})}}rerenderRowCells(e,t){this.reinitializeRow(e,t)}reinitializeColumnWidths(e){for(let t=this.leftCol;t<=this.rightCol;t++)this.columns[t].reinitializeWidth()}deinitialize(){this.initialized=!1}clear(){this.columns=[],this.leftCol=-1,this.rightCol=0,this.vDomScrollPosLeft=0,this.vDomScrollPosRight=0,this.vDomPadLeft=0,this.vDomPadRight=0}dataChange(){var e=!1,t,i;if(this.isFitData){if(this.table.columnManager.columnsByIndex.forEach(s=>{!s.definition.width&&s.visible&&(e=!0)}),e&&this.table.rowManager.getDisplayRows().length&&(this.vDomScrollPosRight=this.scrollLeft+this.elementVertical.clientWidth+this.windowBuffer,t=this.chain("rows-sample",[1],[],()=>this.table.rowManager.getDisplayRows())[0],t)){i=t.getElement(),t.generateCells(),this.tableElement.appendChild(i);for(let s=0;s{i!==this.columns[s]&&(t=!1)}),!t)}reinitializeRows(){var e=this.getVisibleRows(),t=this.table.rowManager.getRows().filter(i=>!e.includes(i));e.forEach(i=>{this.reinitializeRow(i,!0)}),t.forEach(i=>{i.deinitialize()})}getVisibleRows(){return this.visibleRows||(this.visibleRows=this.table.rowManager.getVisibleRows()),this.visibleRows}scroll(e){this.vDomScrollPosLeft+=e,this.vDomScrollPosRight+=e,Math.abs(e)>this.windowBuffer/2?this.rerenderColumns():e>0?(this.addColRight(),this.removeColLeft()):(this.addColLeft(),this.removeColRight())}colPositionAdjust(e,t,i){for(let s=e;s{if(s.type!=="group"){var n=s.getCell(i);s.getElement().insertBefore(n.getElement(),s.getCell(this.columns[this.rightCol]).getElement().nextSibling),n.cellRendered()}}),this.fitDataColActualWidthCheck(i),this.rightCol++,this.getVisibleRows().forEach(s=>{s.type!=="group"&&(s.modules.vdomHoz.rightCol=this.rightCol)}),this.rightCol>=this.columns.length-1?this.vDomPadRight=0:this.vDomPadRight-=i.getWidth()):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}addColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol-1];if(i)if(i.modules.vdomHoz.rightPos>=this.vDomScrollPosLeft){e=!0,this.getVisibleRows().forEach(n=>{if(n.type!=="group"){var r=n.getCell(i);n.getElement().insertBefore(r.getElement(),n.getCell(this.columns[this.leftCol]).getElement()),r.cellRendered()}}),this.leftCol--,this.getVisibleRows().forEach(n=>{n.type!=="group"&&(n.modules.vdomHoz.leftCol=this.leftCol)}),this.leftCol<=0?this.vDomPadLeft=0:this.vDomPadLeft-=i.getWidth();let s=this.fitDataColActualWidthCheck(i);s&&(this.scrollLeft=this.elementVertical.scrollLeft=this.elementVertical.scrollLeft+s,this.vDomPadRight-=s)}else t=!1;else t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}removeColRight(){for(var e=!1,t=!0;t;){let i=this.columns[this.rightCol];i&&i.modules.vdomHoz.leftPos>this.vDomScrollPosRight?(e=!0,this.getVisibleRows().forEach(s=>{if(s.type!=="group"){var n=s.getCell(i);try{s.getElement().removeChild(n.getElement())}catch(r){console.warn("Could not removeColRight",r.message)}}}),this.vDomPadRight+=i.getWidth(),this.rightCol--,this.getVisibleRows().forEach(s=>{s.type!=="group"&&(s.modules.vdomHoz.rightCol=this.rightCol)})):t=!1}e&&(this.tableElement.style.paddingRight=this.vDomPadRight+"px")}removeColLeft(){for(var e=!1,t=!0;t;){let i=this.columns[this.leftCol];i&&i.modules.vdomHoz.rightPos{if(s.type!=="group"){var n=s.getCell(i);try{s.getElement().removeChild(n.getElement())}catch(r){console.warn("Could not removeColLeft",r.message)}}}),this.vDomPadLeft+=i.getWidth(),this.leftCol++,this.getVisibleRows().forEach(s=>{s.type!=="group"&&(s.modules.vdomHoz.leftCol=this.leftCol)})):t=!1}e&&(this.tableElement.style.paddingLeft=this.vDomPadLeft+"px")}fitDataColActualWidthCheck(e){var t,i;return e.modules.vdomHoz.fitDataCheck&&(e.reinitializeWidth(),t=e.getWidth(),i=t-e.modules.vdomHoz.width,i&&(e.modules.vdomHoz.rightPos+=i,e.modules.vdomHoz.width=t,this.colPositionAdjust(this.columns.indexOf(e)+1,this.columns.length,i)),e.modules.vdomHoz.fitDataCheck=!1),i}initializeRow(e){if(e.type!=="group"){e.modules.vdomHoz={leftCol:this.leftCol,rightCol:this.rightCol},this.table.modules.frozenColumns&&this.table.modules.frozenColumns.leftColumns.forEach(t=>{this.appendCell(e,t)});for(let t=this.leftCol;t<=this.rightCol;t++)this.appendCell(e,this.columns[t]);this.table.modules.frozenColumns&&this.table.modules.frozenColumns.rightColumns.forEach(t=>{this.appendCell(e,t)})}}appendCell(e,t){if(t&&t.visible){let i=e.getCell(t);e.getElement().appendChild(i.getElement()),i.cellRendered()}}reinitializeRow(e,t){if(e.type!=="group"&&(t||!e.modules.vdomHoz||e.modules.vdomHoz.leftCol!==this.leftCol||e.modules.vdomHoz.rightCol!==this.rightCol)){for(var i=e.getElement();i.firstChild;)i.removeChild(i.firstChild);this.initializeRow(e)}}}class Rs extends M{constructor(e){super(e),this.blockHozScrollEvent=!1,this.headersElement=null,this.contentsElement=null,this.rowHeader=null,this.element=null,this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.scrollLeft=0,this.optionsList=new bt(this.table,"column definition",Ze),this.redrawBlock=!1,this.redrawBlockUpdate=null,this.renderer=null}initialize(){this.initializeRenderer(),this.headersElement=this.createHeadersElement(),this.contentsElement=this.createHeaderContentsElement(),this.element=this.createHeaderElement(),this.contentsElement.insertBefore(this.headersElement,this.contentsElement.firstChild),this.element.insertBefore(this.contentsElement,this.element.firstChild),this.initializeScrollWheelWatcher(),this.subscribe("scroll-horizontal",this.scrollHorizontal.bind(this)),this.subscribe("scrollbar-vertical",this.padVerticalScrollbar.bind(this))}padVerticalScrollbar(e){this.table.rtl?this.headersElement.style.marginLeft=e+"px":this.headersElement.style.marginRight=e+"px"}initializeRenderer(){var e,t={virtual:ys,basic:Es};typeof this.table.options.renderHorizontal=="string"?e=t[this.table.options.renderHorizontal]:e=this.table.options.renderHorizontal,e?(this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize()):console.error("Unable to find matching renderer:",this.table.options.renderHorizontal)}createHeadersElement(){var e=document.createElement("div");return e.classList.add("tabulator-headers"),e.setAttribute("role","row"),e}createHeaderContentsElement(){var e=document.createElement("div");return e.classList.add("tabulator-header-contents"),e.setAttribute("role","rowgroup"),e}createHeaderElement(){var e=document.createElement("div");return e.classList.add("tabulator-header"),e.setAttribute("role","rowgroup"),this.table.options.headerVisible||e.classList.add("tabulator-header-hidden"),e}getElement(){return this.element}getContentsElement(){return this.contentsElement}getHeadersElement(){return this.headersElement}scrollHorizontal(e){this.contentsElement.scrollLeft=e,this.scrollLeft=e,this.renderer.scrollColumns(e)}initializeScrollWheelWatcher(){this.contentsElement.addEventListener("wheel",e=>{var t;e.deltaX&&(t=this.contentsElement.scrollLeft+e.deltaX,this.table.rowManager.scrollHorizontal(t),this.table.columnManager.scrollHorizontal(t))})}generateColumnsFromRowData(e){var t=[],i={},s=this.table.options.autoColumns==="full"?e:[e[0]],n=this.table.options.autoColumnsDefinitions;if(e&&e.length){if(s.forEach(r=>{Object.keys(r).forEach((o,a)=>{let h=r[o],d;i[o]?i[o]!==!0&&typeof h<"u"&&(i[o].sorter=this.calculateSorterFromValue(h),i[o]=!0):(d={field:o,title:o,sorter:this.calculateSorterFromValue(h)},t.splice(a,0,d),i[o]=typeof h>"u"?d:!0)})}),n)switch(typeof n){case"function":this.table.options.columns=n.call(this.table,t);break;case"object":Array.isArray(n)?t.forEach(r=>{var o=n.find(a=>a.field===r.field);o&&Object.assign(r,o)}):t.forEach(r=>{n[r.field]&&Object.assign(r,n[r.field])}),this.table.options.columns=t;break}else this.table.options.columns=t;this.setColumns(this.table.options.columns)}}calculateSorterFromValue(e){var t;switch(typeof e){case"undefined":t="string";break;case"boolean":t="boolean";break;case"number":t="number";break;case"object":Array.isArray(e)?t="array":t="string";break;default:!isNaN(e)&&e!==""?t="number":e.match(/((^[0-9]+[a-z]+)|(^[a-z]+[0-9]+))+$/i)?t="alphanum":t="string";break}return t}setColumns(e,t){for(;this.headersElement.firstChild;)this.headersElement.removeChild(this.headersElement.firstChild);this.columns=[],this.columnsByIndex=[],this.columnsByField={},this.dispatch("columns-loading"),this.dispatchExternal("columnsLoading"),this.table.options.rowHeader&&(this.rowHeader=new U(this.table.options.rowHeader===!0?{}:this.table.options.rowHeader,this,!0),this.columns.push(this.rowHeader),this.headersElement.appendChild(this.rowHeader.getElement()),this.rowHeader.columnRendered()),e.forEach((i,s)=>{this._addColumn(i)}),this._reIndexColumns(),this.dispatch("columns-loaded"),this.subscribedExternal("columnsLoaded")&&this.dispatchExternal("columnsLoaded",this.getComponents()),this.rerenderColumns(!1,!0),this.redraw(!0)}_addColumn(e,t,i){var s=new U(e,this),n=s.getElement(),r=i&&this.findColumnIndex(i);if(t&&this.rowHeader&&(!i||i===this.rowHeader)&&(t=!1,i=this.rowHeader,r=0),i&&r>-1){var o=i.getTopColumn(),a=this.columns.indexOf(o),h=o.getElement();t?(this.columns.splice(a,0,s),h.parentNode.insertBefore(n,h)):(this.columns.splice(a+1,0,s),h.parentNode.insertBefore(n,h.nextSibling))}else t?(this.columns.unshift(s),this.headersElement.insertBefore(s.getElement(),this.headersElement.firstChild)):(this.columns.push(s),this.headersElement.appendChild(s.getElement()));return s.columnRendered(),s}registerColumnField(e){e.definition.field&&(this.columnsByField[e.definition.field]=e)}registerColumnPosition(e){this.columnsByIndex.push(e)}_reIndexColumns(){this.columnsByIndex=[],this.columns.forEach(function(e){e.reRegisterPosition()})}verticalAlignHeaders(){var e=0;this.redrawBlock||(this.headersElement.style.height="",this.columns.forEach(t=>{t.clearVerticalAlign()}),this.columns.forEach(t=>{var i=t.getHeight();i>e&&(e=i)}),this.headersElement.style.height=e+"px",this.columns.forEach(t=>{t.verticalAlign(this.table.options.columnHeaderVertAlign,e)}),this.table.rowManager.adjustTableSize())}findColumn(e){var t;if(typeof e=="object"){if(e instanceof U)return e;if(e instanceof Qe)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return t=[],this.columns.forEach(s=>{t.push(s),t=t.concat(s.getColumns(!0))}),t.find(s=>s.element===e)||!1}else return this.columnsByField[e]||!1;return!1}getColumnByField(e){return this.columnsByField[e]}getColumnsByFieldRoot(e){var t=[];return Object.keys(this.columnsByField).forEach(i=>{var s=this.table.options.nestedFieldSeparator?i.split(this.table.options.nestedFieldSeparator)[0]:i;s===e&&t.push(this.columnsByField[i])}),t}getColumnByIndex(e){return this.columnsByIndex[e]}getFirstVisibleColumn(){var e=this.columnsByIndex.findIndex(t=>t.visible);return e>-1?this.columnsByIndex[e]:!1}getVisibleColumnsByIndex(){return this.columnsByIndex.filter(e=>e.visible)}getColumns(){return this.columns}findColumnIndex(e){return this.columnsByIndex.findIndex(t=>e===t)}getRealColumns(){return this.columnsByIndex}traverse(e){this.columnsByIndex.forEach((t,i)=>{e(t,i)})}getDefinitions(e){var t=[];return this.columnsByIndex.forEach(i=>{(!e||e&&i.visible)&&t.push(i.getDefinition())}),t}getDefinitionTree(){var e=[];return this.columns.forEach(t=>{e.push(t.getDefinition(!0))}),e}getComponents(e){var t=[],i=e?this.columns:this.columnsByIndex;return i.forEach(s=>{t.push(s.getComponent())}),t}getWidth(){var e=0;return this.columnsByIndex.forEach(t=>{t.visible&&(e+=t.getWidth())}),e}moveColumn(e,t,i){t.element.parentNode.insertBefore(e.element,t.element),i&&t.element.parentNode.insertBefore(t.element,e.element),this.moveColumnActual(e,t,i),this.verticalAlignHeaders(),this.table.rowManager.reinitialize()}moveColumnActual(e,t,i){e.parent.isGroup?this._moveColumnInArray(e.parent.columns,e,t,i):this._moveColumnInArray(this.columns,e,t,i),this._moveColumnInArray(this.columnsByIndex,e,t,i,!0),this.rerenderColumns(!0),this.dispatch("column-moved",e,t,i),this.subscribedExternal("columnMoved")&&this.dispatchExternal("columnMoved",e.getComponent(),this.table.columnManager.getComponents())}_moveColumnInArray(e,t,i,s,n){var r=e.indexOf(t),o,a=[];r>-1&&(e.splice(r,1),o=e.indexOf(i),o>-1?s&&(o=o+1):o=r,e.splice(o,0,t),n&&(a=this.chain("column-moving-rows",[t,i,s],null,[])||[],a=a.concat(this.table.rowManager.rows),a.forEach(function(h){if(h.cells.length){var d=h.cells.splice(r,1)[0];h.cells.splice(o,0,d)}})))}scrollToColumn(e,t,i){var s=0,n=e.getLeftOffset(),r=0,o=e.getElement();return new Promise((a,h)=>{if(typeof t>"u"&&(t=this.table.options.scrollToColumnPosition),typeof i>"u"&&(i=this.table.options.scrollToColumnIfVisible),e.visible){switch(t){case"middle":case"center":r=-this.element.clientWidth/2;break;case"right":r=o.clientWidth-this.headersElement.clientWidth;break}if(!i&&n>0&&n+o.offsetWidth{t.push(i.generateCell(e))}),t}getFlexBaseWidth(){var e=this.table.element.clientWidth,t=0;return this.table.rowManager.element.scrollHeight>this.table.rowManager.element.clientHeight&&(e-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),this.columnsByIndex.forEach(function(i){var s,n,r;i.visible&&(s=i.definition.width||0,n=parseInt(i.minWidth),typeof s=="string"?s.indexOf("%")>-1?r=e/100*parseInt(s):r=parseInt(s):r=s,t+=r>n?r:n)}),t}addColumn(e,t,i){return new Promise((s,n)=>{var r=this._addColumn(e,t,i);this._reIndexColumns(),this.dispatch("column-add",e,t,i),this.layoutMode()!="fitColumns"&&r.reinitializeWidth(),this.redraw(!0),this.table.rowManager.reinitialize(),this.rerenderColumns(),s(r)})}deregisterColumn(e){var t=e.getField(),i;t&&delete this.columnsByField[t],i=this.columnsByIndex.indexOf(e),i>-1&&this.columnsByIndex.splice(i,1),i=this.columns.indexOf(e),i>-1&&this.columns.splice(i,1),this.verticalAlignHeaders(),this.redraw()}rerenderColumns(e,t){this.redrawBlock?(e===!1||e===!0&&this.redrawBlockUpdate===null)&&(this.redrawBlockUpdate=e):this.renderer.rerenderColumns(e,t)}blockRedraw(){this.redrawBlock=!0,this.redrawBlockUpdate=null}restoreRedraw(){this.redrawBlock=!1,this.verticalAlignHeaders(),this.renderer.rerenderColumns(this.redrawBlockUpdate)}redraw(e){x.elVisible(this.element)&&this.verticalAlignHeaders(),e&&(this.table.rowManager.resetScroll(),this.table.rowManager.reinitialize()),this.confirm("table-redrawing",e)||this.layoutRefresh(e),this.dispatch("table-redraw",e),this.table.footerManager.redraw()}}class xs extends le{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.scrollTop=0,e.scrollLeft=0,e.style.minWidth="",e.style.minHeight="",e.style.display="",e.style.visibility=""}renderRows(){var e=this.tableElement,t=!0,i=document.createDocumentFragment(),s=this.rows();s.forEach((n,r)=>{this.styleRow(n,r),n.initialize(!1,!0),n.type!=="group"&&(t=!1),i.appendChild(n.getElement())}),e.appendChild(i),s.forEach(n=>{n.rendered(),n.heightInitialized||n.calcHeight(!0)}),s.forEach(n=>{n.heightInitialized||n.setCellHeight()}),t?e.style.minWidth=this.table.columnManager.getWidth()+"px":e.style.minWidth=""}rerenderRows(e){this.clearRows(),e&&e(),this.renderRows(),this.rows().length||this.table.rowManager.tableEmpty()}scrollToRowNearestTop(e){var t=x.elOffset(e.getElement()).top;return!(Math.abs(this.elementVertical.scrollTop-t)>Math.abs(this.elementVertical.scrollTop+this.elementVertical.clientHeight-t))}scrollToRow(e){var t=e.getElement();this.elementVertical.scrollTop=x.elOffset(t).top-x.elOffset(this.elementVertical).top+this.elementVertical.scrollTop}visibleRows(e){return this.rows()}}class Ts extends le{constructor(e){super(e),this.verticalFillMode="fill",this.scrollTop=0,this.scrollLeft=0,this.vDomRowHeight=20,this.vDomTop=0,this.vDomBottom=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomMaxRenderChain=90,this.vDomWindowBuffer=0,this.vDomWindowMinTotalRows=20,this.vDomWindowMinMarginRows=5,this.vDomTopNewRows=[],this.vDomBottomNewRows=[]}clearRows(){for(var e=this.tableElement;e.firstChild;)e.removeChild(e.firstChild);e.style.paddingTop="",e.style.paddingBottom="",e.style.minHeight="",e.style.display="",e.style.visibility="",this.elementVertical.scrollTop=0,this.elementVertical.scrollLeft=0,this.scrollTop=0,this.scrollLeft=0,this.vDomTop=0,this.vDomBottom=0,this.vDomTopPad=0,this.vDomBottomPad=0,this.vDomScrollPosTop=0,this.vDomScrollPosBottom=0}renderRows(){this._virtualRenderFill()}rerenderRows(e){for(var t=this.elementVertical.scrollTop,i=!1,s=!1,n=this.table.rowManager.scrollLeft,r=this.rows(),o=this.vDomTop;o<=this.vDomBottom;o++)if(r[o]){var a=t-r[o].getElement().offsetTop;if(s===!1||Math.abs(a){h.deinitializeHeight()}),e&&e(),this.rows().length?this._virtualRenderFill(i===!1?this.rows.length-1:i,!0,s||0):(this.clear(),this.table.rowManager.tableEmpty()),this.scrollColumns(n)}scrollColumns(e){this.table.rowManager.scrollHorizontal(e)}scrollRows(e,t){var i=e-this.vDomScrollPosTop,s=e-this.vDomScrollPosBottom,n=this.vDomWindowBuffer*2,r=this.rows();if(this.scrollTop=e,-i>n||s>n){var o=this.table.rowManager.scrollLeft;this._virtualRenderFill(Math.floor(this.elementVertical.scrollTop/this.elementVertical.scrollHeight*r.length)),this.scrollColumns(o)}else t?(i<0&&this._addTopRow(r,-i),s<0&&(this.vDomScrollHeight-this.scrollTop>this.vDomWindowBuffer?this._removeBottomRow(r,-s):this.vDomScrollPosBottom=this.scrollTop)):(s>=0&&this._addBottomRow(r,s),i>=0&&(this.scrollTop>this.vDomWindowBuffer?this._removeTopRow(r,i):this.vDomScrollPosTop=this.scrollTop))}resize(){this.vDomWindowBuffer=this.table.options.renderVerticalBuffer||this.elementVertical.clientHeight}scrollToRowNearestTop(e){var t=this.rows().indexOf(e);return!(Math.abs(this.vDomTop-t)>Math.abs(this.vDomBottom-t))}scrollToRow(e){var t=this.rows().indexOf(e);t>-1&&this._virtualRenderFill(t,!0)}visibleRows(e){var t=this.elementVertical.scrollTop,i=this.elementVertical.clientHeight+t,s=!1,n=0,r=0,o=this.rows();if(e)n=this.vDomTop,r=this.vDomBottom;else for(var a=this.vDomTop;a<=this.vDomBottom;a++)if(o[a])if(s)if(i-o[a].getElement().offsetTop>=0)r=a;else break;else if(t-o[a].getElement().offsetTop>=0)n=a;else if(s=!0,i-o[a].getElement().offsetTop>=0)r=a;else break;return o.slice(n,r+1)}_virtualRenderFill(e,t,i){var s=this.tableElement,n=this.elementVertical,r=0,o=0,a=0,h=0,d=0,u=0,c=this.rows(),f=c.length,g=0,p,v,m=[],C=0,T=0,y=this.table.rowManager.fixedHeight,k=this.elementVertical.clientHeight,P=this.table.options.rowHeight,X=!0;if(e=e||0,i=i||0,!e)this.clear();else{for(;s.firstChild;)s.removeChild(s.firstChild);h=(f-e+1)*this.vDomRowHeight,h{L.rendered(),L.heightInitialized||L.calcHeight(!0)}),m.forEach(L=>{L.heightInitialized||L.setCellHeight()}),m.forEach(L=>{a=L.getHeight(),Cthis.vDomWindowBuffer&&(this.vDomWindowBuffer=a*2),C++}),X=this.table.rowManager.adjustTableSize(),k=this.elementVertical.clientHeight,X&&(y||this.table.options.maxHeight)&&(P=o/C,T=Math.max(this.vDomWindowMinTotalRows,Math.ceil(k/P+this.vDomWindowBuffer/P)))}e?(this.vDomTopPad=t?this.vDomRowHeight*this.vDomTop+i:this.scrollTop-d,this.vDomBottomPad=this.vDomBottom==f-1?0:Math.max(this.vDomScrollHeight-this.vDomTopPad-o-d,0)):(this.vDomTopPad=0,this.vDomRowHeight=Math.floor((o+d)/C),this.vDomBottomPad=this.vDomRowHeight*(f-this.vDomBottom-1),this.vDomScrollHeight=d+o+this.vDomBottomPad-k),s.style.paddingTop=this.vDomTopPad+"px",s.style.paddingBottom=this.vDomBottomPad+"px",t&&(this.scrollTop=this.vDomTopPad+d+i-(this.elementVertical.scrollWidth>this.elementVertical.clientWidth?this.elementVertical.offsetHeight-k:0)),this.scrollTop=Math.min(this.scrollTop,this.elementVertical.scrollHeight-k),this.elementVertical.scrollWidth>this.elementVertical.clientWidth&&t&&(this.scrollTop+=this.elementVertical.offsetHeight-k),this.vDomScrollPosTop=this.scrollTop,this.vDomScrollPosBottom=this.scrollTop,n.scrollTop=this.scrollTop,this.dispatch("render-virtual-fill")}}_addTopRow(e,t){for(var i=this.tableElement,s=[],n=0,r=this.vDomTop-1,o=0,a=!0;a;)if(this.vDomTop){let h=e[r],d,u;h&&o=d?(this.styleRow(h,r),i.insertBefore(h.getElement(),i.firstChild),(!h.initialized||!h.heightInitialized)&&s.push(h),h.initialize(),u||(d=h.getElement().offsetHeight,d>this.vDomWindowBuffer&&(this.vDomWindowBuffer=d*2)),t-=d,n+=d,this.vDomTop--,r--,o++):a=!1):a=!1}else a=!1;for(let h of s)h.clearCellHeight();this._quickNormalizeRowHeight(s),n&&(this.vDomTopPad-=n,this.vDomTopPad<0&&(this.vDomTopPad=r*this.vDomRowHeight),r<1&&(this.vDomTopPad=0),i.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop-=n)}_removeTopRow(e,t){for(var i=[],s=0,n=0,r=!0;r;){let o=e[this.vDomTop],a;o&&n=a?(this.vDomTop++,t-=a,s+=a,i.push(o),n++):r=!1):r=!1}for(let o of i){let a=o.getElement();a.parentNode&&a.parentNode.removeChild(a)}s&&(this.vDomTopPad+=s,this.tableElement.style.paddingTop=this.vDomTopPad+"px",this.vDomScrollPosTop+=this.vDomTop?s:s+this.vDomWindowBuffer)}_addBottomRow(e,t){for(var i=this.tableElement,s=[],n=0,r=this.vDomBottom+1,o=0,a=!0;a;){let h=e[r],d,u;h&&o=d?(this.styleRow(h,r),i.appendChild(h.getElement()),(!h.initialized||!h.heightInitialized)&&s.push(h),h.initialize(),u||(d=h.getElement().offsetHeight,d>this.vDomWindowBuffer&&(this.vDomWindowBuffer=d*2)),t-=d,n+=d,this.vDomBottom++,r++,o++):a=!1):a=!1}for(let h of s)h.clearCellHeight();this._quickNormalizeRowHeight(s),n&&(this.vDomBottomPad-=n,(this.vDomBottomPad<0||r==e.length-1)&&(this.vDomBottomPad=0),i.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom+=n)}_removeBottomRow(e,t){for(var i=[],s=0,n=0,r=!0;r;){let o=e[this.vDomBottom],a;o&&n=a?(this.vDomBottom--,t-=a,s+=a,i.push(o),n++):r=!1):r=!1}for(let o of i){let a=o.getElement();a.parentNode&&a.parentNode.removeChild(a)}s&&(this.vDomBottomPad+=s,this.vDomBottomPad<0&&(this.vDomBottomPad=0),this.tableElement.style.paddingBottom=this.vDomBottomPad+"px",this.vDomScrollPosBottom-=s)}_quickNormalizeRowHeight(e){for(let t of e)t.calcHeight();for(let t of e)t.setCellHeight()}}class ks extends M{constructor(e){super(e),this.element=this.createHolderElement(),this.tableElement=this.createTableElement(),this.heightFixer=this.createTableElement(),this.placeholder=null,this.placeholderContents=null,this.firstRender=!1,this.renderMode="virtual",this.fixedHeight=!1,this.rows=[],this.activeRowsPipeline=[],this.activeRows=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0,this.scrollTop=0,this.scrollLeft=0,this.redrawBlock=!1,this.redrawBlockRestoreConfig=!1,this.redrawBlockRenderInPosition=!1,this.dataPipeline=[],this.displayPipeline=[],this.scrollbarWidth=0,this.renderer=null}createHolderElement(){var e=document.createElement("div");return e.classList.add("tabulator-tableholder"),e.setAttribute("tabindex",0),e}createTableElement(){var e=document.createElement("div");return e.classList.add("tabulator-table"),e.setAttribute("role","rowgroup"),e}initializePlaceholder(){var e=this.table.options.placeholder;if(typeof e=="function"&&(e=e.call(this.table)),e=this.chain("placeholder",[e],e,e)||e,e){let t=document.createElement("div");if(t.classList.add("tabulator-placeholder"),typeof e=="string"){let i=document.createElement("div");i.classList.add("tabulator-placeholder-contents"),i.innerHTML=e,t.appendChild(i),this.placeholderContents=i}else typeof HTMLElement<"u"&&e instanceof HTMLElement?(t.appendChild(e),this.placeholderContents=e):(console.warn("Invalid placeholder provided, must be string or HTML Element",e),this.el=null);this.placeholder=t}}getElement(){return this.element}getTableElement(){return this.tableElement}initialize(){this.initializePlaceholder(),this.initializeRenderer(),this.element.appendChild(this.tableElement),this.firstRender=!0,this.element.addEventListener("scroll",()=>{var e=this.element.scrollLeft,t=this.scrollLeft>e,i=this.element.scrollTop,s=this.scrollTop>i;this.scrollLeft!=e&&(this.scrollLeft=e,this.dispatch("scroll-horizontal",e,t),this.dispatchExternal("scrollHorizontal",e,t),this._positionPlaceholder()),this.scrollTop!=i&&(this.scrollTop=i,this.renderer.scrollRows(i,s),this.dispatch("scroll-vertical",i,s),this.dispatchExternal("scrollVertical",i,s))})}findRow(e){if(typeof e=="object"){if(e instanceof S)return e;if(e instanceof oe)return e._getSelf()||!1;if(typeof HTMLElement<"u"&&e instanceof HTMLElement)return this.rows.find(i=>i.getElement()===e)||!1;if(e===null)return!1}else return typeof e>"u"?!1:this.rows.find(i=>i.data[this.table.options.index]==e)||!1;return!1}getRowFromDataObject(e){var t=this.rows.find(i=>i.data===e);return t||!1}getRowFromPosition(e){return this.getDisplayRows().find(t=>t.type==="row"&&t.getPosition()===e&&t.isDisplayed())}scrollToRow(e,t,i){return this.renderer.scrollToRowPosition(e,t,i)}setData(e,t,i){return new Promise((s,n)=>{t&&this.getDisplayRows().length?this.table.options.pagination?this._setDataActual(e,!0):this.reRenderInPosition(()=>{this._setDataActual(e)}):(this.table.options.autoColumns&&i&&this.table.initialized&&this.table.columnManager.generateColumnsFromRowData(e),this.resetScroll(),this._setDataActual(e)),s()})}_setDataActual(e,t){this.dispatchExternal("dataProcessing",e),this._wipeElements(),Array.isArray(e)?(this.dispatch("data-processing",e),e.forEach((i,s)=>{if(i&&typeof i=="object"){var n=new S(i,this);this.rows.push(n)}else console.warn("Data Loading Warning - Invalid row data detected and ignored, expecting object but received:",i)}),this.refreshActiveData(!1,!1,t),this.dispatch("data-processed",e),this.dispatchExternal("dataProcessed",e)):console.error(`Data Loading Error - Unable to process data due to invalid data type +Expecting: array +Received: `,typeof e,` +Data: `,e)}_wipeElements(){this.dispatch("rows-wipe"),this.destroy(),this.adjustTableSize(),this.dispatch("rows-wiped")}destroy(){this.rows.forEach(e=>{e.wipe()}),this.rows=[],this.activeRows=[],this.activeRowsPipeline=[],this.activeRowsCount=0,this.displayRows=[],this.displayRowsCount=0}deleteRow(e,t){var i=this.rows.indexOf(e),s=this.activeRows.indexOf(e);s>-1&&this.activeRows.splice(s,1),i>-1&&this.rows.splice(i,1),this.setActiveRows(this.activeRows),this.displayRowIterator(n=>{var r=n.indexOf(e);r>-1&&n.splice(r,1)}),t||this.reRenderInPosition(),this.regenerateRowPositions(),this.dispatchExternal("rowDeleted",e.getComponent()),this.displayRowsCount||this.tableEmpty(),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.getData())}addRow(e,t,i,s){var n=this.addRowActual(e,t,i,s);return n}addRows(e,t,i,s){var n=[];return new Promise((r,o)=>{t=this.findAddRowPos(t),Array.isArray(e)||(e=[e]),(typeof i>"u"&&t||typeof i<"u"&&!t)&&e.reverse(),e.forEach((a,h)=>{var d=this.addRow(a,t,i,!0);n.push(d),this.dispatch("row-added",d,a,t,i)}),this.refreshActiveData(s?"displayPipeline":!1,!1,!0),this.regenerateRowPositions(),this.displayRowsCount&&this._clearPlaceholder(),r(n)})}findAddRowPos(e){return typeof e>"u"&&(e=this.table.options.addRowPos),e==="pos"&&(e=!0),e==="bottom"&&(e=!1),e}addRowActual(e,t,i,s){var n=e instanceof S?e:new S(e||{},this),r=this.findAddRowPos(t),o=-1,a,h;return i||(h=this.chain("row-adding-position",[n,r],null,{index:i,top:r}),i=h.index,r=h.top),typeof i<"u"&&(i=this.findRow(i)),i=this.chain("row-adding-index",[n,i,r],null,i),i&&(o=this.rows.indexOf(i)),i&&o>-1?(a=this.activeRows.indexOf(i),this.displayRowIterator(function(d){var u=d.indexOf(i);u>-1&&d.splice(r?u:u+1,0,n)}),a>-1&&this.activeRows.splice(r?a:a+1,0,n),this.rows.splice(r?o:o+1,0,n)):r?(this.displayRowIterator(function(d){d.unshift(n)}),this.activeRows.unshift(n),this.rows.unshift(n)):(this.displayRowIterator(function(d){d.push(n)}),this.activeRows.push(n),this.rows.push(n)),this.setActiveRows(this.activeRows),this.dispatchExternal("rowAdded",n.getComponent()),this.subscribedExternal("dataChanged")&&this.dispatchExternal("dataChanged",this.table.rowManager.getData()),s||this.reRenderInPosition(),n}moveRow(e,t,i){this.dispatch("row-move",e,t,i),this.moveRowActual(e,t,i),this.regenerateRowPositions(),this.dispatch("row-moved",e,t,i),this.dispatchExternal("rowMoved",e.getComponent())}moveRowActual(e,t,i){this.moveRowInArray(this.rows,e,t,i),this.moveRowInArray(this.activeRows,e,t,i),this.displayRowIterator(s=>{this.moveRowInArray(s,e,t,i)}),this.dispatch("row-moving",e,t,i)}moveRowInArray(e,t,i,s){var n,r,o,a;if(t!==i&&(n=e.indexOf(t),n>-1&&(e.splice(n,1),r=e.indexOf(i),r>-1?s?e.splice(r+1,0,t):e.splice(r,0,t):e.splice(n,0,t)),e===this.getDisplayRows())){o=nn?r:n+1;for(let h=o;h<=a;h++)e[h]&&this.styleRow(e[h],h)}}clearData(){this.setData([])}getRowIndex(e){return this.findRowIndex(e,this.rows)}getDisplayRowIndex(e){var t=this.getDisplayRows().indexOf(e);return t>-1?t:!1}nextDisplayRow(e,t){var i=this.getDisplayRowIndex(e),s=!1;return i!==!1&&i-1)?i:!1}getData(e,t){var i=[],s=this.getRows(e);return s.forEach(function(n){n.type=="row"&&i.push(n.getData(t||"data"))}),i}getComponents(e){var t=[],i=this.getRows(e);return i.forEach(function(s){t.push(s.getComponent())}),t}getDataCount(e){var t=this.getRows(e);return t.length}scrollHorizontal(e){this.scrollLeft=e,this.element.scrollLeft=e,this.dispatch("scroll-horizontal",e)}registerDataPipelineHandler(e,t){typeof t<"u"?(this.dataPipeline.push({handler:e,priority:t}),this.dataPipeline.sort((i,s)=>i.priority-s.priority)):console.error("Data pipeline handlers must have a priority in order to be registered")}registerDisplayPipelineHandler(e,t){typeof t<"u"?(this.displayPipeline.push({handler:e,priority:t}),this.displayPipeline.sort((i,s)=>i.priority-s.priority)):console.error("Display pipeline handlers must have a priority in order to be registered")}refreshActiveData(e,t,i){var s=this.table,n="",r=0,o=["all","dataPipeline","display","displayPipeline","end"];if(!this.table.destroyed){if(typeof e=="function")if(r=this.dataPipeline.findIndex(a=>a.handler===e),r>-1)n="dataPipeline",t&&(r==this.dataPipeline.length-1?n="display":r++);else if(r=this.displayPipeline.findIndex(a=>a.handler===e),r>-1)n="displayPipeline",t&&(r==this.displayPipeline.length-1?n="end":r++);else{console.error("Unable to refresh data, invalid handler provided",e);return}else n=e||"all",r=0;if(this.redrawBlock){(!this.redrawBlockRestoreConfig||this.redrawBlockRestoreConfig&&(this.redrawBlockRestoreConfig.stage===n&&r{i.type==="row"&&(i.setPosition(t),t++)})}setActiveRows(e){this.activeRows=this.activeRows=Object.assign([],e),this.activeRowsCount=this.activeRows.length}resetDisplayRows(){this.displayRows=[],this.displayRows.push(this.activeRows.slice(0)),this.displayRowsCount=this.displayRows[0].length}setDisplayRows(e,t){this.displayRows[t]=e,t==this.displayRows.length-1&&(this.displayRowsCount=this.displayRows[this.displayRows.length-1].length)}getDisplayRows(e){return typeof e>"u"?this.displayRows.length?this.displayRows[this.displayRows.length-1]:[]:this.displayRows[e]||[]}getVisibleRows(e,t){var i=Object.assign([],this.renderer.visibleRows(!t));return e&&(i=this.chain("rows-visible",[t],i,i)),i}displayRowIterator(e){this.activeRowsPipeline.forEach(e),this.displayRows.forEach(e),this.displayRowsCount=this.displayRows[this.displayRows.length-1].length}getRows(e){var t=[];switch(e){case"active":t=this.activeRows;break;case"display":t=this.table.rowManager.getDisplayRows();break;case"visible":t=this.getVisibleRows(!1,!0);break;default:t=this.chain("rows-retrieve",e,null,this.rows)||this.rows}return t}reRenderInPosition(e){this.redrawBlock?e?e():this.redrawBlockRenderInPosition=!0:(this.dispatchExternal("renderStarted"),this.renderer.rerenderRows(e),this.fixedHeight||this.adjustTableSize(),this.scrollBarCheck(),this.dispatchExternal("renderComplete"))}scrollBarCheck(){var e=0;this.element.scrollHeight>this.element.clientHeight&&(e=this.element.offsetWidth-this.element.clientWidth),e!==this.scrollbarWidth&&(this.scrollbarWidth=e,this.dispatch("scrollbar-vertical",e))}initializeRenderer(){var e,t={virtual:Ts,basic:xs};typeof this.table.options.renderVertical=="string"?e=t[this.table.options.renderVertical]:e=this.table.options.renderVertical,e?(this.renderMode=this.table.options.renderVertical,this.renderer=new e(this.table,this.element,this.tableElement),this.renderer.initialize(),(this.table.element.clientHeight||this.table.options.height)&&!(this.table.options.minHeight&&this.table.options.maxHeight)?this.fixedHeight=!0:this.fixedHeight=!1):console.error("Unable to find matching renderer:",this.table.options.renderVertical)}getRenderMode(){return this.renderMode}renderTable(){this.dispatchExternal("renderStarted"),this.element.scrollTop=0,this._clearTable(),this.displayRowsCount?(this.renderer.renderRows(),this.firstRender&&(this.firstRender=!1,this.fixedHeight||this.adjustTableSize(),this.layoutRefresh(!0))):this.renderEmptyScroll(),this.fixedHeight||this.adjustTableSize(),this.dispatch("table-layout"),this.displayRowsCount||this._showPlaceholder(),this.scrollBarCheck(),this.dispatchExternal("renderComplete")}renderEmptyScroll(){this.placeholder?this.tableElement.style.display="none":this.tableElement.style.minWidth=this.table.columnManager.getWidth()+"px"}_clearTable(){this._clearPlaceholder(),this.scrollTop=0,this.scrollLeft=0,this.renderer.clearRows()}tableEmpty(){this.renderEmptyScroll(),this._showPlaceholder()}checkPlaceholder(){this.displayRowsCount?this._clearPlaceholder():this.tableEmpty()}_showPlaceholder(){this.placeholder&&(this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.initializePlaceholder(),this.placeholder.setAttribute("tabulator-render-mode",this.renderMode),this.getElement().appendChild(this.placeholder),this._positionPlaceholder(),this.adjustTableSize())}_clearPlaceholder(){this.placeholder&&this.placeholder.parentNode&&this.placeholder.parentNode.removeChild(this.placeholder),this.tableElement.style.minWidth="",this.tableElement.style.display=""}_positionPlaceholder(){this.placeholder&&this.placeholder.parentNode&&(this.placeholder.style.width=this.table.columnManager.getWidth()+"px",this.placeholderContents.style.width=this.table.rowManager.element.clientWidth+"px",this.placeholderContents.style.marginLeft=this.scrollLeft+"px")}styleRow(e,t){var i=e.getElement();t%2?(i.classList.add("tabulator-row-even"),i.classList.remove("tabulator-row-odd")):(i.classList.add("tabulator-row-odd"),i.classList.remove("tabulator-row-even"))}normalizeHeight(){this.activeRows.forEach(function(e){e.normalizeHeight()})}adjustTableSize(){let e=this.element.clientHeight,t,i=!1;if(this.renderer.verticalFillMode==="fill"){let s=Math.floor(this.table.columnManager.getElement().getBoundingClientRect().height+(this.table.footerManager&&this.table.footerManager.active&&!this.table.footerManager.external?this.table.footerManager.getElement().getBoundingClientRect().height:0));if(this.fixedHeight){t=isNaN(this.table.options.minHeight)?this.table.options.minHeight:this.table.options.minHeight+"px";const n="calc(100% - "+s+"px)";this.element.style.minHeight=t||"calc(100% - "+s+"px)",this.element.style.height=n,this.element.style.maxHeight=n}else this.element.style.height="",this.element.style.height=this.table.element.clientHeight-s+"px",this.element.scrollTop=this.scrollTop;this.renderer.resize(),!this.fixedHeight&&e!=this.element.clientHeight&&(i=!0,this.subscribed("table-resize")?this.dispatch("table-resize"):this.redraw()),this.scrollBarCheck()}return this._positionPlaceholder(),i}reinitialize(){this.rows.forEach(function(e){e.reinitialize(!0)})}blockRedraw(){this.redrawBlock=!0,this.redrawBlockRestoreConfig=!1}restoreRedraw(){this.redrawBlock=!1,this.redrawBlockRestoreConfig?(this.refreshActiveData(this.redrawBlockRestoreConfig.handler,this.redrawBlockRestoreConfig.skipStage,this.redrawBlockRestoreConfig.renderInPosition),this.redrawBlockRestoreConfig=!1):this.redrawBlockRenderInPosition&&this.reRenderInPosition(),this.redrawBlockRenderInPosition=!1}redraw(e){this.adjustTableSize(),this.table.tableWidth=this.table.element.clientWidth,e?this.renderTable():(this.reRenderInPosition(),this.scrollHorizontal(this.scrollLeft))}resetScroll(){if(this.element.scrollLeft=0,this.element.scrollTop=0,this.table.browser==="ie"){var e=document.createEvent("Event");e.initEvent("scroll",!1,!0),this.element.dispatchEvent(e)}else this.element.dispatchEvent(new Event("scroll"))}}class Ms extends M{constructor(e){super(e),this.active=!1,this.element=this.createElement(),this.containerElement=this.createContainerElement(),this.external=!1}initialize(){this.initializeElement()}createElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer"),e}createContainerElement(){var e=document.createElement("div");return e.classList.add("tabulator-footer-contents"),this.element.appendChild(e),e}initializeElement(){if(this.table.options.footerElement)switch(typeof this.table.options.footerElement){case"string":this.table.options.footerElement[0]==="<"?this.containerElement.innerHTML=this.table.options.footerElement:(this.external=!0,this.containerElement=document.querySelector(this.table.options.footerElement));break;default:this.element=this.table.options.footerElement;break}}getElement(){return this.element}append(e){this.activate(),this.containerElement.appendChild(e),this.table.rowManager.adjustTableSize()}prepend(e){this.activate(),this.element.insertBefore(e,this.element.firstChild),this.table.rowManager.adjustTableSize()}remove(e){e.parentNode.removeChild(e),this.deactivate()}deactivate(e){(!this.element.firstChild||e)&&(this.external||this.element.parentNode.removeChild(this.element),this.active=!1)}activate(){this.active||(this.active=!0,this.external||(this.table.element.appendChild(this.getElement()),this.table.element.style.display=""))}redraw(){this.dispatch("footer-redraw")}}class Ls extends M{constructor(e){super(e),this.el=null,this.abortClasses=["tabulator-headers","tabulator-table"],this.previousTargets={},this.listeners=["click","dblclick","contextmenu","mouseenter","mouseleave","mouseover","mouseout","mousemove","mouseup","mousedown","touchstart","touchend"],this.componentMap={"tabulator-cell":"cell","tabulator-row":"row","tabulator-group":"group","tabulator-col":"column"},this.pseudoTrackers={row:{subscriber:null,target:null},cell:{subscriber:null,target:null},group:{subscriber:null,target:null},column:{subscriber:null,target:null}},this.pseudoTracking=!1}initialize(){this.el=this.table.element,this.buildListenerMap(),this.bindSubscriptionWatchers()}buildListenerMap(){var e={};this.listeners.forEach(t=>{e[t]={handler:null,components:[]}}),this.listeners=e}bindPseudoEvents(){Object.keys(this.pseudoTrackers).forEach(e=>{this.pseudoTrackers[e].subscriber=this.pseudoMouseEnter.bind(this,e),this.subscribe(e+"-mouseover",this.pseudoTrackers[e].subscriber)}),this.pseudoTracking=!0}pseudoMouseEnter(e,t,i){this.pseudoTrackers[e].target!==i&&(this.pseudoTrackers[e].target&&this.dispatch(e+"-mouseleave",t,this.pseudoTrackers[e].target),this.pseudoMouseLeave(e,t),this.pseudoTrackers[e].target=i,this.dispatch(e+"-mouseenter",t,i))}pseudoMouseLeave(e,t){var i=Object.keys(this.pseudoTrackers),s={row:["cell"],cell:["row"]};i=i.filter(n=>{var r=s[e];return n!==e&&(!r||r&&!r.includes(n))}),i.forEach(n=>{var r=this.pseudoTrackers[n].target;this.pseudoTrackers[n].target&&(this.dispatch(n+"-mouseleave",t,r),this.pseudoTrackers[n].target=null)})}bindSubscriptionWatchers(){var e=Object.keys(this.listeners),t=Object.values(this.componentMap);for(let i of t)for(let s of e){let n=i+"-"+s;this.subscriptionChange(n,this.subscriptionChanged.bind(this,i,s))}this.subscribe("table-destroy",this.clearWatchers.bind(this))}subscriptionChanged(e,t,i){var s=this.listeners[t].components,n=s.indexOf(e),r=!1;i?n===-1&&(s.push(e),r=!0):this.subscribed(e+"-"+t)||n>-1&&(s.splice(n,1),r=!0),(t==="mouseenter"||t==="mouseleave")&&!this.pseudoTracking&&this.bindPseudoEvents(),r&&this.updateEventListeners()}updateEventListeners(){for(let e in this.listeners){let t=this.listeners[e];t.components.length?t.handler||(t.handler=this.track.bind(this,e),this.el.addEventListener(e,t.handler)):t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}track(e,t){var i=t.composedPath&&t.composedPath()||t.path,s=this.findTargets(i);s=this.bindComponents(e,s),this.triggerEvents(e,t,s),this.pseudoTracking&&(e=="mouseover"||e=="mouseleave")&&!Object.keys(s).length&&this.pseudoMouseLeave("none",t)}findTargets(e){var t={};let i=Object.keys(this.componentMap);for(let s of e){let n=s.classList?[...s.classList]:[];if(n.filter(a=>this.abortClasses.includes(a)).length)break;let o=n.filter(a=>i.includes(a));for(let a of o)t[this.componentMap[a]]||(t[this.componentMap[a]]=s)}return t.group&&t.group===t.row&&delete t.row,t}bindComponents(e,t){var i=Object.keys(t).reverse(),s=this.listeners[e],n={},r={};for(let o of i){let a,h=t[o],d=this.previousTargets[o];if(d&&d.target===h)a=d.component;else switch(o){case"row":case"group":(s.components.includes("row")||s.components.includes("cell")||s.components.includes("group"))&&(a=this.table.rowManager.getVisibleRows(!0).find(c=>c.getElement()===h),t.row&&t.row.parentNode&&t.row.parentNode.closest(".tabulator-row")&&(t[o]=!1));break;case"column":s.components.includes("column")&&(a=this.table.columnManager.findColumn(h));break;case"cell":s.components.includes("cell")&&(n.row instanceof S?a=n.row.findCell(h):t.row&&console.warn("Event Target Lookup Error - The row this cell is attached to cannot be found, has the table been reinitialized without being destroyed first?"));break}a&&(n[o]=a,r[o]={target:h,component:a})}return this.previousTargets=r,n}triggerEvents(e,t,i){var s=this.listeners[e];for(let n in i)i[n]&&s.components.includes(n)&&this.dispatch(n+"-"+e,t,i[n])}clearWatchers(){for(let e in this.listeners){let t=this.listeners[e];t.handler&&(this.el.removeEventListener(e,t.handler),t.handler=null)}}}class Ss{constructor(e){this.table=e,this.bindings={}}bind(e,t,i){this.bindings[e]||(this.bindings[e]={}),this.bindings[e][t]?console.warn("Unable to bind component handler, a matching function name is already bound",e,t,i):this.bindings[e][t]=i}handle(e,t,i){if(this.bindings[e]&&this.bindings[e][i]&&typeof this.bindings[e][i].bind=="function")return this.bindings[e][i].bind(null,t);i!=="then"&&typeof i=="string"&&!i.startsWith("_")&&this.table.options.debugInvalidComponentFuncs&&console.error("The "+e+" component does not have a "+i+" function, have you checked that you have the correct Tabulator module installed?")}}class Ds extends M{constructor(e){super(e),this.requestOrder=0,this.loading=!1}initialize(){}load(e,t,i,s,n,r){var o=++this.requestOrder;if(this.table.destroyed)return Promise.resolve();if(this.dispatchExternal("dataLoading",e),e&&(e.indexOf("{")==0||e.indexOf("[")==0)&&(e=JSON.parse(e)),this.confirm("data-loading",[e,t,i,n])){this.loading=!0,n||this.alertLoader(),t=this.chain("data-params",[e,i,n],t||{},t||{}),t=this.mapParams(t,this.table.options.dataSendParams);var a=this.chain("data-load",[e,t,i,n],!1,Promise.resolve([]));return a.then(h=>{if(this.table.destroyed)console.warn("Data Load Response Blocked - Table has been destroyed");else{!Array.isArray(h)&&typeof h=="object"&&(h=this.mapParams(h,this.objectInvert(this.table.options.dataReceiveParams)));var d=this.chain("data-loaded",[h],null,h);o==this.requestOrder?(this.clearAlert(),d!==!1&&(this.dispatchExternal("dataLoaded",d),this.table.rowManager.setData(d,s,typeof r>"u"?!s:r))):console.warn("Data Load Response Blocked - An active data load request was blocked by an attempt to change table data while the request was being made")}}).catch(h=>{console.error("Data Load Error: ",h),this.dispatchExternal("dataLoadError",h),n||this.alertError(),setTimeout(()=>{this.clearAlert()},this.table.options.dataLoaderErrorTimeout)}).finally(()=>{this.loading=!1})}else return this.dispatchExternal("dataLoaded",e),e||(e=[]),this.table.rowManager.setData(e,s,typeof r>"u"?!s:r),Promise.resolve()}mapParams(e,t){var i={};for(let s in e)i[t.hasOwnProperty(s)?t[s]:s]=e[s];return i}objectInvert(e){var t={};for(let i in e)t[e[i]]=i;return t}blockActiveLoad(){this.requestOrder++}alertLoader(){var e=typeof this.table.options.dataLoader=="function"?this.table.options.dataLoader():this.table.options.dataLoader;e&&this.table.alertManager.alert(this.table.options.dataLoaderLoading||this.langText("data|loading"))}alertError(){this.table.alertManager.alert(this.table.options.dataLoaderError||this.langText("data|error"),"error")}clearAlert(){this.table.alertManager.clear()}}class zs{constructor(e,t,i){this.table=e,this.events={},this.optionsList=t||{},this.subscriptionNotifiers={},this.dispatch=i?this._debugDispatch.bind(this):this._dispatch.bind(this),this.debug=i}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e])if(t)if(i=this.events[e].findIndex(s=>s===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}else delete this.events[e];else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(s=>{s(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift(),i;return this.events[t]&&this.events[t].forEach((s,n)=>{let r=s.apply(this.table,e);n||(i=r)}),i}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="ExternalEvent:"+e[0],(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}}class Hs{constructor(e){this.events={},this.subscriptionNotifiers={},this.dispatch=e?this._debugDispatch.bind(this):this._dispatch.bind(this),this.chain=e?this._debugChain.bind(this):this._chain.bind(this),this.confirm=e?this._debugConfirm.bind(this):this._confirm.bind(this),this.debug=e}subscriptionChange(e,t){this.subscriptionNotifiers[e]||(this.subscriptionNotifiers[e]=[]),this.subscriptionNotifiers[e].push(t),this.subscribed(e)&&this._notifySubscriptionChange(e,!0)}subscribe(e,t,i=1e4){this.events[e]||(this.events[e]=[]),this.events[e].push({callback:t,priority:i}),this.events[e].sort((s,n)=>s.priority-n.priority),this._notifySubscriptionChange(e,!0)}unsubscribe(e,t){var i;if(this.events[e]){if(t)if(i=this.events[e].findIndex(s=>s.callback===t),i>-1)this.events[e].splice(i,1);else{console.warn("Cannot remove event, no matching event found:",e,t);return}}else{console.warn("Cannot remove event, no events set on:",e);return}this._notifySubscriptionChange(e,!1)}subscribed(e){return this.events[e]&&this.events[e].length}_chain(e,t,i,s){var n=i;return Array.isArray(t)||(t=[t]),this.subscribed(e)?(this.events[e].forEach((r,o)=>{n=r.callback.apply(this,t.concat([n]))}),n):typeof s=="function"?s():s}_confirm(e,t){var i=!1;return Array.isArray(t)||(t=[t]),this.subscribed(e)&&this.events[e].forEach((s,n)=>{s.callback.apply(this,t)&&(i=!0)}),i}_notifySubscriptionChange(e,t){var i=this.subscriptionNotifiers[e];i&&i.forEach(s=>{s(t)})}_dispatch(){var e=Array.from(arguments),t=e.shift();this.events[t]&&this.events[t].forEach(i=>{i.callback.apply(this,e)})}_debugDispatch(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._dispatch(...arguments)}_debugChain(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._chain(...arguments)}_debugConfirm(){var e=Array.from(arguments),t=e[0];return e[0]="InternalEvent:"+t,(this.debug===!0||this.debug.includes(t))&&console.log(...e),this._confirm(...arguments)}}class Fs extends M{constructor(e){super(e)}_warnUser(){this.options("debugDeprecation")&&console.warn(...arguments)}check(e,t,i){var s="";return typeof this.options(e)<"u"?(s="Deprecated Setup Option - Use of the %c"+e+"%c option is now deprecated",t?(s=s+", Please use the %c"+t+"%c option instead",this._warnUser(s,"font-weight: bold;","font-weight: normal;","font-weight: bold;","font-weight: normal;"),i&&(this.table.options[t]=this.table.options[e])):this._warnUser(s,"font-weight: bold;","font-weight: normal;"),!1):!0}checkMsg(e,t){return typeof this.options(e)<"u"?(this._warnUser("%cDeprecated Setup Option - Use of the %c"+e+" %c option is now deprecated, "+t,"font-weight: normal;","font-weight: bold;","font-weight: normal;"),!1):!0}msg(e){this._warnUser(e)}}function Ps(l,e){e&&this.table.columnManager.renderer.reinitializeColumnWidths(l),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function Je(l,e){l.forEach(function(t){t.reinitializeWidth()}),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function Os(l,e){var t=0,i=this.table.rowManager.element.clientWidth,s=0,n=!1;l.forEach((r,o)=>{r.widthFixed||r.reinitializeWidth(),(this.table.options.responsiveLayout?r.modules.responsive.visible:r.visible)&&(n=r),r.visible&&(t+=r.getWidth())}),n?(s=i-t+n.getWidth(),this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&(n.setWidth(0),this.table.modules.responsiveLayout.update()),s>0?n.setWidth(s):n.reinitializeWidth()):this.table.options.responsiveLayout&&this.table.modExists("responsiveLayout",!0)&&this.table.modules.responsiveLayout.update()}function As(l,e){var t=this.table.rowManager.element.getBoundingClientRect().width,i=0,s=0,n=0,r=0,o=[],a=[],h=0,d=0,u=0;function c(g){var p;return typeof g=="string"?g.indexOf("%")>-1?p=t/100*parseInt(g):p=parseInt(g):p=g,p}function f(g,p,v,m){var C=[],T=0,y=0,k=0,P=n,X=0,L=0,he=[];function Ie(E){return v*(E.column.definition.widthGrow||1)}function Ne(E){return c(E.width)-v*(E.column.definition.widthShrink||0)}return g.forEach(function(E,Xs){var We=m?Ne(E):Ie(E);E.column.minWidth>=We?C.push(E):E.column.maxWidth&&E.column.maxWidththis.table.rowManager.element.clientHeight&&(t-=this.table.rowManager.element.offsetWidth-this.table.rowManager.element.clientWidth),l.forEach(function(g){var p,v,m;g.visible&&(p=g.definition.width,v=parseInt(g.minWidth),p?(m=c(p),i+=m>v?m:v,g.definition.widthShrink&&(a.push({column:g,width:m>v?m:v}),h+=g.definition.widthShrink)):(o.push({column:g,width:0}),n+=g.definition.widthGrow||1))}),s=t-i,r=Math.floor(s/n),u=f(o,s,r,!1),o.length&&u>0&&(o[o.length-1].width+=u),o.forEach(function(g){s-=g.width}),d=Math.abs(u)+s,d>0&&h&&(u=f(a,d,Math.floor(d/h),!0)),u&&a.length&&(a[a.length-1].width-=u),o.forEach(function(g){g.column.setWidth(g.width)}),a.forEach(function(g){g.column.setWidth(g.width)})}var _s={fitData:Ps,fitDataFill:Je,fitDataTable:Je,fitDataStretch:Os,fitColumns:As};const $=class $ extends w{constructor(e){super(e,"layout"),this.mode=null,this.registerTableOption("layout","fitData"),this.registerTableOption("layoutColumnsOnNewData",!1),this.registerColumnOption("widthGrow"),this.registerColumnOption("widthShrink")}initialize(){var e=this.table.options.layout;$.modes[e]?this.mode=e:(console.warn("Layout Error - invalid mode set, defaulting to 'fitData' : "+e),this.mode="fitData"),this.table.element.setAttribute("tabulator-layout",this.mode),this.subscribe("column-init",this.initializeColumn.bind(this))}initializeColumn(e){e.definition.widthGrow&&(e.definition.widthGrow=Number(e.definition.widthGrow)),e.definition.widthShrink&&(e.definition.widthShrink=Number(e.definition.widthShrink))}getMode(){return this.mode}layout(e){this.dispatch("layout-refreshing"),$.modes[this.mode].call(this,this.table.columnManager.columnsByIndex,e),this.dispatch("layout-refreshed")}};b($,"moduleName","layout"),b($,"modes",_s);let Pe=$;var Bs={default:{groups:{item:"item",items:"items"},columns:{},data:{loading:"Loading",error:"Error"},pagination:{page_size:"Page Size",page_title:"Show Page",first:"First",first_title:"First Page",last:"Last",last_title:"Last Page",prev:"Prev",prev_title:"Prev Page",next:"Next",next_title:"Next Page",all:"All",counter:{showing:"Showing",of:"of",rows:"rows",pages:"pages"}},headerFilters:{default:"filter column...",columns:{}}}};const se=class se extends w{constructor(e){super(e),this.locale="default",this.lang=!1,this.bindings={},this.langList={},this.registerTableOption("locale",!1),this.registerTableOption("langs",{})}initialize(){this.langList=x.deepClone(se.langs),this.table.options.columnDefaults.headerFilterPlaceholder!==!1&&this.setHeaderFilterPlaceholder(this.table.options.columnDefaults.headerFilterPlaceholder);for(let e in this.table.options.langs)this.installLang(e,this.table.options.langs[e]);this.setLocale(this.table.options.locale),this.registerTableFunction("setLocale",this.setLocale.bind(this)),this.registerTableFunction("getLocale",this.getLocale.bind(this)),this.registerTableFunction("getLang",this.getLang.bind(this))}setHeaderFilterPlaceholder(e){this.langList.default.headerFilters.default=e}installLang(e,t){this.langList[e]?this._setLangProp(this.langList[e],t):this.langList[e]=t}_setLangProp(e,t){for(let i in t)e[i]&&typeof e[i]=="object"?this._setLangProp(e[i],t[i]):e[i]=t[i]}setLocale(e){e=e||"default";function t(i,s){for(var n in i)typeof i[n]=="object"?(s[n]||(s[n]={}),t(i[n],s[n])):s[n]=i[n]}if(e===!0&&navigator.language&&(e=navigator.language.toLowerCase()),e&&!this.langList[e]){let i=e.split("-")[0];this.langList[i]?(console.warn("Localization Error - Exact matching locale not found, using closest match: ",e,i),e=i):(console.warn("Localization Error - Matching locale not found, using default: ",e),e="default")}this.locale=e,this.lang=x.deepClone(this.langList.default||{}),e!="default"&&t(this.langList[e],this.lang),this.dispatchExternal("localized",this.locale,this.lang),this._executeBindings()}getLocale(e){return this.locale}getLang(e){return e?this.langList[e]:this.lang}getText(e,t){var i=t?e+"|"+t:e,s=i.split("|"),n=this._getLangElement(s,this.locale);return n||""}_getLangElement(e,t){var i=this.lang;return e.forEach(function(s){var n;i&&(n=i[s],typeof n<"u"?i=n:i=!1)}),i}bind(e,t){this.bindings[e]||(this.bindings[e]=[]),this.bindings[e].push(t),t(this.getText(e),this.lang)}_executeBindings(){for(let e in this.bindings)this.bindings[e].forEach(t=>{t(this.getText(e),this.lang)})}};b(se,"moduleName","localize"),b(se,"langs",Bs);let Oe=se;class vt extends w{constructor(e){super(e)}initialize(){this.registerTableFunction("tableComms",this.receive.bind(this))}getConnections(e){var t=[],i;return i=this.table.constructor.registry.lookupTable(e),i.forEach(s=>{this.table!==s&&t.push(s)}),t}send(e,t,i,s){var n=this.getConnections(e);n.forEach(r=>{r.tableComms(this.table.element,t,i,s)}),!n.length&&e&&console.warn("Table Connection Error - No tables matching selector found",e)}receive(e,t,i,s){if(this.table.modExists(t))return this.table.modules[t].commsReceived(e,i,s);console.warn("Inter-table Comms Error - no such module:",t)}}b(vt,"moduleName","comms");var Vs=Object.freeze({__proto__:null,CommsModule:vt,LayoutModule:Pe,LocalizeModule:Oe});const z=class z{static findTable(e){var t=z.registry.lookupTable(e,!0);return Array.isArray(t)&&!t.length?!1:t}};b(z,"registry",{tables:[],register(e){z.registry.tables.push(e)},deregister(e){var t=z.registry.tables.indexOf(e);t>-1&&z.registry.tables.splice(t,1)},lookupTable(e,t){var i=[],s,n;if(typeof e=="string"){if(s=document.querySelectorAll(e),s.length)for(var r=0;r{s.prototype.moduleCore=!0}),R._registerModule(i)}static _registerModule(e){Array.isArray(e)||(e=[e]),e.forEach(t=>{R._registerModuleBinding(t),R._registerModuleExtensions(t)})}static _registerModuleBinding(e){e.moduleName?R.moduleBindings[e.moduleName]=e:console.error("Unable to bind module, no moduleName defined",e.moduleName)}static _registerModuleExtensions(e){var t=e.moduleExtensions;if(e.moduleExtensions)for(let i in t){let s=t[i];if(R.moduleBindings[i])for(let n in s)R._extendModule(i,n,s[n]);else{R.moduleExtensions[i]||(R.moduleExtensions[i]={});for(let n in s)R.moduleExtensions[i][n]||(R.moduleExtensions[i][n]={}),Object.assign(R.moduleExtensions[i][n],s[n])}}R._extendModuleFromQueue(e)}static _extendModuleFromQueue(e){var t=R.moduleExtensions[e.moduleName];if(t)for(let i in t)R._extendModule(e.moduleName,i,t[i])}_bindModules(){var e=[],t=[],i=[];this.modules={};for(var s in R.moduleBindings){let n=R.moduleBindings[s],r=new n(this);this.modules[s]=r,n.prototype.moduleCore?this.modulesCore.push(r):n.moduleInitOrder?n.moduleInitOrder<0?e.push(r):t.push(r):i.push(r)}e.sort((n,r)=>n.moduleInitOrder>r.moduleInitOrder?1:-1),t.sort((n,r)=>n.moduleInitOrder>r.moduleInitOrder?1:-1),this.modulesRegular=e.concat(i.concat(t))}};b(R,"moduleBindings",{}),b(R,"moduleExtensions",{}),b(R,"modulesRegistered",!1),b(R,"defaultModules",!1);let _e=R;class Is extends M{constructor(e){super(e),this.element=this._createAlertElement(),this.msgElement=this._createMsgElement(),this.type=null,this.element.appendChild(this.msgElement)}_createAlertElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert"),e}_createMsgElement(){var e=document.createElement("div");return e.classList.add("tabulator-alert-msg"),e.setAttribute("role","alert"),e}_typeClass(){return"tabulator-alert-state-"+this.type}alert(e,t="msg"){if(e){for(this.clear(),this.dispatch("alert-show",t),this.type=t;this.msgElement.firstChild;)this.msgElement.removeChild(this.msgElement.firstChild);this.msgElement.classList.add(this._typeClass()),typeof e=="function"&&(e=e()),e instanceof HTMLElement?this.msgElement.appendChild(e):this.msgElement.innerHTML=e,this.table.element.appendChild(this.element)}}clear(){this.dispatch("alert-hide",this.type),this.element.parentNode&&this.element.parentNode.removeChild(this.element),this.msgElement.classList.remove(this._typeClass())}}const A=class A extends _e{static extendModule(){A.initializeModuleBinder(),A._extendModule(...arguments)}static registerModule(){A.initializeModuleBinder(),A._registerModule(...arguments)}constructor(e,t,i){super(),A.initializeModuleBinder(i),this.options={},this.columnManager=null,this.rowManager=null,this.footerManager=null,this.alertManager=null,this.vdomHoz=null,this.externalEvents=null,this.eventBus=null,this.interactionMonitor=!1,this.browser="",this.browserSlow=!1,this.browserMobile=!1,this.rtl=!1,this.originalElement=null,this.componentFunctionBinder=new Ss(this),this.dataLoader=!1,this.modules={},this.modulesCore=[],this.modulesRegular=[],this.deprecationAdvisor=new Fs(this),this.optionsList=new bt(this,"table constructor"),this.initialized=!1,this.destroyed=!1,this.initializeElement(e)&&(this.initializeCoreSystems(t),setTimeout(()=>{this._create()})),this.constructor.registry.register(this)}initializeElement(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement?(this.element=e,!0):typeof e=="string"?(this.element=document.querySelector(e),this.element?!0:(console.error("Tabulator Creation Error - no element found matching selector: ",e),!1)):(console.error("Tabulator Creation Error - Invalid element provided:",e),!1)}initializeCoreSystems(e){this.columnManager=new Rs(this),this.rowManager=new ks(this),this.footerManager=new Ms(this),this.dataLoader=new Ds(this),this.alertManager=new Is(this),this._bindModules(),this.options=this.optionsList.generate(A.defaultOptions,e),this._clearObjectPointers(),this._mapDeprecatedFunctionality(),this.externalEvents=new zs(this,this.options,this.options.debugEventsExternal),this.eventBus=new Hs(this.options.debugEventsInternal),this.interactionMonitor=new Ls(this),this.dataLoader.initialize(),this.footerManager.initialize()}_mapDeprecatedFunctionality(){}_clearSelection(){this.element.classList.add("tabulator-block-select"),window.getSelection?window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges():document.selection&&document.selection.empty(),this.element.classList.remove("tabulator-block-select")}_create(){this.externalEvents.dispatch("tableBuilding"),this.eventBus.dispatch("table-building"),this._rtlCheck(),this._buildElement(),this._initializeTable(),this.initialized=!0,this._loadInitialData().finally(()=>{this.eventBus.dispatch("table-initialized"),this.externalEvents.dispatch("tableBuilt")})}_rtlCheck(){var e=window.getComputedStyle(this.element);switch(this.options.textDirection){case"auto":if(e.direction!=="rtl")break;case"rtl":this.element.classList.add("tabulator-rtl"),this.rtl=!0;break;case"ltr":this.element.classList.add("tabulator-ltr");default:this.rtl=!1}}_clearObjectPointers(){this.options.columns=this.options.columns.slice(0),Array.isArray(this.options.data)&&!this.options.reactiveData&&(this.options.data=this.options.data.slice(0))}_buildElement(){var e=this.element,t=this.options,i;if(e.tagName==="TABLE"){this.originalElement=this.element,i=document.createElement("div");var s=e.attributes;for(var n in s)typeof s[n]=="object"&&i.setAttribute(s[n].name,s[n].value);e.parentNode.replaceChild(i,e),this.element=e=i}for(e.classList.add("tabulator"),e.setAttribute("role","grid");e.firstChild;)e.removeChild(e.firstChild);t.height&&(t.height=isNaN(t.height)?t.height:t.height+"px",e.style.height=t.height),t.minHeight!==!1&&(t.minHeight=isNaN(t.minHeight)?t.minHeight:t.minHeight+"px",e.style.minHeight=t.minHeight),t.maxHeight!==!1&&(t.maxHeight=isNaN(t.maxHeight)?t.maxHeight:t.maxHeight+"px",e.style.maxHeight=t.maxHeight)}_initializeTable(){var e=this.element,t=this.options;this.interactionMonitor.initialize(),this.columnManager.initialize(),this.rowManager.initialize(),this._detectBrowser(),this.modulesCore.forEach(i=>{i.initialize()}),e.appendChild(this.columnManager.getElement()),e.appendChild(this.rowManager.getElement()),t.footerElement&&this.footerManager.activate(),t.autoColumns&&t.data&&this.columnManager.generateColumnsFromRowData(this.options.data),this.modulesRegular.forEach(i=>{i.initialize()}),this.columnManager.setColumns(t.columns),this.eventBus.dispatch("table-built")}_loadInitialData(){return this.dataLoader.load(this.options.data).finally(()=>{this.columnManager.verticalAlignHeaders()})}destroy(){var e=this.element;for(this.destroyed=!0,this.constructor.registry.deregister(this),this.eventBus.dispatch("table-destroy"),this.rowManager.destroy();e.firstChild;)e.removeChild(e.firstChild);e.classList.remove("tabulator"),this.externalEvents.dispatch("tableDestroyed")}_detectBrowser(){var e=navigator.userAgent||navigator.vendor||window.opera;e.indexOf("Trident")>-1?(this.browser="ie",this.browserSlow=!0):e.indexOf("Edge")>-1?(this.browser="edge",this.browserSlow=!0):e.indexOf("Firefox")>-1?(this.browser="firefox",this.browserSlow=!1):e.indexOf("Mac OS")>-1?(this.browser="safari",this.browserSlow=!1):(this.browser="other",this.browserSlow=!1),this.browserMobile=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.slice(0,4))}initGuard(e,t){var i,s;return this.options.debugInitialization&&!this.initialized&&(e||(i=new Error().stack.split(` +`),s=i[0]=="Error"?i[2]:i[1],s[0]==" "?e=s.trim().split(" ")[1].split(".")[1]:e=s.trim().split("@")[0]),console.warn("Table Not Initialized - Calling the "+e+" function before the table is initialized may result in inconsistent behavior, Please wait for the `tableBuilt` event before calling this function."+(t?" "+t:""))),this.initialized}blockRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-blocking"),this.rowManager.blockRedraw(),this.columnManager.blockRedraw(),this.eventBus.dispatch("redraw-blocked")}restoreRedraw(){this.initGuard(),this.eventBus.dispatch("redraw-restoring"),this.rowManager.restoreRedraw(),this.columnManager.restoreRedraw(),this.eventBus.dispatch("redraw-restored")}setData(e,t,i){return this.initGuard(!1,"To set initial data please use the 'data' property in the table constructor."),this.dataLoader.load(e,t,i,!1)}clearData(){this.initGuard(),this.dataLoader.blockActiveLoad(),this.rowManager.clearData()}getData(e){return this.rowManager.getData(e)}getDataCount(e){return this.rowManager.getDataCount(e)}replaceData(e,t,i){return this.initGuard(),this.dataLoader.load(e,t,i,!0,!0)}updateData(e){var t=0;return this.initGuard(),new Promise((i,s)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(n=>{var r=this.rowManager.findRow(n[this.options.index]);r?(t++,r.updateData(n).then(()=>{t--,t||i()}).catch(o=>{s("Update Error - Unable to update row",n,o)})):s("Update Error - Unable to find row",n)}):(console.warn("Update Error - No data provided"),s("Update Error - No data provided"))})}addData(e,t,i){return this.initGuard(),new Promise((s,n)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e?this.rowManager.addRows(e,t,i).then(r=>{var o=[];r.forEach(function(a){o.push(a.getComponent())}),s(o)}):(console.warn("Update Error - No data provided"),n("Update Error - No data provided"))})}updateOrAddData(e){var t=[],i=0;return this.initGuard(),new Promise((s,n)=>{this.dataLoader.blockActiveLoad(),typeof e=="string"&&(e=JSON.parse(e)),e&&e.length>0?e.forEach(r=>{var o=this.rowManager.findRow(r[this.options.index]);i++,o?o.updateData(r).then(()=>{i--,t.push(o.getComponent()),i||s(t)}):this.rowManager.addRows(r).then(a=>{i--,t.push(a[0].getComponent()),i||s(t)})}):(console.warn("Update Error - No data provided"),n("Update Error - No data provided"))})}getRow(e){var t=this.rowManager.findRow(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}getRowFromPosition(e){var t=this.rowManager.getRowFromPosition(e);return t?t.getComponent():(console.warn("Find Error - No matching row found:",e),!1)}deleteRow(e){var t=[];this.initGuard(),Array.isArray(e)||(e=[e]);for(let i of e){let s=this.rowManager.findRow(i,!0);if(s)t.push(s);else return console.error("Delete Error - No matching row found:",i),Promise.reject("Delete Error - No matching row found")}return t.sort((i,s)=>this.rowManager.rows.indexOf(i)>this.rowManager.rows.indexOf(s)?1:-1),t.forEach(i=>{i.delete()}),this.rowManager.reRenderInPosition(),Promise.resolve()}addRow(e,t,i){return this.initGuard(),typeof e=="string"&&(e=JSON.parse(e)),this.rowManager.addRows(e,t,i,!0).then(s=>s[0].getComponent())}updateOrAddRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>i.getComponent()):this.rowManager.addRows(t).then(s=>s[0].getComponent())}updateRow(e,t){var i=this.rowManager.findRow(e);return this.initGuard(),typeof t=="string"&&(t=JSON.parse(t)),i?i.updateData(t).then(()=>Promise.resolve(i.getComponent())):(console.warn("Update Error - No matching row found:",e),Promise.reject("Update Error - No matching row found"))}scrollToRow(e,t,i){var s=this.rowManager.findRow(e);return s?this.rowManager.scrollToRow(s,t,i):(console.warn("Scroll Error - No matching row found:",e),Promise.reject("Scroll Error - No matching row found"))}moveRow(e,t,i){var s=this.rowManager.findRow(e);this.initGuard(),s?s.moveToRow(t,i):console.warn("Move Error - No matching row found:",e)}getRows(e){return this.rowManager.getComponents(e)}getRowPosition(e){var t=this.rowManager.findRow(e);return t?t.getPosition():(console.warn("Position Error - No matching row found:",e),!1)}setColumns(e){this.initGuard(!1,"To set initial columns please use the 'columns' property in the table constructor"),this.columnManager.setColumns(e)}getColumns(e){return this.columnManager.getComponents(e)}getColumn(e){var t=this.columnManager.findColumn(e);return t?t.getComponent():(console.warn("Find Error - No matching column found:",e),!1)}getColumnDefinitions(){return this.columnManager.getDefinitionTree()}showColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.show();else return console.warn("Column Show Error - No matching column found:",e),!1}hideColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.hide();else return console.warn("Column Hide Error - No matching column found:",e),!1}toggleColumn(e){var t=this.columnManager.findColumn(e);if(this.initGuard(),t)t.visible?t.hide():t.show();else return console.warn("Column Visibility Toggle Error - No matching column found:",e),!1}addColumn(e,t,i){var s=this.columnManager.findColumn(i);return this.initGuard(),this.columnManager.addColumn(e,t,s).then(n=>n.getComponent())}deleteColumn(e){var t=this.columnManager.findColumn(e);return this.initGuard(),t?t.delete():(console.warn("Column Delete Error - No matching column found:",e),Promise.reject())}updateColumnDefinition(e,t){var i=this.columnManager.findColumn(e);return this.initGuard(),i?i.updateDefinition(t):(console.warn("Column Update Error - No matching column found:",e),Promise.reject())}moveColumn(e,t,i){var s=this.columnManager.findColumn(e),n=this.columnManager.findColumn(t);this.initGuard(),s?n?this.columnManager.moveColumn(s,n,i):console.warn("Move Error - No matching column found:",n):console.warn("Move Error - No matching column found:",e)}scrollToColumn(e,t,i){return new Promise((s,n)=>{var r=this.columnManager.findColumn(e);return r?this.columnManager.scrollToColumn(r,t,i):(console.warn("Scroll Error - No matching column found:",e),Promise.reject("Scroll Error - No matching column found"))})}redraw(e){this.initGuard(),this.columnManager.redraw(e),this.rowManager.redraw(e)}setHeight(e){this.options.height=isNaN(e)?e:e+"px",this.element.style.height=this.options.height,this.rowManager.initializeRenderer(),this.rowManager.redraw(!0)}on(e,t){this.externalEvents.subscribe(e,t)}off(e,t){this.externalEvents.unsubscribe(e,t)}dispatchEvent(){var e=Array.from(arguments);e.shift(),this.externalEvents.dispatch(...arguments)}alert(e,t){this.initGuard(),this.alertManager.alert(e,t)}clearAlert(){this.initGuard(),this.alertManager.clear()}modExists(e,t){return this.modules[e]?!0:(t&&console.error("Tabulator Module Not Installed: "+e),!1)}module(e){var t=this.modules[e];return t||console.error("Tabulator module not installed: "+e),t}};b(A,"defaultOptions",Cs);let Be=A;var Q=Be;class Ns extends Q{static extendModule(){Q.initializeModuleBinder(ue),Q._extendModule(...arguments)}static registerModule(){Q.initializeModuleBinder(ue),Q._registerModule(...arguments)}constructor(e,t,i){super(e,t,ue)}}var Ws=Ns;const Ys=yt({__name:"Tabulator",props:{columns:{},tableData:{}},setup(l){const e=l,t=Ge(null),i=Ge(null);je(()=>e.columns,()=>{s()}),je(()=>e.tableData,()=>{s()}),Rt(()=>{s()});const s=()=>{i.value=new Ws(t.value,{data:e.tableData,reactiveData:!0,columns:e.columns,pagination:!0,paginationSize:6,paginationSizeSelector:[3,6,8,10],movableColumns:!0,paginationCounter:"rows"})};return(n,r)=>(xt(),Tt("div",{ref_key:"table",ref:t},null,512))}}),Gs=window.location.host.split(":"),js=window.location.protocol+"//"+Gs[0]+":18083",Us=kt(),wt=Ke.create({baseURL:js,timeout:3e5});wt.interceptors.request.use(l=>l,l=>(console.log("error ---------- ",l),Promise.reject(l)));wt.interceptors.response.use(l=>{const e=l.data;return e.code===200?e:(Us.error(e.detail),Promise.reject(new Error(e.message||"Error")))},l=>(console.log("ApiService.Response -> fail",l),Ke.isCancel(l),Promise.reject(l)));export{Ys as _,wt as s}; diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html index 8c1b82e..60368f5 100644 --- a/src/main/resources/static/index.html +++ b/src/main/resources/static/index.html @@ -5,7 +5,7 @@ Workflow - + diff --git a/workflowFE/src/views/workflow/components/RunWorkflow.vue b/workflowFE/src/views/workflow/components/RunWorkflow.vue index 6b62fca..e29c9cb 100644 --- a/workflowFE/src/views/workflow/components/RunWorkflow.vue +++ b/workflowFE/src/views/workflow/components/RunWorkflow.vue @@ -64,13 +64,14 @@ watch(() => workflowIdx.value, async () => { */ const onClickRun = async () => { toast.success('워크플로우가 실행 되었습니다.') + + emit('get-workflow-list') + await runWorkflow(workflowFormData.value).then(({ data }) => { if (data) toast.success('워크플로우가 정상적으로 완료 되었습니다.') else toast.error('워크플로우가 정상적으로 완료 되지 못했습니다.') - emit('get-workflow-list') - }) } \ No newline at end of file