• Wireless Communication Module Inspection Checklist

    Complete this form to document the inspection results of a wireless communication module.
  • Inspection Date*
     - -
  • Rows
  • Overall Module Status*
  • Upload a File
    Drag and drop files here
    Choose a file
    Cancelof
  • Powered by Jotform SignClear
  • Should be Empty:
Select theme:
  • Default
  • Blue
  • Red
  • Brown
  • Green
  • Black
  • Pink
  • Dark Blue
  • Purple
<\/head>\n
\n
<\/td>\n <\/tr>
\n
\n \"Jotform<\/td>\n <\/tr>
<\/td>\n <\/tr>
<\/td>\n <\/tr>
<\/td>\n <\/tr>
<\/td>\n \n

{form_title}<\/h3>\n <\/td>\n

<\/td>\n <\/tr>
<\/td>\n <\/td>\n <\/td>\n <\/tr><\/table><\/td>\n <\/tr><\/tbody><\/table>
<\/td>\n <\/tr>
<\/td>\n \n
\n Module Name\/ID\n <\/td>\n \n {q2_textbox0}\n <\/td>\n <\/tr>
\n Module Serial Number\n <\/td>\n \n {q3_textbox1}\n <\/td>\n <\/tr>
\n Module Type\n <\/td>\n \n {q4_dropdown2}\n <\/td>\n <\/tr>
\n Inspection Date\n <\/td>\n \n {q5_datetime3}\n <\/td>\n <\/tr>
\n Inspector Name\n <\/td>\n \n {q6_fullname4}\n <\/td>\n <\/tr>
\n Inspection Checklist\n <\/td>\n \n {q7_matrix5}\n <\/td>\n <\/tr>
\n Overall Module Status\n <\/td>\n \n {q8_radio6}\n <\/td>\n <\/tr>
\n Comments or Notes\n <\/td>\n \n {q9_textarea7}\n <\/td>\n <\/tr>
\n Upload Supporting Photos or Documents\n <\/td>\n \n {q10_fileupload8}\n <\/td>\n <\/tr>
\n Inspector Signature\n <\/td>\n \n {q11_signature9}\n <\/td>\n <\/tr><\/tbody><\/table><\/td>\n <\/td>\n <\/tr>
<\/td>\n <\/tr><\/tbody><\/table><\/td>\n <\/tr>
\n
<\/td>\n <\/td>\n <\/td>\n <\/tr>
<\/td>\n \n You can {edit_submission}<\/span> and {all_submissions}<\/span> easily.\n <\/td>\n <\/td>\n <\/tr>
<\/td>\n <\/tr><\/table><\/td>\n <\/tr>
<\/td>\n <\/tr><\/tbody><\/table><\/div>\n \n <\/body><\/html>\n","bodyRevised":"0","branding21Email":"1","dirty":"","dirtyEmail":"0","from":"{q6_fullname4}","hideEmptyFields":"1","html":"1","lastQuestionID":"1","name":"Notification 1","newDisableFlow":"1","pdfattachment":"","replyTo":"none","sendOnEdit":"1","sendOnSubmit":"1","subject":"Re: {form_title} - {q6_fullname4}","to":"template+laurelwood@jotform.com","type":"notification","uniqueID":"260702819926059","uploadAttachment":""}],"form_formStrings":[{"ageVerificationError":"You must be older than {minAge} years old to submit this form.","alphabetic":"This field can only contain letters","alphanumeric":"This field can only contain letters and numbers.","cancelAppointment":"Cancel Appointment","cancelSelection":"Cancel Selection","ccDonationMinLimitError":"Minimum amount is {minAmount} {currency}","ccInvalidCVC":"CVC number is invalid.","ccInvalidExpireDate":"Expire date is invalid.","ccInvalidExpireMonth":"Expiration month is invalid.","ccInvalidExpireYear":"Expiration year is invalid.","ccInvalidNumber":"Credit Card Number is invalid.","ccMissingDetails":"Please fill up the credit card details.","ccMissingDonation":"Please enter numeric values for donation amount.","ccMissingProduct":"Please select at least one product.","characterLimitError":"Too many Characters. The limit is","characterMinLimitError":"Too few characters. The minimum is","chooseAFile_infoMessage":"Choose a file","confirmClearForm":"Are you sure you want to clear the form","confirmEmail":"E-mail does not match","confirmSelection":"Confirm Selection","currency":"This field can only contain currency values.","cyrillic":"This field can only contain cyrillic characters","dateInvalid":"This date is not valid. The date format is {format}","dateInvalidSeparate":"This date is not valid. Enter a valid {element}.","dateLimited":"This date is unavailable.","disallowDecimals":"Please enter a whole number.","doneButton":"Done","doneMessage":"Well done! All errors are fixed.","dragAndDropFilesHere_infoMessage":"Drag and drop files here","email":"Enter a valid e-mail address","error":"Error","fieldError":"field has an error.","fillMask":"Field value must fill mask.","formerSelectedTime":"Former Time","freeEmailError":"Free email accounts are not allowed","generalError":"There are errors on the form. Please fix them before continuing.","generalPageError":"There are errors on this page. Please fix them before continuing.","geoNotAvailableDesc":"Location provider not available. Please enter the address manually.","geoNotAvailableTitle":"Position Unavailable","geoPermissionDesc":"Check your browser's privacy settings.","geoPermissionTitle":"Permission Denied","geoTimeoutDesc":"Please check your internet connection and try again.","geoTimeoutTitle":"Timeout","gradingScoreError":"Score total should only be less than or equal to","incompleteFields":"There are incomplete required fields. Please complete them.","inputCarretErrorA":"Input should not be less than the minimum value:","inputCarretErrorB":"Input should not be greater than the maximum value:","invalidTime":"Enter a valid time","justSoldOut":"Just Sold Out","lessThan":"Your score should be less than or equal to","maxCharactersError":"The number of characters should not be more than the maximum value:","maxDigitsError":"The maximum digits allowed is","maxFileSize_infoMessage":"Max. file size","maxSelectionsError":"The maximum number of selections allowed is ","minCharactersError":"The number of characters should not be less than the minimum value:","minSelectionsError":"The minimum required number of selections is ","multipleError":"There are {count} errors on this page. Please correct them before moving on.","multipleFileUploads_emptyError":"{file} is empty, please select files again without it.","multipleFileUploads_fileLimitError":"Only {fileLimit} file uploads allowed.","multipleFileUploads_minSizeError":"{file} is too small, minimum file size is {minSizeLimit}.","multipleFileUploads_onLeave":"The files are being uploaded, if you leave now the upload will be cancelled.","multipleFileUploads_sizeError":"{file} is too large, maximum file size is {sizeLimit}.","multipleFileUploads_typeError":"{file} has invalid extension. Only {extensions} are allowed.","multipleFileUploads_uploadFailed":"File upload failed, please remove it and upload the file again.","nextButtonText":"Next","noSlotsAvailable":"No slots available","notEnoughStock":"Not enough stock for the current selection","notEnoughStock_remainedItems":"Not enough stock for the current selection ({count} items left)","noUploadExtensions":"File has no extension file type (e.g. .txt, .png, .jpeg)","numeric":"This field can only contain numeric values","oneError":"There is {count} error on this page. Please correct it before moving on.","pastDatesDisallowed":"Date must not be in the past.","pleaseWait":"Please wait...","prevButtonText":"Previous","progressMiddleText":"of","required":"This field is required.","requiredLegend":"All fields marked with * are required and must be filled.","requireEveryCell":"Every cell is required.","requireEveryRow":"Every row is required.","requireOne":"At least one field required.","restrictedDomain":"This domain is not allowed","reviewBackText":"Back to Form","reviewSubmitText":"Review and Submit","seeAllText":"See All","seeErrorsButton":"See Errors","selectedTime":"Selected Time","selectionSoldOut":"Selection Sold Out","slotUnavailable":"{time} on {date} has been selected is unavailable. Please select another slot.","soldOut":"Sold Out","startButtonText":"START","submissionLimit":"Sorry! Only one entry is allowed.
Multiple submissions are disabled for this form.","submitButtonText":"Submit","subProductItemsLeft":"({count} items left)","uploadExtensions":"You can only upload following files:","uploadFilesize":"File size cannot be bigger than:","uploadFilesizemin":"File size cannot be smaller than:","url":"This field can only contain a valid URL","validateEmail":"You need to validate this e-mail","wordLimitError":"Too many words. The limit is","wordMinLimitError":"Too few words. The minimum is"}],"form_language":[{"detectUserLanguage":"1","firstPageOnly":"0","options":"English (US)","originalLanguage":"en","primaryLanguage":"en","saveUserLanguage":"1","showStatus":"flag-with-nation","theme":"light-theme","version":"2"}],"form_title":"Wireless Communication Module Inspection Checklist","form_status":"Enabled","form_type":"LEGACY","form_slug":"260702111854044","1_alt":"","1_headerImage":"Default","1_headerType":"Large","1_imageAlign":"Default","1_name":"q1_header","1_nextButtonText":"","1_order":"1","1_previousButtonText":"","1_qid":"1","1_sheetField":"No","1_showQuestionCount":"No","1_subHeader":"Complete this form to document the inspection results of a wireless communication module.","1_text":"Wireless Communication Module Inspection Checklist","1_textAlign":"Left","1_type":"control_head","1_verticalTextAlign":"Middle","1_width":"Default","2_autoFixed":"No","2_connection":"","2_customQuestionType":"","2_defaultValue":"","2_description":"","2_hint":"","2_inputTextMask":"","2_labelAlign":"Auto","2_maxsize":"","2_minsize":"","2_name":"q2_textbox0","2_order":"2","2_pdfID":"","2_protected":"No","2_qid":"2","2_readonly":"No","2_required":"Yes","2_size":"310","2_ssoPrefillKey":"","2_subLabel":"","2_text":"Module Name\/ID","2_type":"control_textbox","2_validation":"None","3_autoFixed":"No","3_connection":"","3_customQuestionType":"","3_defaultValue":"","3_description":"","3_hint":"","3_inputTextMask":"","3_labelAlign":"Auto","3_maxsize":"","3_minsize":"","3_name":"q3_textbox1","3_order":"3","3_pdfID":"","3_protected":"No","3_qid":"3","3_readonly":"No","3_required":"Yes","3_size":"310","3_ssoPrefillKey":"","3_subLabel":"","3_text":"Module Serial Number","3_type":"control_textbox","3_validation":"None","4_autoFixed":"No","4_calcValues":"","4_description":"","4_emptyText":"Please Select","4_labelAlign":"Auto","4_multipleSelections":"No","4_name":"q4_dropdown2","4_options":"Wi-Fi|Bluetooth|Zigbee|LoRa|NFC|Other","4_order":"4","4_pdfID":"","4_protected":"No","4_qid":"4","4_required":"Yes","4_searchText":"Search","4_selected":"","4_shuffle":"No","4_size":"0","4_special":"None","4_subLabel":"","4_text":"Module Type","4_type":"control_dropdown","4_useCalculations":"No","4_visibleOptions":"1","4_weight":"","4_width":"310","5_ageVerification":"No","5_allowTime":"No","5_at":"at","5_autoCalendar":"No","5_dateSeparator":"-","5_days":"Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday","5_defaultDate":"current","5_defaultTime":"none","5_description":"","5_format":"mmddyyyy","5_labelAlign":"Auto","5_limitDate":true,"5_liteMode":"Yes","5_minAge":"13","5_months":"January|February|March|April|May|June|July|August|September|October|November|December","5_name":"q5_datetime3","5_onlyFuture":"No","5_order":"5","5_pdfID":"","5_protected":"No","5_qid":"5","5_readonly":"","5_required":"Yes","5_startWeekOn":"Sunday","5_step":"1","5_sublabels":{"day":"Day","month":"Month","year":"Year","last":"Last Name","hour":"Hour","minutes":"Minutes","litemode":"Date"},"5_text":"Inspection Date","5_timeFormat":"AM\/PM","5_today":"Today","5_type":"control_datetime","5_validateLiteDate":"Yes","6_compoundHint":"","6_description":"","6_labelAlign":"Auto","6_middle":"No","6_name":"q6_fullname4","6_order":"6","6_prefix":"No","6_prefixChoices":"","6_protected":"No","6_qid":"6","6_readonly":"No","6_required":"Yes","6_ssoPrefillKey":"","6_sublabels":{"prefix":"Prefix","first":"First Name","middle":"Middle Name","last":"Last Name","suffix":"Suffix"},"6_suffix":"No","6_text":"Inspector Name","6_type":"control_fullname","7_calcMatrixValues":"","7_dcolumns":[{"type":"Radio Button","text":"Pass","id":"0"},{"type":"Radio Button","text":"Fail","id":"1"},{"type":"Radio Button","text":"N\/A","id":"2"}],"7_description":"","7_dropdown":"Yes|No","7_drows":[{"text":"Power On\/Off Functionality","id":0},{"text":"Connectivity Test","id":1},{"text":"Signal Strength","id":2},{"text":"Antenna Condition","id":3},{"text":"Firmware Version Check","id":4},{"text":"Physical Condition","id":5},{"text":"Indicator LEDs Functioning","id":6},{"text":"Safety Compliance","id":7}],"7_emojiCount":"5","7_featureSet":["useDcols","useIds"],"7_inputType":"Radio Button","7_labelAlign":"Auto","7_lastColumnId":"2","7_lastRowId":"7","7_matrixcells":"","7_matrixwidth":"","7_mcolumns":"Pass|Fail|N\/A","7_mrows":"Power On\/Off Functionality|Connectivity Test|Signal Strength|Antenna Condition|Firmware Version Check|Physical Condition|Indicator LEDs Functioning|Safety Compliance","7_name":"q7_matrix5","7_order":"7","7_pdfID":"","7_protected":"No","7_qid":"7","7_required":"Yes","7_reverseSliderValues":"No","7_shuffleMatrix":"No","7_text":"Inspection Checklist","7_toggleText":"Yes|No","7_type":"control_matrix","8_allowOther":"No","8_calcValues":"","8_checked":"No","8_connectedWorkflowElement":"","8_description":"","8_labelAlign":"Auto","8_name":"q8_radio6","8_options":"Pass|Fail|Needs Further Review","8_order":"8","8_otherText":"Other","8_pdfID":"","8_protected":"No","8_qid":"8","8_readonly":"No","8_required":"Yes","8_selected":"","8_shuffle":"No","8_special":"None","8_spreadCols":"1","8_text":"Overall Module Status","8_type":"control_radio","8_useCalculations":"No","8_weight":"","9_autoFixed":"No","9_cols":"648","9_connectedWorkflowElement":"","9_defaultValue":"","9_description":"","9_enableSentiment":"No","9_entryLimit":"None-0","9_entryLimitMin":"None-0","9_hint":"","9_inboxField":"No","9_journal":"None","9_labelAlign":"Auto","9_maxsize":"","9_mde":"No","9_name":"q9_textarea7","9_order":"9","9_pdfID":"","9_protected":"No","9_qid":"9","9_readonly":"No","9_required":"No","9_rows":"163","9_subLabel":"","9_text":"Comments or Notes","9_type":"control_textarea","9_validation":"None","9_wysiwyg":"Disable","10_allowMultiple":"Yes","10_buttonStyle":"None","10_buttonText":"Upload a File","10_description":"","10_extensions":"pdf, doc, docx, xls, csv, txt, rtf, html, zip, mp3, wma, mpg, flv, avi, jpg, jpeg, png, gif","10_fileLimit":"0","10_labelAlign":"Auto","10_limitFileSize":"Yes","10_maxFileSize":"10240","10_maxsize":"","10_minFileSize":"0","10_name":"q10_fileupload8","10_order":"10","10_pdfID":"","10_protected":"No","10_qid":"10","10_required":"No","10_subLabel":"","10_text":"Upload Supporting Photos or Documents","10_type":"control_fileupload","11_allowedSigningMethods":"type|draw|upload","11_autoFixed":"Yes","11_description":"","11_drawTimestamp":"Yes","11_height":"200","11_isAdvancedSignature":"No","11_isInitial":"No","11_isWorkflowSign":"","11_labelAlign":"Auto","11_name":"q11_signature9","11_order":"11","11_protected":"No","11_qid":"11","11_required":"Yes","11_selectedField":"","11_signatureColor":"No","11_signatureDraw":"Yes","11_signatureFont":"No","11_signatureTyped":"No","11_subLabel":"","11_text":"Inspector Signature","11_type":"control_signature","11_widgetType":"","11_width":"400","12_buttonAlign":"Auto","12_buttonStyle":"None","12_clear":"No","12_clearText":"","12_encryptIcon":"","12_hackRecipients":"No","12_labelAlign":"Auto","12_name":"q12_submit","12_order":"12","12_paypalBt":"No","12_preview":"No","12_previewText":"","12_print":"No","12_printText":"","12_qid":"12","12_sheetField":"No","12_text":"Submit Inspection","12_type":"control_button","12_useImage":"","form_id":"260702111854044","$":"Wireless Communication Module Inspection Checklist"}; const cardColorSchemesMeta = []; const colorSchemeListV3New = [{"name":"isDefault","order":0,"style":{"borderColor":"hsl(223, 100%, 97%)","backgroundColor":"hsl(0, 0%, 100%)","color":"hsl(223, 22%, 22%)"},"colors":{"clrText":"#2c3344","clrFrame":"#ffffff","clrBg":"#f3f3fe","clrActive":"#e3e5f5","clrErrorBg":"#ffd6d6","clrTextInputBg":"#ffffff"}},{"name":"isBlue","order":1,"style":{"borderColor":"hsl(196, 47%, 40%)","backgroundColor":"hsl(192, 100%, 98%)","color":"hsl(195, 100%, 23%)"},"colors":{"clrText":"#005875","clrFrame":"#f5fdff","clrBg":"#367c96","clrActive":"#dbf3fa","clrErrorBg":"#ffd6d6","clrTextInputBg":"#ffffff"}},{"name":"isRed","order":2,"style":{"borderColor":"hsl(15, 86%, 57%)","backgroundColor":"hsl(55, 100%, 87%)","color":"hsl(15, 100%, 21%)"},"colors":{"clrText":"#6b1b00","clrFrame":"#fff9bd","clrBg":"#f06233","clrActive":"#9a8f6a","clrErrorBg":"#ffd6d6","clrTextInputBg":"#ffffff"}},{"name":"isBrown","order":3,"style":{"borderColor":"hsl(19, 14%, 31%)","backgroundColor":"hsl(44, 46%, 88%)","color":"hsl(19, 39%, 14%)"},"colors":{"clrText":"#321f16","clrFrame":"#efe8d4","clrBg":"#5a4b44","clrActive":"#90827a","clrErrorBg":"#ffd6d6","clrTextInputBg":"#ffffff"}},{"name":"isGreen","order":4,"style":{"borderColor":"hsl(81, 44%, 43%)","backgroundColor":"hsl(81, 100%, 94%)","color":"hsl(81, 34%, 25%)"},"colors":{"clrText":"#46552a","clrFrame":"#f4ffe0","clrBg":"#7c9e3d","clrActive":"#d2e9aa","clrErrorBg":"#ffd6d6","clrTextInputBg":"#ffffff"}},{"name":"isBlack","order":5,"style":{"borderColor":"hsl(240, 23%, 9%)","backgroundColor":"hsl(231, 6%, 40%)","color":"hsl(0, 0%, 100%)"},"colors":{"clrText":"#ffffff","clrFrame":"#60626c","clrBg":"#12121c","clrActive":"#505b77","clrErrorBg":"#632733","clrTextInputBg":"#e3e3e3"}},{"name":"isPink","order":6,"style":{"borderColor":"hsl(338, 40%, 60%)","backgroundColor":"hsl(343, 100%, 99%)","color":"hsl(338, 54%, 38%)"},"colors":{"clrText":"#952d53","clrFrame":"#fffafb","clrBg":"#c2708e","clrActive":"#ffebf1","clrErrorBg":"#ffd6d6","clrTextInputBg":"#ffffff"}},{"name":"isDarkBlue","order":7,"style":{"borderColor":"hsl(215, 67%, 43%)","backgroundColor":"hsl(215, 100%, 92%)","color":"hsl(215, 77%, 31%)"},"colors":{"clrText":"#12458c","clrFrame":"#d6e7ff","clrBg":"#2461b7","clrActive":"#5b95e6","clrErrorBg":"#ffd6d6","clrTextInputBg":"#ffffff"}},{"name":"isPurple","order":8,"style":{"borderColor":"hsl(262, 91%, 41%)","backgroundColor":"hsl(263, 100%, 97%)","color":"hsl(262, 42%, 29%)"},"colors":{"clrText":"#422b69","clrFrame":"#f6f0ff","clrBg":"#4f09c8","clrActive":"#e6d9fc","clrErrorBg":"#ffd6d6","clrTextInputBg":"#ffffff"}}]; setTimeout(() => { const selectedColorScheme = document.querySelector(".colorScheme-list li.isSelected"); if (selectedColorScheme) { selectedColorScheme.scrollIntoView({ behavior: 'smooth', block: 'nearest', inline: 'nearest' }); } }, 1000); function generateThemeCSS(newValue, formProps) { const name = 'statelessColorScheme'; const formProperties = formProps || {}; let styleJSON = formProperties.form_styleJSON || formProperties.styleJSON || {}; let _injectCSS = (formProperties.form_injectCSS || formProperties.injectCSS || '/*__INSPECT_SEPERATOR__*/').replace(/((\/\*PREFERENCES STYLE\*\/)([\s\S]*?)(\/\*PREFERENCES STYLE\*\/))/g, ''); const isNewDefaultTheme = (formProperties.form_defaultTheme || formProperties.defaultTheme) === 'v2'; const isCdnColorScheme = window.location.href.indexOf('cdnColorScheme') === -1; const advancedDesingerProps = [ 'clrButtonBorder', 'clrTextInputBorder', 'clrDropdownBorder', 'okColor', 'clrButtonBg', 'clrErrorMsg', 'clrTextInputFont', 'clrDropdownBg', 'pbClrButtonBorder', 'collapseTextColor', 'collapseBgColor', 'clrDropdownFont', 'clrHeader', 'clrActive']; try { if (typeof styleJSON === typeof 'string') { styleJSON = JSON.parse(styleJSON); } } catch (e) { styleJSON = {}; } function lightenColor(color, percent) { try { let col = color; let usePound = false; if (col[0] === '#') { col = col.slice(1); usePound = true; } if (col.length === 3) { // Convert 3 digit to 6 digit hex col = `${col[0]}${col[0]}${col[1]}${col[1]}${col[2]}${col[2]}`; } const num = parseInt(col, 16); const amt = Math.round(2.55 * percent); const R = (num >> 16) + amt; const B = (num >> 8 & 0x00FF) + amt; const G = (num & 0x0000FF) + amt; const lighten = (0x1000000 + (R < 255 ? R < 1 ? 0 : R : 255) * 0x10000 + //eslint-disable-line (B < 255 ? B < 1 ? 0 : B : 255) * 0x100 + //eslint-disable-line (G < 255 ? G < 1 ? 0 : G : 255)).toString(16).slice(1); //eslint-disable-line if (usePound) { return `#${lighten}`; } return lighten; } catch (e) { return color; } } function generateAlignmentRule(name, newValue) { let value = formProperties.form_alignment ?? formProperties.alignment ?? styleJSON['@labelAlign'] ?? 'Top'; if (name === 'alignment') { value = newValue; } styleJSON['@labelAlign'] = value; const topRules = ` display: block; float: none; text-align: left; width: 100%; `; const leftRightRules = ` display: inline-block; float: left; text-align: ${value === 'Left' ? 'left' : 'right'}; `; const alignmentRule = ` .form-label.form-label-auto { ${value === 'Top' ? topRules : leftRightRules} } `; return alignmentRule; } function generateLineSpacingRule(name, newValue) { let value = formProperties.form_lineSpacing ?? formProperties.lineSpacing ?? styleJSON['@lineSpacing'] ?? 10; if (name === 'lineSpacing') { value = newValue; } styleJSON['@lineSpacing'] = value; const rule = ` .form-line { margin-top: ${value}px; margin-bottom: ${value}px; } `; return rule; } // unclosed paranthesis check for rgb, rgba function unclosedParanthesesCheck(str) { return /[()]/.test(str) && (str.match(/\(/g) || '').length === (str.match(/\)/g) || '').length; } // add missing paranthesis for rgb, rgba function addMissingParantheses(s) { let missedOpen = 0; const stack = []; for (let i = 0; i < s.length; i++) { if (s[i] === '(') { stack.push(s[i]); } else if (s[i] === ')') { if (!stack.pop()) { missedOpen++; } } } return Array(missedOpen + 1).join('(') + s + Array(stack.length + 1).join(')'); } function generateBackgroundRule(name, newValue, schemeColor) { let value = schemeColor || formProperties.form_background || formProperties.background; if (name === 'background') { value = schemeColor || newValue; } let clrFrame = typeof value === 'string' ? value.replace(new RegExp(/\"/gi), '\'') : ''; if (clrFrame.indexOf('rgb') > -1 && !unclosedParanthesesCheck(clrFrame)) { clrFrame = addMissingParantheses(clrFrame); } styleJSON['@clrFrame'] = clrFrame; const rule = ` .supernova .form-all, .form-all { background-color: ${clrFrame}; } `; return rule; } function generateFontColorRule(name, newValue, schemeColor) { let value = schemeColor || formProperties.form_fontcolor || formProperties.fontcolor; if (name === 'fontcolor') { value = schemeColor || newValue; } styleJSON['@clrText'] = value; styleJSON['@clrLabel'] = value; // If header color is specified we mustn't change it. const headerColor = (styleJSON && styleJSON['@clrHeader'] && styleJSON['@clrHeader'].length > 0) ? styleJSON['@clrHeader'] : value; const rule = ` .form-all { color: ${value}; } .form-header-group .form-header { color: ${headerColor}; } .form-header-group .form-subHeader { color: ${value}; } .form-label-top, .form-label-left, .form-label-right, .form-html, .form-checkbox-item label, .form-radio-item label, span.FITB .qb-checkbox-label, span.FITB .qb-radiobox-label, span.FITB .form-radio label, span.FITB .form-checkbox label, [data-blotid][data-type=checkbox] [data-labelid], [data-blotid][data-type=radiobox] [data-labelid], span.FITB-inptCont[data-type=checkbox] label, span.FITB-inptCont[data-type=radiobox] label { color: ${value}; } .form-sub-label { color: ${lightenColor(value, 10)}; } `; return rule; } function generateWidthRule(name, newValue) { let value = formProperties.form_formWidth ?? formProperties.formWidth ?? styleJSON['@formWidth'] ?? 700; if (name === 'formWidth') { value = newValue; } styleJSON['@formWidth'] = value; const rule = ` .form-all { max-width: ${value}px; width: 100%; } `; return rule; } function generateLabelWidthRule(name, newValue) { let value = formProperties.form_labelWidth ?? formProperties.labelWidth ?? styleJSON['@labelWidth'] ?? 150; if (name === 'labelWidth') { value = newValue; } styleJSON['@labelWidth'] = value; const rule = ` .form-label.form-label-left, .form-label.form-label-right, .form-label.form-label-left.form-label-auto, .form-label.form-label-right.form-label-auto { width: ${value}px; } `; return rule; } function generateFontLink() { const fontFamilyString = ['@font', '@headerFont', '@buttonFont', '@pbButtonFont', '@labelFont'] .filter(fontPropPrefix => ['jotform', 'google'].indexOf(styleJSON[`${fontPropPrefix}Type`]) !== -1 && styleJSON[`${fontPropPrefix}Family`]) .map(fontPropPrefix => styleJSON[`${fontPropPrefix}Family`].replace(/ /g, '+')) .join('|'); return fontFamilyString ? `//cdn.jotfor.ms/fonts/?family=${fontFamilyString}` : ''; } function generateFontRule(name, newValue) { const fontSource = formProperties.form_font ?? formProperties.font ?? styleJSON['@fontFamily'] ?? 'Arial'; let fontFamily = (typeof fontSource === 'object' && fontSource && fontSource.value) ? fontSource.value : fontSource; if (name === 'font' && newValue) { fontFamily = (typeof newValue === 'object' && newValue.value) ? newValue.value : (typeof newValue === 'string' ? newValue : fontFamily); if (typeof newValue === 'object') { styleJSON['@fontType'] = newValue.type; styleJSON['@fontFamily'] = fontFamily; styleJSON['@fontLink'] = generateFontLink() || ''; delete styleJSON['@googleFontLink']; } } // @fontFamily // @buttonFontFamily // @pbButtonFontFamily // @headerFontFamily // @labelFontFamily const rule = ` .form-all { font-family: ${fontFamily}, sans-serif; } `; return rule; } function generateFontSizeRule(name, newValue) { let value = formProperties.form_fontsize ?? formProperties.fontsize ?? styleJSON['@fontSize'] ?? 14; if (name === 'fontsize') { value = newValue; } const rule = ` .form-all { font-size: ${value}px } `; return rule; } function generateWindowBackgroundRule(name, newValue, color) { let value = color || styleJSON['@clrBg']; if (name === 'pageColor') { value = color || newValue; } styleJSON['@clrBg'] = value; const rule = ` .supernova { background-color: ${value}; } .supernova body { background: transparent; } `; return rule; } function generateTextInputBackgroundRule(name, newValue, color) { let value = color || styleJSON['@clrTextInputBg']; if (name === 'inputColor') { value = color || newValue; } styleJSON['@clrTextInputBg'] = value; const rule = ` .form-textbox, .form-textarea, .form-dropdown, .form-radio-other-input, .form-checkbox-other-input, .form-captcha input, .form-spinner input { background-color: ${value}; } `; return rule; } function generateErrorBackgroundRule(color) { styleJSON['@clrErrorBg'] = color; const rule = ` .form-line-error { overflow: hidden; transition: none; background-color: ${color}; } .form-line-error .form-error-message { background-color: #DC2626; clear: both; float: none; } .form-line-error .form-error-arrow { border-bottom-color: #FF3200; } .form-line-error input:not(#coupon-input), .form-line-error textarea, .form-line-error .form-validation-error { border: 1px solid #c61515; box-shadow: 0 0 3px #c61515; } `; return rule; } function generatePageBackgroundImageRule(name, newValue) { let backgroundUrl = styleJSON['@bgURL']; if (name === 'pageBackgroundImage') { backgroundUrl = newValue; } const repeat = (styleJSON['@bgRepeat'] ?? styleJSON['bgRepeat'] ?? 'false') === 'true' ? 'repeat' : 'no-repeat'; const fixed = (styleJSON['@bgAttach'] ?? styleJSON['bgAttach'] ?? 'true') !== 'false' ? 'fixed' : 'scroll'; const cover = (styleJSON['@bgCover'] ?? styleJSON['bgCover'] ?? 'true') !== 'false' ? 'cover' : 'auto'; styleJSON['@bgURL'] = backgroundUrl; const backgroundRules = ` .supernova { background-repeat: ${repeat}; background-size:${cover}; background-attachment: ${fixed}; background-position: center top; }`; if (!backgroundUrl || backgroundUrl === '|nobackground|') { return ` ${backgroundRules} .supernova { background-image: none; } `; } return ` ${backgroundRules} .supernova { background-image: url("${backgroundUrl}"); }`; } function generateFormBackgroundImageRule(name, newValue) { let backgroundUrl = styleJSON['@frameBgURL']; if (name === 'formBackgroundImage') { backgroundUrl = newValue; } styleJSON['@frameBgURL'] = backgroundUrl; if (!backgroundUrl || backgroundUrl === '|nobackground|') { return ` .form-all { background-image: none; } `; } const repeat = (styleJSON['@bgRepeat'] ?? styleJSON['bgRepeat'] ?? 'false') === 'true' ? 'repeat' : 'no-repeat'; const fixed = (styleJSON['@bgAttach'] ?? styleJSON['bgAttach'] ?? 'true') !== 'false' ? 'fixed' : 'scroll'; const cover = (styleJSON['@bgCover'] ?? styleJSON['bgCover'] ?? 'true') !== 'false' ? 'cover' : 'auto'; return ` .form-all { background-image: url("${backgroundUrl}"); background-repeat: ${repeat}; background-size:${cover}; background-attachment: ${fixed}; background-position: center top; } `; } function generateInjectCSS() { let result = '/*PREFERENCES STYLE*/'; result += generateFontRule(name, newValue); result += generateAlignmentRule(name, newValue); result += generateLineSpacingRule(name, newValue); result += generateWidthRule(name, newValue); result += generateLabelWidthRule(name, newValue); result += generateFontSizeRule(name, newValue); if (name === 'colorScheme' || name === 'statelessColorScheme') { result += generateWindowBackgroundRule(name, newValue, newValue.clrBg); result += generateBackgroundRule(name, newValue, newValue.clrFrame); result += generateFontColorRule(name, newValue, newValue.clrText); result += generateTextInputBackgroundRule(name, newValue, newValue.clrTextInputBg); result += generateErrorBackgroundRule(newValue.clrErrorBg); } else { result += generateBackgroundRule(name, newValue); result += generateFontColorRule(name, newValue); result += generateWindowBackgroundRule(name, newValue); result += generateTextInputBackgroundRule(name, newValue); } result += generatePageBackgroundImageRule(name, newValue); result += generateFormBackgroundImageRule(name, newValue); result += '/*PREFERENCES STYLE*/'; return result; } const generateNewColorSchemeCSS = styleJSON => { const _styleJSON = typeof styleJSON === 'string' ? JSON.parse(styleJSON) : styleJSON; let newThemeProps = _styleJSON.newThemeProps || {}; newThemeProps = typeof newThemeProps === 'string' ? JSON.parse(newThemeProps) : newThemeProps; // eslint-disable-line no-unused-vars const baseDefaults = { clrText: '#333333', clrFrame: '#ffffff', clrBg: '#f5f5f5', clrActive: '#e8e8e8', clrErrorBg: '#ffd6d6', clrTextInputBg: '#ffffff' }; Object.entries(baseDefaults).forEach(([k, v]) => { if (!newThemeProps[k]) newThemeProps[k] = v; }); const schemeProps = { 'dark-color-2x': 'input-border-color', 'label-color': 'clrText', 'light-color': 'main-light-color', 'input-bg-color': 'clrTextInputBg', 'dark-color': 'rating-item-bg-color', 'hover-color': 'rating-item-bg-hover', 'dark-600': 'label-color', 'sub-label-color': 'form-sublabel-color', 'form-bg-color': 'clrFrame', 'main-color': 'clrBg', 'active-bg-color': 'clrActive', 'error-bg-color': 'clrErrorBg', 'control-nextButton-textColor': 'clrFrame', 'white-color': 'control-nextButton-textColor', 'submit-button-bg-color': 'control-button-bg-color', 'submit-button-hover-bg': 'submit-button--hover', 'back-button-hover-bg': 'back-button--hover', 'next-button-hover-bg': 'next-button--hover', 'back-button--hover': 'back-button-hover-bg', 'next-button--hover': 'next-button-hover-bg', 'default-back-bgcolor': 'default-back-bgcolor', 'default-blue-color': 'main-color', 'default-grey-color': 'default-grey-color', 'default-grey-light-color': 'default-grey-light-color', 'empty-state-grey-color': 'empty-state-grey-color', 'empty-state-grey-light-color': 'empty-state-grey-light-color', 'default-dark-color': 'default-dark-color', 'default-blue-light-color': 'default-blue-light-color', 'default-blue-light2x-color': 'default-blue-light2x-color', 'input-border-color': 'dark-color-2x', 'input-border-color--hover': 'input-border-color', 'input-border-color--focus': 'main-color', 'input-box-shadow--hover': 'input-border-color--hover', 'input-box-shadow--focus': 'input-border-color--focus', 'next-bg-color': 'main-color', 'category-btn-color': 'main-color', 'product-item-bg': 'form-bg-color', 'a11y-fitb-label': 'label-color', 'a11y-calendarOtherDay': 'default-grey-light-color' }; if (!_styleJSON.newThemeProps) { return ''; } Object.entries(schemeProps).forEach(([key, value]) => { if (!newThemeProps[key]) newThemeProps[key] = newThemeProps[value]; }); if (!newThemeProps['default-blue-light-color']) newThemeProps['default-blue-light-color'] = newThemeProps['clrActive']; if (!newThemeProps['hover-color']) newThemeProps['hover-color'] = newThemeProps['clrActive']; if (!newThemeProps['input-border-color']) { var c = newThemeProps['clrText'] || baseDefaults.clrText; newThemeProps['input-border-color'] = (c && c.indexOf('#') === 0) ? lightenColor(c, 55) : (c || '#d8dae9'); } if (!newThemeProps['dark-color-2x']) newThemeProps['dark-color-2x'] = newThemeProps['input-border-color']; if (!newThemeProps['input-border-color--hover']) newThemeProps['input-border-color--hover'] = newThemeProps['input-border-color']; if (!newThemeProps['input-border-color--focus']) newThemeProps['input-border-color--focus'] = newThemeProps['main-color']; if (!newThemeProps['input-box-shadow--hover']) newThemeProps['input-box-shadow--hover'] = newThemeProps['input-border-color--hover']; if (!newThemeProps['input-box-shadow--focus']) newThemeProps['input-box-shadow--focus'] = newThemeProps['input-border-color--focus']; if (!newThemeProps['submit-button-bg-color']) newThemeProps['submit-button-bg-color'] = newThemeProps['main-color']; if (!newThemeProps['submit-button-hover-bg']) newThemeProps['submit-button-hover-bg'] = newThemeProps['main-color']; if (!newThemeProps['back-button--hover']) newThemeProps['back-button--hover'] = newThemeProps['main-color']; if (!newThemeProps['next-button--hover']) newThemeProps['next-button--hover'] = newThemeProps['main-color']; if (!newThemeProps['light-color']) newThemeProps['light-color'] = newThemeProps['main-color']; if (!newThemeProps['category-btn-color']) newThemeProps['category-btn-color'] = newThemeProps['main-color']; if (!newThemeProps['product-item-bg']) newThemeProps['product-item-bg'] = newThemeProps['form-bg-color']; if (!newThemeProps['next-bg-color']) newThemeProps['next-bg-color'] = newThemeProps['main-color']; if (!newThemeProps['white-color']) newThemeProps['white-color'] = newThemeProps['form-bg-color']; if (!newThemeProps['empty-state-grey-color']) newThemeProps['empty-state-grey-color'] = newThemeProps['form-bg-color']; if (!newThemeProps['empty-state-grey-light-color']) newThemeProps['empty-state-grey-light-color'] = newThemeProps['form-bg-color']; if (!newThemeProps['default-grey-light-color']) newThemeProps['default-grey-light-color'] = newThemeProps['clrActive']; if (!newThemeProps['default-grey-color']) newThemeProps['default-grey-color'] = newThemeProps['label-color']; if (!newThemeProps['default-dark-color']) newThemeProps['default-dark-color'] = newThemeProps['label-color']; if (!newThemeProps['default-blue-light2x-color']) newThemeProps['default-blue-light2x-color'] = newThemeProps['input-bg-color']; if (!newThemeProps['default-back-bgcolor']) newThemeProps['default-back-bgcolor'] = newThemeProps['main-color']; if (!newThemeProps['a11y-calendarOtherDay']) newThemeProps['a11y-calendarOtherDay'] = newThemeProps['default-grey-light-color']; if (!newThemeProps['sub-label-color']) newThemeProps['sub-label-color'] = newThemeProps['label-color']; if (!newThemeProps['placeholder-color']) newThemeProps['placeholder-color'] = newThemeProps['dark-color-2x'] || newThemeProps['input-border-color']; const safeFallback = newThemeProps['label-color'] || newThemeProps['clrText'] || baseDefaults.clrText; Object.keys(newThemeProps).forEach(k => { if (!newThemeProps[k]) newThemeProps[k] = safeFallback; }); const labelColor = newThemeProps['label-color'] || newThemeProps['clrText']; const formBgColor = newThemeProps['form-bg-color'] || newThemeProps['clrFrame']; const mainColor = newThemeProps['main-color'] || newThemeProps['clrBg']; const inputBgColor = newThemeProps['input-bg-color'] || newThemeProps['clrTextInputBg']; const errorBgColor = newThemeProps['error-bg-color'] || newThemeProps['clrErrorBg']; const activeBgColor = newThemeProps['active-bg-color'] || newThemeProps['clrActive']; if (labelColor) { _styleJSON['@clrText'] = labelColor; _styleJSON['@clrLabel'] = labelColor; } if (formBgColor) { _styleJSON['@clrFrame'] = formBgColor; } if (mainColor) { _styleJSON['@clrBg'] = mainColor; } if (inputBgColor) { _styleJSON['@clrTextInputBg'] = inputBgColor; } if (errorBgColor) { _styleJSON['@clrErrorBg'] = errorBgColor; } if (activeBgColor) { _styleJSON['@clrActive'] = activeBgColor; } return ` /*PREFERENCES STYLE*/ /* NEW THEME STYLE */ /* colors */ .calendar-new-header-withSVG .calendar-new-header .nextYear svg, .calendar-new-header-withSVG .calendar-new-header .nextMonth svg, .calendar-new-header-withSVG .calendar-new-header .previousYear svg, .calendar-new-header-withSVG .calendar-new-header .previousMonth svg, .FITB-inptCont .form-textbox, .FITB-inptCont .form-dropdown, span.FITB-inptCont[data-type=selectbox] select, span.FITB-inptCont[data-type=timebox] select, .rating-item label, .currentDate, .pickerItem select, .appointmentCalendar .calendarDay, .calendar.popup table tbody td, .calendar-new-header > *, span.form-sub-label, label.form-sub-label, div.form-header-group .form-subHeader, .rating-item-title.for-to > label:first-child, .rating-item-title.for-from > label:first-child, .rating-item-title .editor-container * { color: ${newThemeProps['label-color']}; } .rating-item input:hover+label, .appointmentSlotsContainer > *, li[data-type=control_fileupload] .qq-upload-button, li[data-type=control_fileupload] .jfUpload-heading, .form-textbox::placeholder { color: ${newThemeProps['placeholder-color'] || newThemeProps['dark-color-2x'] || newThemeProps['default-blue-color']}; } .clear-pad-btn, .appointmentCalendar .dayOfWeek, .calendar.popup th { color: ${newThemeProps['default-blue-color'] || newThemeProps['white-color'] || newThemeProps['dark-color-2x'] || newThemeProps['label-color']}; } .until-text, .form-submit-reset { color: ${newThemeProps['default-dark-color'] || newThemeProps['label-color']}; } .appointmentCalendar .calendarDay.isSelected:after { color: ${newThemeProps['input-bg-color']}; } .form-pagebreak-next, .form-pagebreak-back, .form-collapse-table, .form-matrix-column-headers, .form-matrix-row-headers, .form-spinner-button-container>* { color: ${newThemeProps['default-dark-color'] || newThemeProps['white-color']}; } .stageEmpty, .btn-barebone, .formPage-stuff, .scrollToTop .scrollToTop-text { color: ${newThemeProps['empty-state-grey-color'] || newThemeProps['white-color']}; } .scrollToTop svg { fill: ${newThemeProps['empty-state-grey-color'] || newThemeProps['white-color']}; } .form-dropdown:not(.time-dropdown):not(:required), .form-dropdown:not(:required), .form-dropdown:required:invalid, .form-spinner-input { color: ${newThemeProps['default-grey-color'] || newThemeProps['dark-600'] || newThemeProps['label-color']}; } .FITB:not(.formRender) .qb-datebox input:not([data-labelid]), .FITB:not(.formRender) .qb-selectbox input:not([data-labelid]), .FITB:not(.formRender) .qb-signaturebox input:not([data-labelid]), .FITB:not(.formRender) .qb-textbox input:not([data-labelid]), .FITB:not(.formRender) .qb-timebox input:not([data-labelid]), span.FITB-inptCont[data-type=datebox] label, span.FITB-inptCont[data-type=signaturebox] label, span.FITB-inptCont[data-type=textbox] label, span.FITB-inptCont[data-type=timebox] label, span.FITB-inptCont[data-type=datebox] input:focus~label, span.FITB-inptCont[data-type=datebox] input:valid~label, span.FITB-inptCont[data-type=signaturebox] input:focus~label, span.FITB-inptCont[data-type=signaturebox] input:valid~label, span.FITB-inptCont[data-type=textbox] input:focus~label, span.FITB-inptCont[data-type=textbox] input:valid~label, span.FITB-inptCont[data-type=timebox] input:focus~label, span.FITB-inptCont[data-type=timebox] input:valid~label { color: ${newThemeProps['default-grey-color'] || newThemeProps['next-bg-color'] || newThemeProps['a11y-fitb-label'] || newThemeProps['dark-color-2x']}; } .appointmentCalendar .calendarWeek .calendarDay.isUnavailable, .calendar tr.days td.otherDay, .calendar tr.days td:hover:not(.unselectable) { color: ${newThemeProps['default-grey-light-color'] || newThemeProps['a11y-calendarOtherDay'] || newThemeProps['light-color']}; } /* border-colors */ .form-dropdown, .form-textarea, .form-textbox, li[data-type=control_fileupload] .qq-upload-button, .rating-item label, .rating-item input:focus+label, .rating-item input:checked+label, .jf-form-buttons, .form-checkbox+label:before, .form-checkbox+span:before, .form-radio+label:before, .form-radio+span:before, .signature-pad-passive, .signature-wrapper, .appointmentCalendarContainer, .appointmentField .timezonePickerName, .appointmentDayPickerButton, .appointmentCalendarContainer .monthYearPicker .pickerItem+.pickerItem, .appointmentCalendarContainer .monthYearPicker, .appointmentCalendar .calendarDay.isActive .calendarDayEach, .appointmentCalendar .calendarDay.isToday .calendarDayEach, .appointmentCalendar .calendarDay:not(.empty):hover .calendarDayEach, .calendar.popup:before, .calendar-new-month, .form-matrix-column-headers, .form-matrix-table td, .form-matrix-table td:last-child, .form-matrix-table th, .form-matrix-table th:last-child, .form-matrix-table tr:last-child td, .form-matrix-table tr:last-child th, .form-matrix-table tr:not([role=group])+tr[role=group] th, .form-matrix-headers.form-matrix-column-headers, .isSelected .form-matrix-column-headers:nth-last-of-type(2), li[data-type=control_inline] input[type=email], li[data-type=control_inline] input[type=number], li[data-type=control_inline] input[type=tel], li[data-type=control_inline] input[type=text]:not(#productSearch-input), .form-line[data-payment=true] .form-textbox, .form-line[data-payment=true] .select-area, .form-line[data-payment=true] #coupon-input, .form-line[data-payment=true] #coupon-container input, .form-line[data-payment=true] input#productSearch-input, .form-line[data-payment=true] .form-product-category-item:after, .form-line[data-payment=true] .filter-container .dropdown-container .select-content, .form-line[data-payment=true] .form-textbox.form-product-custom_quantity, .form-line[data-payment="true"] .form-product-item .p_checkbox .select_border, .form-line[data-payment="true"] .form-product-item .form-product-container .form-sub-label-container span.select_cont, .form-line[data-payment=true] select.form-dropdown, .form-line[data-payment=true] #payment-category-dropdown .select-area, .form-line[data-payment=true] #payment-sorting-products-dropdown .select-area, .form-line[data-payment=true] .dropdown-container .select-content, .form-line[data-payment="true"] hr, .form-line[data-payment=true] .p_item_separator, .form-line[data-payment="true"] .payment_footer.new_ui, .form-line.card-3col .form-product-item.new_ui, .form-line.card-2col .form-product-item.new_ui, .form-line[data-payment=true] .form-product-category-item, .form-line[data-payment=true] .payment-form-table span.form-sub-label-container iframe, .form-line[data-type=control_square] .payment-form-table span.form-sub-label-container iframe{ border-color: ${newThemeProps['dark-color-2x']}; } .stageEmpty, .form-page-break:before, .welcome-page-break:before, .thankyou-page-break:before, .form-cover-break:before, .form-page-break:after, .welcome-page-break:after, .thankyou-page-break:after, .form-cover-break:after { border-color: ${newThemeProps['empty-state-grey-light-color'] || newThemeProps['white-color']}; } .rating-item input:hover+label, .appointmentSlot, .form-checkbox:checked+label:before, .form-checkbox:checked+span:before, .form-checkbox:checked+span label:before, .form-radio:checked+label:before, .form-radio:checked+span:before, .form-dropdown:focus, .form-textarea:focus, .form-textbox:focus, .signature-wrapper:focus, .form-line[data-payment="true"] .form-product-item .p_checkbox .checked, .form-dropdown:hover, .form-textarea:hover, .form-textbox:hover, .signature-wrapper:hover { border-color: ${newThemeProps['default-blue-color'] || newThemeProps['dark-color-2x']}; } .calendar tr.days td:hover:not(.unselectable):after { border-color: ${newThemeProps['light-color']}; } .form-header-group, .form-buttons-wrapper, .form-pagebreak, .form-submit-clear-wrapper, .form-pagebreak-next, .form-pagebreak-back, .form-checkbox:hover+label:before, .form-checkbox:hover+span:before, .form-radio:hover+label:before, .form-radio:hover+span:before, .divider { border-color: ${newThemeProps['main-color']}; } .form-pagebreak-back:focus, .form-pagebreak-next:focus, .form-submit-button:focus { border-color: ${newThemeProps['input-border-color--focus']}; } /* background-colors */ .form-matrix-values, .form-matrix-values, .signature-wrapper, .signature-pad-passive, .form-checkbox+label:before, .form-checkbox+span:before, .form-radio+label:before, .form-radio+span:before, .form-line[data-payment=true] #coupon-input, .form-line[data-payment=true] input#productSearch-input, .form-line[data-payment=true] .select-area, .form-line[data-payment=true] .custom_quantity, .form-line[data-payment=true] .filter-container .select-content, .form-line[data-payment=true] .p_checkbox .select_border, .form-line[data-payment=true] #payment-category-dropdown .select-area, .form-line[data-payment=true] #payment-sorting-products-dropdown .select-area, .form-line[data-payment=true] .dropdown-container .select-content { background-color: ${newThemeProps['input-bg-color']}; } .form-line-active { background-color: ${newThemeProps['active-bg-color']}; } .stageEmpty { background-color: ${newThemeProps['main-color'] || newThemeProps['dark-color-2x']}; } .form-matrix-column-headers, .form-matrix-row-headers, .form-spinner-button-container>*, .appointmentDayPickerButton, .form-collapse-table, .form-collapse-table:hover { background-color: ${newThemeProps['default-back-bgcolor'] || newThemeProps['dark-color-2x']}; } .calendar.popup, .calendar.popup table, .calendar.popup table tbody td:after { background-color: ${newThemeProps['form-bg-color']}; } .form-line-error { background-color: ${newThemeProps['error-bg-color']}; } .appointmentCalendar .calendarDay.isActive .calendarDayEach, .appointmentFieldRow.forSelectedDate, .calendar.popup tr.days td.selected:after, .calendar.popup:after, .submit-button, .form-checkbox:checked+label:before, .form-checkbox:checked+span:before, .form-checkbox:checked+span label:before, .form-radio+label:after, .form-radio+span:after, .rating-item input:checked+label, .appointmentCalendar .calendarDay:after, .form-line[data-payment="true"] .form-product-item .p_checkbox .checked, .rating-item input:focus+label, .formPage-removePage:hover, .btn-barebone:hover, .btn-barebone:active { background-color: ${newThemeProps['dark-color-2x']}; } .appointmentSlot.active { background-color: ${newThemeProps['dark-color-2x']} !important; } .clear-pad-btn, .appointmentCalendar .dayOfWeek, .calendar.popup th { background-color: ${newThemeProps['default-blue-light-color'] || newThemeProps['dark-600'] || newThemeProps['label-color']}; } .appointmentField .timezonePicker:hover+.timezonePickerName, .form-spinner-button-container>*:hover { background-color: ${newThemeProps['default-blue-light-color'] || newThemeProps['hover-color']}; } li[data-type=control_fileupload] .qq-upload-button { background-color: ${newThemeProps['default-blue-light2x-color'] || newThemeProps['input-bg-color']}; } .JotFormBuilder .appContainer #app li.form-line[data-type=control_matrix].isSelected .questionLine-editButton.forRemove:after, .JotFormBuilder .appContainer #app li.form-line[data-type=control_matrix].isSelected .questionLine-editButton.forRemove:before { background-color: ${newThemeProps['default-grey-color'] || newThemeProps['white-color']}; } .page-section li.form-line-active[data-type="control_button"] { background-color: ${newThemeProps['active-bg-color']}; } .appointmentDayPickerButton:after, .form-collapse-table:after { background-color: ${newThemeProps['a11y-fitb-label'] || newThemeProps['default-grey-color'] || newThemeProps['form-bg-color']}; } /* shadow */ .form-dropdown:hover, .form-textarea:hover, .form-textbox:hover, .signature-wrapper:hover, .calendar.popup:before, .jSignature:hover, li[data-type=control_fileupload] .qq-upload-button-hover, .form-line[data-payment="true"] .form-product-item .p_checkbox .checked, .form-line[data-payment="true"] .form-product-item .p_checkbox:hover .select_border, .form-checkbox:hover+label:before, .form-checkbox:hover+span:before, .form-radio:hover+label:before, .form-radio:hover+span:before, .calendar.popup:before { border-color: ${newThemeProps['input-border-color--hover']}; box-shadow: 0 0 0 1px ${newThemeProps['input-box-shadow--hover']}; } .form-dropdown:focus, .form-textarea:focus, .form-textbox:focus, .signature-wrapper:focus, li[data-type=control_fileupload] .qq-upload-button-focus, .form-checkbox:focus+label:before, .form-checkbox:focus+span:before, .form-radio:focus+label:before, .form-radio:focus+span:before, .calendar.popup:before { border-color: ${newThemeProps['input-border-color--focus']}; box-shadow: 0 0 0 1px ${newThemeProps['input-box-shadow--focus']}; } .calendar.popup table tbody td{ box-shadow: none; } .form-product-item .form-product-container .form-sub-label-container span.select_cont:focus select, .form-product-item .form-product-container .form-sub-label-container span.select_cont select:focus, .form-checkbox.form-product-input:focus ~ .select_border, .form-pagebreak-next:focus, .form-pagebreak-back:focus, .preview-submission-button:focus, .form-submit-button:focus, .form-collapse-table:focus { border-color: ${newThemeProps['input-border-color--focus']} !important; box-shadow: 0 0 1px 3px ${newThemeProps['input-box-shadow--focus']} !important; } /* button colors */ .submit-button { background-color: ${newThemeProps['submit-button-bg-color']}; border-color: ${newThemeProps['submit-button-bg-color']}; } .submit-button:hover { background-color: ${newThemeProps['submit-button-hover-bg']}; border-color: ${newThemeProps['submit-button-hover-bg']}; } .form-pagebreak-next, .form-pagebreak-back { background-color: ${newThemeProps['default-blue-color'] || newThemeProps['next-bg-color'] || newThemeProps['main-color']}; } .form-pagebreak-back:hover { background-color: ${newThemeProps['back-button--hover']}; border-color: ${newThemeProps['back-button--hover']}; } .form-pagebreak-next:hover { background-color: ${newThemeProps['next-button--hover']}; border-color: ${newThemeProps['next-button--hover']}; } .form-sacl-button, .form-submit-print { background-color: transparent; color: ${newThemeProps['default-dark-color'] || newThemeProps['input-border-color']}; border-color: ${newThemeProps['input-border-color']}; } .form-sacl-button:hover, .form-submit-print:hover, .appointmentSlot:not(.disabled):not(.active):hover, .appointmentDayPickerButton:hover, .rating-item input:hover+label { background-color: ${newThemeProps['hover-color']}; } /* payment styles */ .form-line[data-payment=true] .form-product-category-item.title_collapsed.has_selected_product .selected-items-icon { background-color: ${newThemeProps['category-btn-color']}; border-color: ${newThemeProps['category-btn-color']}; } .form-line[data-payment=true].form-line.card-3col .form-product-item, .form-line[data-payment=true].form-line.card-2col .form-product-item { background-color: ${newThemeProps['product-item-bg']}; } /* icons */ .appointmentField .timezonePickerName:before, [data-blotid][data-type=timebox]:after, span.FITB-inptCont[data-type=timebox] .FITB-inptCont-inner:after { ${newThemeProps['timezone-icon'] ? `background-image: ${newThemeProps['timezone-icon']};` : ''} } .appointmentCalendarContainer .monthYearPicker .pickerArrow.prev:after { ${newThemeProps['app-arrow-up-icon'] ? `background-image: ${newThemeProps['app-arrow-up-icon']};` : ''} } .appointmentCalendarContainer .monthYearPicker .pickerArrow.next:after { ${newThemeProps['app-arrow-down-icon'] ? `background-image: ${newThemeProps['app-arrow-down-icon']};` : ''} } .appointmentField .timezonePickerName:after { ${newThemeProps['app-arrow-icon'] ? `background-image: ${newThemeProps['app-arrow-icon']};` : ''} width: 11px; } li[data-type=control_datetime] [data-wrapper-react=true].extended>div+.form-sub-label-container .form-textbox:placeholder-shown, li[data-type=control_datetime] [data-wrapper-react=true]:not(.extended) .form-textbox:not(.time-dropdown):placeholder-shown, .appointmentCalendarContainer .currentDate, span[data-type="datebox"]:after { ${newThemeProps['calendar-icon'] ? `background-image: ${newThemeProps['calendar-icon']};` : ''} } .form-star-rating-star.Stars { ${newThemeProps['star-rating-icon'] ? `background-image: ${newThemeProps['star-rating-icon']} !important;` : ''} } .signature-pad-passive, .signature-placeholder:after { ${newThemeProps['signature-icon'] ? `background-image: ${newThemeProps['signature-icon']};` : ''} } .form-spinner-button.form-spinner-up:before { ${newThemeProps['spinner-up-icon'] ? `background-image: ${newThemeProps['spinner-up-icon']};` : ''} } .form-spinner-button.form-spinner-down:before { ${newThemeProps['spinner-down-icon'] ? `background-image: ${newThemeProps['spinner-down-icon']};` : ''} } li[data-type=control_fileupload] .qq-upload-button:before { ${newThemeProps['file-upload-icon'] ? `background-image: ${newThemeProps['file-upload-icon']};` : ''} } span[data-type=signaturebox]:after { ${newThemeProps['app-arrow-right-icon'] ? `background-image: ${newThemeProps['fitb-pencil-icon']};` : ''} } /* NEW THEME STYLE */ /*PREFERENCES STYLE*/ `; } if (!isNewDefaultTheme) { return { injectCSS: generateInjectCSS(), styleJSON: JSON.stringify(styleJSON) } } switch (true) { case name === 'buttonStyle': delete styleJSON['@pbButtonCustomTemplate']; delete styleJSON['@buttonCustomTemplate']; if (newValue.length > 0) { styleJSON['@buttonCustomTemplate'] = `form-submit-button-${newValue}`; } return { styleJSON: JSON.stringify(styleJSON) }; case name === 'colorScheme' && typeof newValue === 'object': advancedDesingerProps.forEach(key => delete styleJSON[`@${key}`]); styleJSON.newThemeProps = newValue; _injectCSS = generateNewColorSchemeCSS(styleJSON); break; case name === 'statelessColorScheme' && typeof newValue === 'object': advancedDesingerProps.forEach(key => delete styleJSON[`@${key}`]); styleJSON.newThemeProps = Object.assign({}, styleJSON.newThemeProps || {}, newValue); _injectCSS = generateNewColorSchemeCSS(styleJSON); break; case _injectCSS.indexOf('/* NEW THEME STYLE */') > -1: _injectCSS = _injectCSS.match(/((\/\*PREFERENCES STYLE\*\/)([\s\S]*?)(\/\* NEW THEME STYLE \*\/)([\s\S]*?)(\/\* NEW THEME STYLE \*\/)([\s\S]*?)([\s\S]*?)(\/\*PREFERENCES STYLE\*\/))/); _injectCSS = _injectCSS ? _injectCSS[0] : generateNewColorSchemeCSS(styleJSON); break; default: _injectCSS = ''; } let finalInjectCSS = (formProperties.form_injectCSS || formProperties.injectCSS || '/*__INSPECT_SEPERATOR__*/').replace(/((\/\*PREFERENCES STYLE\*\/)([\s\S]*?)(\/\*PREFERENCES STYLE\*\/))/g, ''); const generatedCSS = generateInjectCSS(); finalInjectCSS = finalInjectCSS.indexOf('/*__INSPECT_SEPERATOR__*/') > -1 ? finalInjectCSS.replace('/*__INSPECT_SEPERATOR__*/', generatedCSS + '/*__INSPECT_SEPERATOR__*/') : finalInjectCSS + generatedCSS; return { injectCSS: isCdnColorScheme ? finalInjectCSS : generateInjectCSS(), styleJSON: JSON.stringify(styleJSON) }; } //navigation var colorTheme = document.querySelector(".jfp-color-theme"); if (colorTheme && !colorTheme.dataset.clickBound) { colorTheme.dataset.clickBound = "1"; if (!isClassicThemeData && document.body && document.body.classList.contains("jfCardForm")) { document.documentElement.classList.add("is-color-theme-card"); } else { document.documentElement.classList.remove("is-color-theme-card"); } var allItems = colorTheme.querySelectorAll(".colorScheme-list li"); var mobileTrigger = colorTheme.querySelector(".jfp-color-theme-mobile-trigger"); var mobileTriggerSwatch = mobileTrigger && mobileTrigger.querySelector(".jfp-color-theme-mobile-swatch"); var mobileTriggerLabel = mobileTrigger && mobileTrigger.querySelector(".jfp-color-theme-mobile-label"); var defaultColorSchemeLabel = mobileTriggerLabel ? mobileTriggerLabel.textContent : "Color Scheme"; function getCurrentTemplateID() { return String((formPropsData && formPropsData.form_id) || ""); } function clearStaleCustomTheme() { try { var currentTemplateID = getCurrentTemplateID(); var customThemeTemplateID = window.top && window.top.customTheme ? String(window.top.customTheme.templateID || "") : ""; if (window.top && window.top.customTheme && (!currentTemplateID || !customThemeTemplateID || customThemeTemplateID !== currentTemplateID)) { window.top.customTheme = undefined; } } catch (e) {} } clearStaleCustomTheme(); function getTranslatedSchemeLabel(item) { if (!item) return defaultColorSchemeLabel; var fallbackLabel = item.dataset.schemeLabel || defaultColorSchemeLabel; return fallbackLabel.trim ? fallbackLabel.trim() : fallbackLabel; } function setMobileDropdownOpen(isOpen) { colorTheme.classList.toggle("is-dropdown-open", !!isOpen); if (mobileTrigger) { mobileTrigger.setAttribute("aria-expanded", isOpen ? "true" : "false"); } } function syncColorThemeOffset() { var rect = colorTheme.getBoundingClientRect(); if (!rect || !rect.height) return; document.documentElement.style.setProperty("--color-theme-footer-offset", Math.ceil(rect.height) + "px"); } function refreshMobileDropdownMode() { if (typeof window.syncColorThemeDropdownMode === "function") { window.syncColorThemeDropdownMode(); } if (window.requestAnimationFrame) { window.requestAnimationFrame(syncColorThemeOffset); } else { syncColorThemeOffset(); } if (!document.documentElement.classList.contains("is-color-theme-dropdown")) { setMobileDropdownOpen(false); } } syncColorThemeOffset(); window.addEventListener("resize", syncColorThemeOffset); try { if (window.top && window.top !== window) { window.top.addEventListener("resize", syncColorThemeOffset); } } catch (e) {} function syncMobileColorSchemeTrigger(selectedLi) { if (!mobileTrigger) return; var selected = selectedLi || colorTheme.querySelector(".colorScheme-list li.isSelected"); var triggerItem = selected || allItems[0]; if (!selected) { if (!triggerItem) { if (mobileTriggerLabel) mobileTriggerLabel.textContent = defaultColorSchemeLabel; return; } } var label = getTranslatedSchemeLabel(triggerItem); if (mobileTriggerLabel) mobileTriggerLabel.textContent = label || defaultColorSchemeLabel; if (!mobileTriggerSwatch) return; var borderColor = triggerItem.style.getPropertyValue("--scheme-border") || triggerItem.style.borderColor; var backgroundColor = triggerItem.style.getPropertyValue("--scheme-bg") || triggerItem.style.backgroundColor; var textColor = triggerItem.style.getPropertyValue("--scheme-text") || triggerItem.style.color; mobileTriggerSwatch.style.borderColor = borderColor; mobileTriggerSwatch.style.backgroundColor = backgroundColor; mobileTriggerSwatch.style.color = textColor; mobileTriggerSwatch.textContent = triggerItem.classList.contains("isClearOption") ? "" : "A"; } function syncSelectedOptionState(selectedLi) { allItems.forEach(function (item) { var isSelected = item === selectedLi; item.classList.toggle("isSelected", isSelected); item.setAttribute("aria-selected", isSelected ? "true" : "false"); }); } function trackColorSchemeClick(className) { try { var JotFormActions = window.top && window.top['for-actions']; if (!window.colorSchemeTracker && typeof JotFormActions === 'function') { window.colorSchemeTracker = JotFormActions("formTemplateColorThemeSelector"); } if (!window.colorSchemeTracker || typeof window.colorSchemeTracker.tick !== 'function') { return; } var actor = window.top && window.top.user ? window.top.user.username : ''; window.colorSchemeTracker.tick({ actor: actor, "action": 'click-theme', "target": className }); } catch (e) {} } if (mobileTrigger) { mobileTrigger.addEventListener("click", function (e) { e.preventDefault(); e.stopPropagation(); setMobileDropdownOpen(!colorTheme.classList.contains("is-dropdown-open")); if (colorTheme.classList.contains("is-dropdown-open")) { window.setTimeout(function () { var selected = colorTheme.querySelector(".colorScheme-list li.isSelected"); if (selected) selected.scrollIntoView({ block: "nearest" }); }, 0); } }); document.addEventListener("click", function (e) { if (!colorTheme.contains(e.target)) setMobileDropdownOpen(false); }); document.addEventListener("keydown", function (e) { if (e.key === "Escape") setMobileDropdownOpen(false); }); window.addEventListener("resize", refreshMobileDropdownMode); try { if (window.top && window.top !== window) { window.top.addEventListener("resize", refreshMobileDropdownMode); } } catch (e) {} } colorTheme.addEventListener("keydown", function (e) { var li = e.target.closest(".colorScheme-list li"); if (!li || (e.key !== "Enter" && e.key !== " ")) return; e.preventDefault(); li.click(); }); function findFormDesignerStyleEl() { var el = document.getElementById("form-designer-style"); if (el) return el; try { var frames = document.querySelectorAll("iframe"); for (var i = 0; i < frames.length; i++) { var doc = frames[i].contentDocument || (frames[i].contentWindow && frames[i].contentWindow.document); if (doc && (el = doc.getElementById("form-designer-style"))) return el; } if (document.body && document.body.querySelector) { el = document.querySelector("#form-designer-style"); } } catch (e) {} return el || null; } function findTemplateNewStyleEl(createIfMissing) { var el = document.getElementById("templateNewStyle"); if (el) return el; try { var frames = document.querySelectorAll("iframe"); for (var i = 0; i < frames.length; i++) { var doc = frames[i].contentDocument || (frames[i].contentWindow && frames[i].contentWindow.document); if (doc && (el = doc.getElementById("templateNewStyle"))) return el; } if (document.body && document.body.querySelector) { el = document.querySelector("#templateNewStyle"); if (el) return el; } } catch (e) {} if (createIfMissing && document.head) { el = document.createElement("style"); el.id = "templateNewStyle"; document.head.appendChild(el); return el; } return null; } var originalFormDesignerContent = null; var prefsBlockRegex = /\/\*PREFERENCES STYLE\*\/[\s\S]*\/\*PREFERENCES STYLE\*\//; var formProps = formPropsData; function applyColorSchemeStyle(css) { var formDesignerEl = findFormDesignerStyleEl(); if (!css) { if (originalFormDesignerContent !== null && formDesignerEl) { formDesignerEl.textContent = originalFormDesignerContent; } var styleEl = findTemplateNewStyleEl(false); if (styleEl) styleEl.textContent = ''; return; } if (formDesignerEl && formDesignerEl.textContent && prefsBlockRegex.test(formDesignerEl.textContent)) { if (originalFormDesignerContent === null) originalFormDesignerContent = formDesignerEl.textContent; formDesignerEl.textContent = formDesignerEl.textContent.replace(prefsBlockRegex, css); return; } var styleEl = findTemplateNewStyleEl(true); if (!styleEl) return; styleEl.textContent = css; } function removeClassicColorSchemeClasses(html) { allItems.forEach(function (item) { var c = item.dataset.className; if (c) html.classList.remove(c); }); } function applyClassicColorScheme(li) { var html = document.documentElement; var className = li ? li.dataset.className || '' : ''; var selectedColorObj = colorSchemeListV3New.find(function (item) { return item.name === className; }); removeClassicColorSchemeClasses(html); if (className) html.classList.add(className); if (!selectedColorObj || className === '') return null; var cssObject = generateThemeCSS(selectedColorObj.colors, formProps); applyColorSchemeStyle(cssObject.injectCSS); return { className: className, colors: selectedColorObj.colors, cssObject: cssObject }; } (function initSelectedState() { var fdEl = findFormDesignerStyleEl(); if (fdEl && fdEl.textContent && originalFormDesignerContent === null) originalFormDesignerContent = fdEl.textContent; if (!isClassicThemeData) return; var selected = colorTheme.querySelector(".colorScheme-list li.isSelected"); if (selected) applyClassicColorScheme(selected); })(); syncMobileColorSchemeTrigger(colorTheme.querySelector(".colorScheme-list li.isSelected")); colorTheme.addEventListener("click", function (e) { var li = e.target.closest(".colorScheme-list li"); if (!li) return; var className = li.dataset.className || ''; var themeID = li.dataset.themeId || ''; trackColorSchemeClick(className); const shouldClearSelection = li.classList.contains("isClearOption") || li.classList.contains("isSelected"); syncSelectedOptionState(shouldClearSelection ? null : li); syncMobileColorSchemeTrigger(shouldClearSelection ? null : li); setMobileDropdownOpen(false); if (!isClassicThemeData) { if (shouldClearSelection) { const cardFormStyle = document.querySelector('#cardFormStyle'); if (cardFormStyle) { cardFormStyle.textContent = ''; } window.top.customTheme = undefined; return; } fetch(`/stylebuilder/${formPropsData.form_id}/style.css?previewTheme=1&themeID=${(themeID)}`) .then(function (response) { if (!response.ok) throw new Error('Failed to load theme CSS'); return response.text(); }) .then(function (cssText) { const cardFormStyle = document.querySelector('#cardFormStyle'); if (cardFormStyle) { cardFormStyle.textContent = cssText; } else { const styleEl = document.createElement('style'); styleEl.id = 'cardFormStyle'; styleEl.textContent = cssText; document.head.appendChild(styleEl); } const selectedFromTpl = cardColorSchemesMeta.find(function (t) { return String(t.id) === String(themeID); }); if (!selectedFromTpl) return; window.top.customTheme = { templateID: getCurrentTemplateID(), isCardForm: true, styleJSON: { ...formPropsData.styleJSON, ...(selectedFromTpl.styleJSON || {}) }, defaultTheme: selectedFromTpl.defaultTheme, cardThemeID: themeID }; }); return; } if (shouldClearSelection) { removeClassicColorSchemeClasses(document.documentElement); applyColorSchemeStyle(''); window.top.customTheme = undefined; return; } var selectedClassicScheme = applyClassicColorScheme(li); var isEmpty = className === ''; if (!selectedClassicScheme || isEmpty) return; const cssObject = selectedClassicScheme.cssObject; window.top.customTheme = { templateID: getCurrentTemplateID(), injectCSS: cssObject.injectCSS, styleJSON: cssObject.styleJSON, statelessColorScheme: className, fontcolor: selectedClassicScheme.colors.clrText, background: selectedClassicScheme.colors.clrFrame }; }); (function setupColorSchemeScrollNav() { var wrap = colorTheme.querySelector('.jfp-color-theme-scroll-wrap'); var list = wrap && wrap.querySelector('.colorScheme-list'); var prev = wrap && wrap.querySelector('.jfp-color-theme-nav--prev'); var next = wrap && wrap.querySelector('.jfp-color-theme-nav--next'); if (!wrap || !list || !prev || !next) return; ['touchstart', 'touchmove', 'touchend', 'touchcancel'].forEach(function (type) { wrap.addEventListener(type, function (e) { e.stopPropagation(); }, { passive: true }); }); function getMaxScroll() { return Math.max(0, list.scrollWidth - list.clientWidth); } function isDesktopRTL() { return document.documentElement.getAttribute('dir') === 'rtl' && !document.documentElement.classList.contains('is-color-theme-dropdown'); } function sync() { var max = getMaxScroll(); var overflow = max > 2; list.classList.toggle('colorScheme-list--scroll-x', overflow); if (!overflow) { list.classList.remove('colorScheme-list--at-start', 'colorScheme-list--at-end'); prev.disabled = true; next.disabled = true; return; } var atStart = list.scrollLeft <= 1; var atEnd = list.scrollLeft >= max - 1; list.classList.toggle('colorScheme-list--at-start', atStart); list.classList.toggle('colorScheme-list--at-end', atEnd); prev.disabled = isDesktopRTL() ? atEnd : atStart; next.disabled = isDesktopRTL() ? atStart : atEnd; } function scrollByDir(dir) { var delta = Math.max(120, Math.floor(list.clientWidth * 0.65)); list.scrollBy({ left: (isDesktopRTL() ? -dir : dir) * delta, behavior: 'smooth' }); } prev.addEventListener('click', function (e) { e.preventDefault(); e.stopPropagation(); scrollByDir(-1); }); next.addEventListener('click', function (e) { e.preventDefault(); e.stopPropagation(); scrollByDir(1); }); list.addEventListener('scroll', sync); window.addEventListener('resize', sync); if (typeof ResizeObserver !== 'undefined') { var ro = new ResizeObserver(sync); ro.observe(list); } if (document.fonts && document.fonts.ready) { document.fonts.ready.then(sync).catch(sync); } sync(); window.setTimeout(sync, 100); window.setTimeout(sync, 500); })(); }