@asoftwareworld/form-builder
Version:
ASW Form Builder helps you with rapid development and designed web forms which includes several controls. The key feature of Form Builder is to make your content attractive and effective. We can customize our control at run time and preview the same befor
85 lines • 30.3 kB
JavaScript
/**
* @license
* Copyright ASW (A Software World) All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file
*/
import { Component, Inject } from '@angular/core';
import { Validators } from '@angular/forms';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Constants } from '@asoftwareworld/form-builder/form-control/core';
import * as i0 from "@angular/core";
import * as i1 from "@angular/forms";
import * as i2 from "@angular/material/dialog";
import * as i3 from "@angular/common";
import * as i4 from "@angular/material/input";
import * as i5 from "@angular/material/form-field";
import * as i6 from "@angular/material/select";
import * as i7 from "@angular/material/core";
import * as i8 from "@angular/material/icon";
import * as i9 from "@angular/material/tooltip";
import * as i10 from "@angular/material/button-toggle";
export class AswParagraphDialog {
formBuilder;
dialogRef;
control;
constants = Constants;
aswParagraphForm;
status;
constructor(formBuilder, dialogRef, control) {
this.formBuilder = formBuilder;
this.dialogRef = dialogRef;
this.control = control;
}
ngOnInit() {
this.validateFormBuilder();
this.editProperty(this.control);
}
validateFormBuilder() {
this.aswParagraphForm = this.formBuilder.group({
customClass: [''],
label: ['', [Validators.required, Validators.minLength(4)]],
subtype: [],
style: [],
column: []
});
}
editProperty(control) {
this.aswParagraphForm.setValue({
label: control.label,
customClass: control.customClass ?? '',
subtype: control.subtype,
style: control.style,
column: control.column
});
}
onNoClick() {
this.dialogRef.close();
}
onSubmit() {
if (this.aswParagraphForm.invalid) {
return;
}
this.aswParagraphForm.value.controlType = this.control.controlType;
this.dialogRef.close(this.aswParagraphForm.value);
}
onChange(event) {
if (event.checked) {
this.status = true;
}
else {
this.status = false;
}
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: AswParagraphDialog, deps: [{ token: i1.FormBuilder }, { token: i2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.11", type: AswParagraphDialog, selector: "asw-paragraph-dialog", ngImport: i0, template: "<h4 mat-dialog-title>Edit Property</h4>\r\n<form [formGroup]=\"aswParagraphForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-dialog-content class=\"mat-typography\">\r\n <div class=\"asw-full-width\"><br>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n <mat-label>Content</mat-label>\r\n <textarea matInput type=\"text\"\r\n name=\"label\"\r\n placeholder=\"Enter Content\"\r\n matTooltip=\"Enter Content\"\r\n formControlName=\"label\" required></textarea>\r\n <mat-error class=\"asw-mat-error\" *ngFor=\"let validation of constants.accountValidationMessages.label\">\r\n <ng-container class=\"asw-mat-error\" *ngIf=\"aswParagraphForm.get('label')?.hasError(validation.type) && (aswParagraphForm.get('label')?.dirty || aswParagraphForm.get('label')?.touched)\">\r\n {{validation.message}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n <mat-label>Custom CSS Class</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"customClass\"\r\n placeholder=\"Custom CSS Class\"\r\n matTooltip=\"Custom CSS Class\"\r\n formControlName=\"customClass\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n <mat-label>Type</mat-label>\r\n <mat-select formControlName=\"subtype\">\r\n <mat-option value=\"p\">P</mat-option>\r\n <mat-option value=\"address\">Address</mat-option>\r\n <mat-option value=\"blockquote\">Blockquote</mat-option>\r\n <mat-option value=\"canvas\">Canvas</mat-option>\r\n <mat-option value=\"output\">Output</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n <mat-label>Column Size</mat-label>\r\n <mat-select formControlName=\"column\" matTooltip=\"Select column size\">\r\n <mat-option *ngFor=\"let column of constants.columns\" [value]=\"column.value\">\r\n {{column.label}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-6\">\r\n Text style: \r\n <mat-button-toggle-group formControlName=\"style\" name=\"fontStyle\" aria-label=\"Font Style\">\r\n <mat-button-toggle value=\"text-left text-start\" aria-label=\"Text align left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"text-center\" aria-label=\"Text align center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"text-right text-end\" aria-label=\"Text align right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"text-justify\" aria-label=\"Text align justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions align=\"end\">\r\n <button type=\"button\"\r\n class=\"btn btn-danger mr-2 me-2 mb-1\"\r\n (click)=\"onNoClick()\">\r\n No\r\n </button>\r\n <button type=\"submit\"\r\n class=\"btn btn-primary mb-1\"\r\n cdkFocusInitial>\r\n Yes\r\n </button>\r\n </mat-dialog-actions>\r\n</form>\r\n\r\n", dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i5.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "component", type: i6.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i7.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i8.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i9.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i10.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i10.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }] });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.11", ngImport: i0, type: AswParagraphDialog, decorators: [{
type: Component,
args: [{ selector: 'asw-paragraph-dialog', template: "<h4 mat-dialog-title>Edit Property</h4>\r\n<form [formGroup]=\"aswParagraphForm\" (ngSubmit)=\"onSubmit()\">\r\n <mat-dialog-content class=\"mat-typography\">\r\n <div class=\"asw-full-width\"><br>\r\n <div class=\"row\">\r\n <div class=\"col-md-12\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n <mat-label>Content</mat-label>\r\n <textarea matInput type=\"text\"\r\n name=\"label\"\r\n placeholder=\"Enter Content\"\r\n matTooltip=\"Enter Content\"\r\n formControlName=\"label\" required></textarea>\r\n <mat-error class=\"asw-mat-error\" *ngFor=\"let validation of constants.accountValidationMessages.label\">\r\n <ng-container class=\"asw-mat-error\" *ngIf=\"aswParagraphForm.get('label')?.hasError(validation.type) && (aswParagraphForm.get('label')?.dirty || aswParagraphForm.get('label')?.touched)\">\r\n {{validation.message}}\r\n </ng-container>\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n <mat-label>Custom CSS Class</mat-label>\r\n <input matInput type=\"text\"\r\n name=\"customClass\"\r\n placeholder=\"Custom CSS Class\"\r\n matTooltip=\"Custom CSS Class\"\r\n formControlName=\"customClass\">\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n <mat-label>Type</mat-label>\r\n <mat-select formControlName=\"subtype\">\r\n <mat-option value=\"p\">P</mat-option>\r\n <mat-option value=\"address\">Address</mat-option>\r\n <mat-option value=\"blockquote\">Blockquote</mat-option>\r\n <mat-option value=\"canvas\">Canvas</mat-option>\r\n <mat-option value=\"output\">Output</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <div class=\"row\">\r\n <div class=\"col-md-6\">\r\n <mat-form-field appearance=\"outline\" class=\"asw-mat-form-field\">\r\n <mat-label>Column Size</mat-label>\r\n <mat-select formControlName=\"column\" matTooltip=\"Select column size\">\r\n <mat-option *ngFor=\"let column of constants.columns\" [value]=\"column.value\">\r\n {{column.label}}\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div class=\"col-md-6\">\r\n Text style: \r\n <mat-button-toggle-group formControlName=\"style\" name=\"fontStyle\" aria-label=\"Font Style\">\r\n <mat-button-toggle value=\"text-left text-start\" aria-label=\"Text align left\">\r\n <mat-icon>format_align_left</mat-icon>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"text-center\" aria-label=\"Text align center\">\r\n <mat-icon>format_align_center</mat-icon>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"text-right text-end\" aria-label=\"Text align right\">\r\n <mat-icon>format_align_right</mat-icon>\r\n </mat-button-toggle>\r\n <mat-button-toggle value=\"text-justify\" aria-label=\"Text align justify\">\r\n <mat-icon>format_align_justify</mat-icon>\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions align=\"end\">\r\n <button type=\"button\"\r\n class=\"btn btn-danger mr-2 me-2 mb-1\"\r\n (click)=\"onNoClick()\">\r\n No\r\n </button>\r\n <button type=\"submit\"\r\n class=\"btn btn-primary mb-1\"\r\n cdkFocusInitial>\r\n Yes\r\n </button>\r\n </mat-dialog-actions>\r\n</form>\r\n\r\n" }]
}], ctorParameters: () => [{ type: i1.FormBuilder }, { type: i2.MatDialogRef }, { type: undefined, decorators: [{
type: Inject,
args: [MAT_DIALOG_DATA]
}] }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYWdyYXBoLWRpYWxvZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL2Zvcm0tY29udHJvbC9wYXJhZ3JhcGgvcGFyYWdyYXBoLWRpYWxvZy50cyIsIi4uLy4uLy4uLy4uL3NyYy9jb21wb25lbnRzL2Zvcm0tY29udHJvbC9wYXJhZ3JhcGgvcGFyYWdyYXBoLWRpYWxvZy5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7R0FNRztBQUVILE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFB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cm1Hcm91cF09XCJhc3dQYXJhZ3JhcGhGb3JtXCIgKG5nU3VibWl0KT1cIm9uU3VibWl0KClcIj5cclxuICAgIDxtYXQtZGlhbG9nLWNvbnRlbnQgY2xhc3M9XCJtYXQtdHlwb2dyYXBoeVwiPlxyXG4gICAgICAgIDxkaXYgY2xhc3M9XCJhc3ctZnVsbC13aWR0aFwiPjxicj5cclxuICAgICAgICAgICAgPGRpdiBjbGFzcz1cInJvd1wiPlxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cImNvbC1tZC0xMlwiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxtYXQtZm9ybS1maWVsZCBhcHBlYXJhbmNlPVwib3V0bGluZVwiIGNsYXNzPVwiYXN3LW1hdC1mb3JtLWZpZWxkXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxtYXQtbGFiZWw+Q29udGVudDwvbWF0LWxhYmVsPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8dGV4dGFyZWEgbWF0SW5wdXQgdHlwZT1cInRleHRcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZT1cImxhYmVsXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYWNlaG9sZGVyPVwiRW50ZXIgQ29udGVudFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXRUb29sdGlwPVwiRW50ZXIgQ29udGVudFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtQ29udHJvbE5hbWU9XCJsYWJlbFwiIHJlcXVpcmVkPjwvdGV4dGFyZWE+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxtYXQtZXJyb3IgY2xhc3M9XCJhc3ctbWF0LWVycm9yXCIgKm5nRm9yPVwibGV0IHZhbGlkYXRpb24gb2YgY29uc3RhbnRzLmFjY291bnRWYWxpZGF0aW9uTWVzc2FnZXMubGFiZWxcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuZy1jb250YWluZXIgY2xhc3M9XCJhc3ctbWF0LWVycm9yXCIgKm5nSWY9XCJhc3dQYXJhZ3JhcGhGb3JtLmdldCgnbGFiZWwnKT8uaGFzRXJyb3IodmFsaWRhdGlvbi50eXBlKSAmJiAoYXN3UGFyYWdyYXBoRm9ybS5nZXQoJ2xhYmVsJyk/LmRpcnR5IHx8IGFzd1BhcmFncmFwaEZvcm0uZ2V0KCdsYWJlbCcpPy50b3VjaGVkKVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHt7dmFsaWRhdGlvbi5tZXNzYWdlfX1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvbmctY29udGFpbmVyPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L21hdC1lcnJvcj5cclxuICAgICAgICAgICAgICAgICAgICA8L21hdC1mb3JtLWZpZWxkPlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwicm93XCI+XHJcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiY29sLW1kLTZcIj5cclxuICAgICAgICAgICAgICAgICAgICA8bWF0LWZvcm0tZmllbGQgYXBwZWFyYW5jZT1cIm91dGxpbmVcIiBjbGFzcz1cImFzdy1tYXQtZm9ybS1maWVsZFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8bWF0LWxhYmVsPkN1c3RvbSBDU1MgQ2xhc3M8L21hdC1sYWJlbD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IG1hdElucHV0IHR5cGU9XCJ0ZXh0XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU9XCJjdXN0b21DbGFzc1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGFjZWhvbGRlcj1cIkN1c3RvbSBDU1MgQ2xhc3NcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0VG9vbHRpcD1cIkN1c3RvbSBDU1MgQ2xhc3NcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybUNvbnRyb2xOYW1lPVwiY3VzdG9tQ2xhc3NcIj5cclxuICAgICAgICAgICAgICAgICAgICA8L21hdC1mb3JtLWZpZWxkPlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiY29sLW1kLTZcIj5cclxuICAgICAgICAgICAgICAgICAgICA8bWF0LWZvcm0tZmllbGQgYXBwZWFyYW5jZT1cIm91dGxpbmVcIiBjbGFzcz1cImFzdy1tYXQtZm9ybS1maWVsZFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8bWF0LWxhYmVsPlR5cGU8L21hdC1sYWJlbD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1zZWxlY3QgZm9ybUNvbnRyb2xOYW1lPVwic3VidHlwZVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1vcHRpb24gdmFsdWU9XCJwXCI+UDwvbWF0LW9wdGlvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxtYXQtb3B0aW9uIHZhbHVlPVwiYWRkcmVzc1wiPkFkZHJlc3M8L21hdC1vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bWF0LW9wdGlvbiB2YWx1ZT1cImJsb2NrcXVvdGVcIj5CbG9ja3F1b3RlPC9tYXQtb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1vcHRpb24gdmFsdWU9XCJjYW52YXNcIj5DYW52YXM8L21hdC1vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bWF0LW9wdGlvbiB2YWx1ZT1cIm91dHB1dFwiPk91dHB1dDwvbWF0LW9wdGlvbj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPC9tYXQtc2VsZWN0PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvbWF0LWZvcm0tZmllbGQ+XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJyb3dcIj5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJjb2wtbWQtNlwiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxtYXQtZm9ybS1maWVsZCBhcHBlYXJhbmNlPVwib3V0bGluZVwiIGNsYXNzPVwiYXN3LW1hdC1mb3JtLWZpZWxkXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxtYXQtbGFiZWw+Q29sdW1uIFNpemU8L21hdC1sYWJlbD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1zZWxlY3QgZm9ybUNvbnRyb2xOYW1lPVwiY29sdW1uXCIgbWF0VG9vbHRpcD1cIlNlbGVjdCBjb2x1bW4gc2l6ZVwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1vcHRpb24gKm5nRm9yPVwibGV0IGNvbHVtbiBvZiBjb25zdGFudHMuY29sdW1uc1wiIFt2YWx1ZV09XCJjb2x1bW4udmFsdWVcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7e2NvbHVtbi5sYWJlbH19XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L21hdC1vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvbWF0LXNlbGVjdD5cclxuICAgICAgICAgICAgICAgICAgICA8L21hdC1mb3JtLWZpZWxkPlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwiY29sLW1kLTZcIj5cclxuICAgICAgICAgICAgICAgICAgICBUZXh0IHN0eWxlOiBcclxuICAgICAgICAgICAgICAgICAgICA8bWF0LWJ1dHRvbi10b2dnbGUtZ3JvdXAgZm9ybUNvbnRyb2xOYW1lPVwic3R5bGVcIiBuYW1lPVwiZm9udFN0eWxlXCIgYXJpYS1sYWJlbD1cIkZvbnQgU3R5bGVcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1idXR0b24tdG9nZ2xlIHZhbHVlPVwidGV4dC1sZWZ0IHRleHQtc3RhcnRcIiBhcmlhLWxhYmVsPVwiVGV4dCBhbGlnbiBsZWZ0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bWF0LWljb24+Zm9ybWF0X2FsaWduX2xlZnQ8L21hdC1pY29uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L21hdC1idXR0b24tdG9nZ2xlPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8bWF0LWJ1dHRvbi10b2dnbGUgdmFsdWU9XCJ0ZXh0LWNlbnRlclwiIGFyaWEtbGFiZWw9XCJUZXh0IGFsaWduIGNlbnRlclwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPG1hdC1pY29uPmZvcm1hdF9hbGlnbl9jZW50ZXI8L21hdC1pY29uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L21hdC1idXR0b24tdG9nZ2xlPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8bWF0LWJ1dHRvbi10b2dnbGUgdmFsdWU9XCJ0ZXh0LXJpZ2h0IHRleHQtZW5kXCIgYXJpYS1sYWJlbD1cIlRleHQgYWxpZ24gcmlnaHRcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxtYXQtaWNvbj5mb3JtYXRfYWxpZ25fcmlnaHQ8L21hdC1pY29uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L21hdC1idXR0b24tdG9nZ2xlPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8bWF0LWJ1dHRvbi10b2dnbGUgdmFsdWU9XCJ0ZXh0LWp1c3RpZnlcIiBhcmlhLWxhYmVsPVwiVGV4dCBhbGlnbiBqdXN0aWZ5XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bWF0LWljb24+Zm9ybWF0X2FsaWduX2p1c3RpZnk8L21hdC1pY29uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L21hdC1idXR0b24tdG9nZ2xlPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvbWF0LWJ1dHRvbi10b2dnbGUtZ3JvdXA+XHJcbiAgICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgPC9kaXY+XHJcbiAgICA8L21hdC1kaWFsb2ctY29udGVudD5cclxuICAgIDxtYXQtZGlhbG9nLWFjdGlvbnMgYWxpZ249XCJlbmRcIj5cclxuICAgICAgICA8YnV0dG9uIHR5cGU9XCJidXR0b25cIlxyXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJidG4gYnRuLWRhbmdlciBtci0yIG1lLTIgbWItMVwiXHJcbiAgICAgICAgICAgICAgICAoY2xpY2spPVwib25Ob0NsaWNrKClcIj5cclxuICAgICAgICAgICAgTm9cclxuICAgICAgICA8L2J1dHRvbj5cclxuICAgICAgICA8YnV0dG9uIHR5cGU9XCJzdWJtaXRcIlxyXG4gICAgICAgICAgICAgICAgY2xhc3M9XCJidG4gYnRuLXByaW1hcnkgbWItMVwiXHJcbiAgICAgICAgICAgICAgICBjZGtGb2N1c0luaXRpYWw+XHJcbiAgICAgICAgICAgIFllc1xyXG4gICAgICAgIDwvYnV0dG9uPlxyXG4gICAgPC9tYXQtZGlhbG9nLWFjdGlvbnM+XHJcbjwvZm9ybT5cclxuXHJcbiJdfQ==